diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-11-08 12:53:15 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-11-08 12:53:15 +0100 |
commit | 434575706930a762d7cb26e26cc26b140b453f65 (patch) | |
tree | bfbdccfb11bc3ac6e99377fc042cc91c4ae49a54 /Makefile | |
parent | 6630673da74616ddac305aa5d38165fc05aadeaa (diff) | |
parent | 6b9dcbb04abee53b6561d690c077c048795c3874 (diff) |
Merge branch 'release/debian/3.3-1' into masterdebian/3.3-1
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 17 insertions, 13 deletions
@@ -4,7 +4,7 @@ # VPD Decode # # Copyright (C) 2000-2002 Alan Cox <alan@redhat.com> -# Copyright (C) 2002-2015 Jean Delvare <jdelvare@suse.de> +# Copyright (C) 2002-2020 Jean Delvare <jdelvare@suse.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -12,8 +12,13 @@ # (at your option) any later version. # -CC = gcc -CFLAGS = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \ +CC ?= gcc +# Base CFLAGS can be overridden by environment +CFLAGS ?= -O2 +# When debugging, disable -O2 and enable -g +#CFLAGS ?= -g + +CFLAGS += -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \ -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef # Let lseek and mmap support 64-bit wide offsets @@ -22,12 +27,8 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 #CFLAGS += -DBIGENDIAN #CFLAGS += -DALIGNMENT_WORKAROUND -# When debugging, disable -O2 and enable -g. -CFLAGS += -O2 -#CFLAGS += -g - -# Pass linker flags here -LDFLAGS = +# Pass linker flags here (can be set from environment too) +LDFLAGS ?= DESTDIR = prefix = /usr/local @@ -61,8 +62,8 @@ all : $(PROGRAMS) # Programs # -dmidecode : dmidecode.o dmiopt.o dmioem.o util.o - $(CC) $(LDFLAGS) dmidecode.o dmiopt.o dmioem.o util.o -o $@ +dmidecode : dmidecode.o dmiopt.o dmioem.o dmioutput.o util.o + $(CC) $(LDFLAGS) dmidecode.o dmiopt.o dmioem.o dmioutput.o util.o -o $@ biosdecode : biosdecode.o util.o $(CC) $(LDFLAGS) biosdecode.o util.o -o $@ @@ -78,13 +79,16 @@ vpddecode : vpddecode.o vpdopt.o util.o # dmidecode.o : dmidecode.c version.h types.h util.h config.h dmidecode.h \ - dmiopt.h dmioem.h + dmiopt.h dmioem.h dmioutput.h $(CC) $(CFLAGS) -c $< -o $@ dmiopt.o : dmiopt.c config.h types.h util.h dmidecode.h dmiopt.h $(CC) $(CFLAGS) -c $< -o $@ -dmioem.o : dmioem.c types.h dmidecode.h dmioem.h +dmioem.o : dmioem.c types.h dmidecode.h dmioem.h dmioutput.h + $(CC) $(CFLAGS) -c $< -o $@ + +dmioutput.o : dmioutput.c types.h dmioutput.h $(CC) $(CFLAGS) -c $< -o $@ biosdecode.o : biosdecode.c version.h types.h util.h config.h |