diff options
author | khali <khali> | 2003-10-12 16:00:35 +0000 |
---|---|---|
committer | khali <khali> | 2003-10-12 16:00:35 +0000 |
commit | 73fb66cca6d7d02b06b0920273ffb7bc3d2d064d (patch) | |
tree | f8e543afd52cae9a458582b3ff7315d320f4134e /Makefile | |
parent | ebbc84bc4d5657932dee2208361428e3f7f368e5 (diff) | |
download | dmidecode-73fb66cca6d7d02b06b0920273ffb7bc3d2d064d.tar.gz |
Handle the new vpddecode program.
Fix dependencies for ownership.
Add strip target.
Various cleanups (reordering, comments, optimization and debug flags).
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 40 |
1 files changed, 34 insertions, 6 deletions
@@ -11,18 +11,24 @@ CC = gcc CFLAGS = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \ - -Wcast-align -Wwrite-strings -O2 -pedantic -g + -Wcast-align -Wwrite-strings -pedantic #CFLAGS += -DBIGENDIAN #CFLAGS += -DALIGNMENT_WORKAROUND #CFLAGS += -DTABLE_LITTLEENDIAN #CFLAGS += -D__IA64__ CFLAGS += -DUSE_MMAP + +# When debugging, disable -O2 and enable -g. +CFLAGS += -O2 +#CFLAGS += -g + PREFIX = /usr/local -all : dmidecode biosdecode ownership +all : dmidecode biosdecode ownership vpddecode -ownership : ownership.o util.o - $(CC) ownership.o util.o -o $@ +# +# Programs +# dmidecode : dmidecode.o util.o $(CC) dmidecode.o util.o -o $@ @@ -30,27 +36,49 @@ dmidecode : dmidecode.o util.o biosdecode : biosdecode.o util.o $(CC) biosdecode.o util.o -o $@ +ownership : ownership.o util.o + $(CC) ownership.o util.o -o $@ + +vpddecode : vpddecode.o util.o + $(CC) vpddecode.o util.o -o $@ + +# +# Objects +# + dmidecode.o : dmidecode.c version.h types.h util.h $(CC) $(CFLAGS) -c $< -o $@ biosdecode.o : biosdecode.c version.h types.h util.h $(CC) $(CFLAGS) -c $< -o $@ -ownership.o : ownership.c version.h types.h util.h +ownership.o : ownership.c types.h util.h + $(CC) $(CFLAGS) -c $< -o $@ + +vpddecode.o : vpddecode.c version.h types.h util.h $(CC) $(CFLAGS) -c $< -o $@ util.o : util.c types.h util.h $(CC) $(CFLAGS) -c $< -o $@ +# +# Commands +# + +strip : all + strip dmidecode biosdecode ownership vpddecode + install : all install -m 755 dmidecode $(PREFIX)/sbin install -m 755 biosdecode $(PREFIX)/sbin install -m 755 ownership $(PREFIX)/sbin + install -m 755 vpddecode $(PREFIX)/sbin uninstall : rm -f $(PREFIX)/sbin/dmidecode rm -f $(PREFIX)/sbin/biosdecode rm -f $(PREFIX)/sbin/ownership + rm -f $(PREFIX)/sbin/vpddecode clean : - rm -f *.o dmidecode biosdecode ownership + rm -f *.o dmidecode biosdecode ownership vpddecode |