File Makefile changed (mode: 100644) (index c2029f6..78c48a1) |
... |
... |
OBJS := token.yy.o grammar.tab.o misc.o main.o \ |
18 |
18 |
hashtable.o paramlist.o funcdecl.o typeandname.o |
hashtable.o paramlist.o funcdecl.o typeandname.o |
19 |
19 |
|
|
20 |
20 |
|
|
|
21 |
|
.PHONY: all release clean debug prof |
|
22 |
|
.PHONY: clean-release-files clean-prof-files clean-build-files |
|
23 |
|
.PHONY: binary-release src-release |
|
24 |
|
.PHONY: help |
|
25 |
|
|
|
26 |
|
all: pjass |
|
27 |
|
|
|
28 |
|
help: |
|
29 |
|
@awk -F ':|##' \ |
|
30 |
|
'/^[^\t].+?:.*?##/ { \ |
|
31 |
|
printf "\033[36m%-20s\033[0m %s\n", $$1, $$NF \ |
|
32 |
|
}' $(MAKEFILE_LIST) |
|
33 |
|
|
|
34 |
|
-include $(OBJS:.o=.d) |
|
35 |
|
|
|
36 |
|
pjass: $(OBJS) ## Builds pjass |
|
37 |
|
$(CC) $(CFLAGS) $^ -o $@ |
|
38 |
|
|
|
39 |
|
test: should-fail should-check map-scripts ## Runs all tests |
|
40 |
|
|
|
41 |
|
release: src-release binary-release ## Builds a pjass release with src- and bin-zipballs |
|
42 |
|
|
|
43 |
|
clean: clean-build-files clean-release-files clean-prof-files ## Cleans the whole project |
|
44 |
|
|
21 |
45 |
|
|
22 |
|
.PHONY: all release clean debug prof clean-release-files clean-prof-files clean-build-files |
|
23 |
46 |
|
|
24 |
|
all: pjass |
|
25 |
47 |
|
|
26 |
48 |
debug: CFLAGS = -w -g |
debug: CFLAGS = -w -g |
27 |
|
debug: pjass |
|
|
49 |
|
debug: pjass ## Builds pjass with debugging support |
28 |
50 |
|
|
29 |
51 |
prof: CFLAGS = -w -pg |
prof: CFLAGS = -w -pg |
30 |
|
prof: pjass |
|
|
52 |
|
prof: pjass ## Builds pjass with profiling support. You can run all tests with profiling enabled via `PROF=1 make test` |
31 |
53 |
|
|
32 |
|
-include $(OBJS:.o=.d) |
|
33 |
|
|
|
34 |
|
pjass: $(OBJS) |
|
35 |
|
$(CC) $(CFLAGS) $^ -o $@ |
|
36 |
54 |
|
|
37 |
55 |
|
|
38 |
56 |
main.o: main.c |
main.o: main.c |
|
... |
... |
main.o: main.c | grammar.tab.h |
52 |
70 |
%.tab.c %.tab.h: %.y |
%.tab.c %.tab.h: %.y |
53 |
71 |
bison -d $< |
bison -d $< |
54 |
72 |
|
|
55 |
|
clean: clean-build-files clean-release-files clean-prof-files |
|
56 |
73 |
|
|
57 |
|
clean-build-files: |
|
|
74 |
|
clean-build-files: ## Cleans all build files |
58 |
75 |
rm -f grammar.tab.h grammar.tab.c token.yy.c token.yy.h \ |
rm -f grammar.tab.h grammar.tab.c token.yy.c token.yy.h \ |
59 |
76 |
$(OBJS) $(OBJS:.o=.d) \ |
$(OBJS) $(OBJS:.o=.d) \ |
60 |
77 |
pjass.exe pjass |
pjass.exe pjass |
61 |
78 |
|
|
62 |
|
clean-release-files: |
|
|
79 |
|
clean-release-files: ## Cleans all release zipballs |
63 |
80 |
rm -f pjass-git-*.zip |
rm -f pjass-git-*.zip |
64 |
81 |
|
|
65 |
|
clean-prof-files: |
|
|
82 |
|
clean-prof-files: ## Cleans all profiling files |
66 |
83 |
rm -f tests/should-check/*-analysis.txt \ |
rm -f tests/should-check/*-analysis.txt \ |
67 |
84 |
tests/should-fail/*-analysis.txt \ |
tests/should-fail/*-analysis.txt \ |
68 |
85 |
gmon.out |
gmon.out |
69 |
86 |
|
|
70 |
|
release: pjass-git-$(VERSION)-src.zip pjass-git-$(VERSION).zip |
|
|
87 |
|
|
|
88 |
|
src-release: pjass-git-$(VERSION)-src.zip ## Builds the source zipball |
|
89 |
|
binary-release: pjass-git-$(VERSION).zip ## Builds the exe zipball |
71 |
90 |
|
|
72 |
91 |
pjass-git-$(VERSION)-src.zip: grammar.y token.l misc.c misc.h Makefile notes.txt readme.txt |
pjass-git-$(VERSION)-src.zip: grammar.y token.l misc.c misc.h Makefile notes.txt readme.txt |
73 |
92 |
zip -q -r pjass-git-$(VERSION)-src.zip $^ tests/should-check/ tests/should-fail/ |
zip -q -r pjass-git-$(VERSION)-src.zip $^ tests/should-check/ tests/should-fail/ |
|
... |
... |
$(SHOULD_CHECK): pjass print-test |
95 |
114 |
$(SHOULD_FAIL): pjass print-test |
$(SHOULD_FAIL): pjass print-test |
96 |
115 |
@./fail.sh $@ |
@./fail.sh $@ |
97 |
116 |
|
|
98 |
|
should-fail: $(SHOULD_FAIL) |
|
99 |
|
should-check: $(SHOULD_CHECK) |
|
100 |
|
map-scripts: $(MAP_SCRIPTS) |
|
101 |
117 |
|
|
102 |
|
test: should-fail should-check map-scripts |
|
|
118 |
|
should-fail: $(SHOULD_FAIL) ## Tests that should fail |
|
119 |
|
should-check: $(SHOULD_CHECK) ## Tests that should check |
|
120 |
|
map-scripts: $(MAP_SCRIPTS) ## Tests which are run with common.j and Blizzard.j |
|
121 |
|
|
103 |
122 |
|
|
104 |
123 |
|
|
105 |
124 |
print-test: pjass |
print-test: pjass |