]> git.gir.st - solVItaire.git/blob - Makefile
fix find-following
[solVItaire.git] / Makefile
1 .PHONY: all clean
2
3 CFLAGS := -Wall -Wextra -pedantic -std=c99 -g3 #-Wno-unused-parameter
4
5 ifdef DECIMAL_TEN
6 CFLAGS += -DDECIMAL_TEN
7 endif
8
9 all: sol spider freecell
10
11 #canfield:
12 sol: sol.c sol.h schemes.h
13 $(CC) $(CFLAGS) -DKLONDIKE $< -o $@
14
15 spider: sol.c sol.h schemes.h
16 $(CC) $(CFLAGS) -DSPIDER sol.c -o $@
17
18 freecell: sol.c sol.h schemes.h
19 $(CC) $(CFLAGS) -DFREECELL sol.c -o $@
20
21 clean:
22 rm -f sol spider freecell
23
24 .PHONY: getfuns test
25 getfuns: sol.c
26 @grep -o '^\w.* \w.*(.*)[^/]*{\|^#if.*\|^#e[ln].*' $<|sed 's/ *{$$/;/' \
27 | perl -0777 -pe 's{#if[^\n]*\n(#elif[^\n]*\n)?#endif[^\n]*\n}{}igs'
28
29 test:
30 @grep -n --color=always 'TODO\|XXX' README.md sol.*
31 longtest: test
32 sed 's/\t/ /g' sol.c|grep -n --color=always '^.\{81\}'|awk '{print "\033[35msol.c\033[36m:" $$0}'
33
34 .PHONY: frtest # TODO: remove me
35 frtest:
36 $(MAKE) test | grep FREECELL --color=always
Imprint / Impressum