#
# To build with save/resume disabled, pass CCFLAGS="-D ADVENT_NOSAVE"
-.PHONY: debug indent release refresh dist linty html clean
+VERS=$(shell sed -n <NEWS '/^[0-9]/s/:.*//p' | head -1)
-VERS=1.0
+.PHONY: debug indent release refresh dist linty html clean
CC?=gcc
CCFLAGS+=-std=c99 -D _DEFAULT_SOURCE -Wpedantic -O2
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.text adventure.yaml Makefile control linenoise/linenoise.[ch] make_dungeon.py
+SOURCES=$(OBJS:.o=.c) advent.h adventure.yaml Makefile control linenoise/linenoise.[ch] make_dungeon.py
.c.o:
$(CC) $(CCFLAGS) $(DBX) -c $<
python3 make_dungeon.py
linenoise.o: linenoise/linenoise.h
+ $(CC) -c linenoise/linenoise.c
+
+linenoise-dbg: linenoise/linenoise.h
$(CC) $(CCFLAGS) -c linenoise/linenoise.c
clean:
debug: linty
debug: cheat
-
+debug-ln: linenoise-dbg debug