Simplify build: nested makefiles considered harmful.
[open-adventure.git] / Makefile
index bd579585aba187109109487bd85c08a35ad256d0..5eab9d5288aa42ba0442dd19df776aa592b6f3b6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,10 +22,12 @@ score.o:    misc.h main.h share.h database.h
 
 misc.o:                misc.h main.h database.h
 
-database.o:    database.h
+database.c database.h: compile
+       ./compile
+       gcc $(OPTIONS) -O $(DBX) -c database.c
 
 clean:
-       rm -f *.o advent advent.html advent.6 adventure.data
+       rm -f *.o advent advent.html advent.6 database.[ch]
        cd tests; $(MAKE) --quiet clean
 
 check: advent
@@ -48,3 +50,6 @@ release: advent-$(VERS).tar.gz advent.html
 
 refresh: advent.html
        shipper -N -w version=$(VERS) | sh -e -x
+
+database:
+       cd database; $(MAKE)