X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=Makefile;h=b8582d5d66c1f34df008d45634ea9ea88897a123;hp=9cb6feb8e03c7ccdd66330197092650d558e6313;hb=aa1dd666a9e5a972cb8e29c70cebb9c35a785ddf;hpb=6150e3be1fdc8d55ff79f87c014a62a134559799 diff --git a/Makefile b/Makefile index 9cb6feb..b8582d5 100644 --- a/Makefile +++ b/Makefile @@ -36,64 +36,61 @@ ifeq ($(UNAME_S),Linux) LIBS=-lrt endif -OBJS=main.o init.o actions.o score.o misc.o saveresume.o common.o -CHEAT_OBJS=cheat.o init.o actions.o score.o misc.o saveresume.o common.o -SOURCES=$(OBJS:.o=.c) dungeon.c advent.h common.h adventure.text Makefile control linenoise/linenoise.[ch] newdungeon.py +OBJS=main.o init.o actions.o score.o misc.o saveresume.o +CHEAT_OBJS=cheat.o init.o actions.o score.o misc.o saveresume.o +SOURCES=$(OBJS:.o=.c) advent.h adventure.yaml Makefile control linenoise/linenoise.[ch] make_dungeon.py .c.o: $(CC) $(CCFLAGS) $(DBX) -c $< -advent: $(OBJS) linenoise.o newdb.o - $(CC) $(CCFLAGS) $(DBX) -o advent $(OBJS) newdb.o linenoise.o $(LDFLAGS) $(LIBS) +advent: $(OBJS) linenoise.o dungeon.o + $(CC) $(CCFLAGS) $(DBX) -o advent $(OBJS) dungeon.o linenoise.o $(LDFLAGS) $(LIBS) -main.o: advent.h database.h common.h newdb.h +main.o: advent.h dungeon.h -init.o: advent.h database.h common.h newdb.h +init.o: advent.h dungeon.h -actions.o: advent.h database.h common.h newdb.h +actions.o: advent.h dungeon.h -score.o: advent.h database.h common.h newdb.h +score.o: advent.h dungeon.h -misc.o: advent.h database.h common.h newdb.h +misc.o: advent.h dungeon.h -cheat.o: advent.h database.h common.h newdb.h +cheat.o: advent.h dungeon.h -saveresume.o: advent.h database.h common.h newdb.h +saveresume.o: advent.h dungeon.h -common.o: common.h +dungeon.o: dungeon.c dungeon.h + $(CC) $(CCFLAGS) $(DBX) -c dungeon.c -dungeon.o: common.h newdb.h - -newdb.o: newdb.c newdb.h - $(CC) $(CCFLAGS) $(DBX) -c newdb.c - -database.h: dungeon - ./dungeon - -newdb.c newdb.h: newdungeon.py adventure.yaml - python3 newdungeon.py +dungeon.c dungeon.h: make_dungeon.py adventure.yaml + python3 make_dungeon.py linenoise.o: linenoise/linenoise.h - $(CC) $(CCFLAGS) -c linenoise/linenoise.c + $(CC) -c linenoise/linenoise.c -dungeon: dungeon.o common.o - $(CC) $(CCFLAGS) -o $@ dungeon.o common.o +linenoise-dbg: linenoise/linenoise.h + $(CC) $(CCFLAGS) -c linenoise/linenoise.c clean: - rm -f *.o advent cheat *.html database.h dungeon *.gcno *.gcda - rm -f newdb.c newdb.h + rm -f *.o advent cheat *.html *.gcno *.gcda + rm -f dungeon.c dungeon.h rm -f README advent.6 MANIFEST *.tar.gz rm -f *~ rm -f .*~ + rm -rf coverage advent.info cd tests; $(MAKE) --quiet clean -cheat: $(CHEAT_OBJS) linenoise.o newdb.o - $(CC) $(CCFLAGS) $(DBX) -o cheat $(CHEAT_OBJS) linenoise.o newdb.o $(LDFLAGS) $(LIBS) +cheat: $(CHEAT_OBJS) linenoise.o dungeon.o + $(CC) $(CCFLAGS) $(DBX) -o cheat $(CHEAT_OBJS) linenoise.o dungeon.o $(LDFLAGS) $(LIBS) check: advent cheat cd tests; $(MAKE) --quiet +coverage: debug cheat + cd tests; $(MAKE) coverage --quiet + .SUFFIXES: .adoc .html .6 # Requires asciidoc and xsltproc/docbook stylesheets. @@ -152,3 +149,5 @@ linty: advent debug: CCFLAGS += -O0 --coverage -ggdb debug: linty debug: cheat + +debug-ln: linenoise-dbg debug