From ebef811fce038c382fb66ecd728c9d885460263b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 17 Oct 2020 09:29:59 +0200 Subject: New upstream version 3.3 --- Makefile | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 77c9310..7aa729d 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # VPD Decode # # Copyright (C) 2000-2002 Alan Cox -# Copyright (C) 2002-2015 Jean Delvare +# Copyright (C) 2002-2020 Jean Delvare # # 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 -- cgit v1.2.3