From 2033ecb340c94dd8eed80d4ed1da2b277f10d8f1 Mon Sep 17 00:00:00 2001 From: sin Date: Sun, 9 Feb 2014 12:25:36 +0000 Subject: [PATCH] Use config.def.h --- Makefile | 11 ++++++++--- config.h => config.def.h | 0 2 files changed, 8 insertions(+), 3 deletions(-) rename config.h => config.def.h (100%) diff --git a/Makefile b/Makefile index 77d650e..0c8cb72 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ include config.mk .POSIX: .SUFFIXES: .c .o -HDR = arg.h config.h grabmntinfo.h proc.h reboot.h util.h +HDR = arg.h config.def.h grabmntinfo.h proc.h reboot.h util.h LIB = \ util/agetcwd.o \ util/apathmax.o \ @@ -76,7 +76,11 @@ binlib: util.a bin: $(BIN) -$(OBJ): util.h config.mk +$(OBJ): config.h util.h config.mk + +config.h: + @echo creating $@ from config.def.h + @cp config.def.h $@ .o: @echo LD $@ @@ -119,10 +123,11 @@ dist: clean @gzip ubase-$(VERSION).tar @rm -rf ubase-$(VERSION) -ubase-box: $(SRC) util.a +ubase-box: config.h $(SRC) util.a @echo creating box binary @mkdir -p build @cp $(HDR) build + @cp config.h build @for f in $(SRC); do sed "s/^main(/`basename $$f .c`_&/" < $$f > build/$$f; done @echo '#include ' > build/$@.c @echo '#include ' >> build/$@.c diff --git a/config.h b/config.def.h similarity index 100% rename from config.h rename to config.def.h