projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Interim magic number replacement.
[open-adventure.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index c58e6d7b020088cad3cdfb382ad05c710c466048..43f1f9514caa1c1286ec093cbb47e5147d92d307 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-27,9
+27,10
@@
VERS=$(shell sed -n <NEWS '/^[0-9]/s/:.*//p' | head -1)
.PHONY: debug indent release refresh dist linty html clean
VERS=$(shell sed -n <NEWS '/^[0-9]/s/:.*//p' | head -1)
.PHONY: debug indent release refresh dist linty html clean
+.PHONY: check coverage
CC?=gcc
CC?=gcc
-CCFLAGS+=-std=c99 -D
_DEFAULT_SOURCE
-Wpedantic -O2
+CCFLAGS+=-std=c99 -D
_DEFAULT_SOURCE -DVERSION=\"$(VERS)\"
-Wpedantic -O2
LIBS=
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
LIBS=
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
@@
-46,7
+47,7
@@
SOURCES=$(OBJS:.o=.c) advent.h adventure.yaml Makefile control linenoise/linenoi
advent: $(OBJS) linenoise.o dungeon.o
$(CC) $(CCFLAGS) $(DBX) -o advent $(OBJS) dungeon.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 dungeon.h
+main.o: advent.h dungeon.h
linenoise.o
init.o: advent.h dungeon.h
init.o: advent.h dungeon.h
@@
-56,7
+57,7
@@
score.o: advent.h dungeon.h
misc.o: advent.h dungeon.h
misc.o: advent.h dungeon.h
-cheat.o: advent.h dungeon.h
+cheat.o: advent.h dungeon.h
linenoise.o
saveresume.o: advent.h dungeon.h
saveresume.o: advent.h dungeon.h
@@
-66,10
+67,14
@@
dungeon.o: dungeon.c dungeon.h
dungeon.c dungeon.h: make_dungeon.py adventure.yaml
python3 make_dungeon.py
dungeon.c dungeon.h: make_dungeon.py adventure.yaml
python3 make_dungeon.py
-linenoise.o: linenoise/linenoise.h
+linenoise.o: linenoise/linenoise.h
+ @test -s linenoise/linenoise.h || { echo -e "linenoise not present. Try:\n\
+ git submodule update --recursive --remote --init"; exit 1; }
$(CC) -c linenoise/linenoise.c
$(CC) -c linenoise/linenoise.c
-linenoise-dbg: linenoise/linenoise.h
+linenoise-dbg: linenoise/linenoise.h
+ @test -s linenoise/linenoise.h || { echo -e "linenoise not present. Try:\n\
+ git submodule update --recursive --remote --init"; exit 1; }
$(CC) $(CCFLAGS) -c linenoise/linenoise.c
clean:
$(CC) $(CCFLAGS) -c linenoise/linenoise.c
clean: