44# VPD Decode
55#
66# Copyright (C) 2000-2002 Alan Cox <alan@redhat.com>
7- # Copyright (C) 2002-2015 Jean Delvare <jdelvare@suse.de>
7+ # Copyright (C) 2002-2020 Jean Delvare <jdelvare@suse.de>
88#
99# This program is free software; you can redistribute it and/or modify
1010# it under the terms of the GNU General Public License as published by
1414
1515CC = i686-w64-mingw32-gcc
1616STRIP = i686-w64-mingw32-strip
17- CFLAGS = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
17+ # Base CFLAGS can be overridden by environment
18+ CFLAGS ?= -O2
19+ # When debugging, disable -O2 and enable -g
20+ # CFLAGS ?= -g
21+
22+ CFLAGS += -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
1823 -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef
1924
2025# Let lseek and mmap support 64-bit wide offsets
@@ -23,12 +28,8 @@ CFLAGS += -D_FILE_OFFSET_BITS=64
2328# CFLAGS += -DBIGENDIAN
2429# CFLAGS += -DALIGNMENT_WORKAROUND
2530
26- # When debugging, disable -O2 and enable -g.
27- CFLAGS += -O2
28- # CFLAGS += -g
29-
30- # Pass linker flags here
31- LDFLAGS =
31+ # Pass linker flags here (can be set from environment too)
32+ LDFLAGS ?=
3233
3334DESTDIR =
3435prefix = /usr/local
@@ -63,8 +64,8 @@ all : $(PROGRAMS)
6364# Programs
6465#
6566
66- dmidecode$(EXEEXT ) : dmidecode.o dmiopt.o dmioem.o util.o winsmbios.o
67- $(CC ) $(LDFLAGS ) dmidecode.o dmiopt.o dmioem.o util.o winsmbios.o -o $@
67+ dmidecode$(EXEEXT ) : dmidecode.o dmiopt.o dmioem.o dmioutput.o util.o winsmbios.o
68+ $(CC ) $(LDFLAGS ) dmidecode.o dmiopt.o dmioem.o dmioutput.o util.o winsmbios.o -o $@
6869
6970biosdecode : biosdecode.o util.o
7071 $(CC ) $(LDFLAGS ) biosdecode.o util.o -o $@
@@ -80,13 +81,16 @@ vpddecode : vpddecode.o vpdopt.o util.o
8081#
8182
8283dmidecode.o : dmidecode.c version.h types.h util.h config.h dmidecode.h \
83- dmiopt.h dmioem.h
84+ dmiopt.h dmioem.h dmioutput.h
8485 $(CC ) $(CFLAGS ) -c $< -o $@
8586
8687dmiopt.o : dmiopt.c config.h types.h util.h dmidecode.h dmiopt.h
8788 $(CC ) $(CFLAGS ) -c $< -o $@
8889
89- dmioem.o : dmioem.c types.h dmidecode.h dmioem.h
90+ dmioem.o : dmioem.c types.h dmidecode.h dmioem.h dmioutput.h
91+ $(CC ) $(CFLAGS ) -c $< -o $@
92+
93+ dmioutput.o : dmioutput.c types.h dmioutput.h
9094 $(CC ) $(CFLAGS ) -c $< -o $@
9195
9296biosdecode.o : biosdecode.c version.h types.h util.h config.h
0 commit comments