-
Notifications
You must be signed in to change notification settings - Fork 3
/
GNUmakefile
43 lines (29 loc) · 1.07 KB
/
GNUmakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
TestDirs := $(wildcard Tests/*/.)
ExampleDirs := $(wildcard Examples/*/.)
CleanTestDirs := $(TestDirs:%=clean-%)
CleanExampleDirs := $(ExampleDirs:%=clean-%)
RealCleanTestDirs := $(TestDirs:%=realclean-%)
RealCleanExampleDirs := $(ExampleDirs:%=realclean-%)
.PHONY: all run $(TestDirs) $(ExampleDirs)
export GRCHOMBO_SOURCE = $(shell pwd)/Source
test: $(TestDirs)
examples: $(ExampleDirs)
all: $(TestDirs) $(ExampleDirs)
clean: $(CleanTestDirs) $(CleanExampleDirs)
realclean: $(RealCleanTestDirs) $(RealCleanExampleDirs)
$(TestDirs):
$(info ################# Making test $@ #################)
$(MAKE) -C $@ all
$(info ################# Running test $@ #################)
$(MAKE) -C $@ run
$(ExampleDirs):
$(info ################# Making example $@ #################)
$(MAKE) -C $@ all
$(CleanTestDirs):
$(MAKE) -C $(@:clean-%=%) clean NODEPENDS=TRUE
$(CleanExampleDirs):
$(MAKE) -C $(@:clean-%=%) clean NODEPENDS=TRUE
$(RealCleanTestDirs):
$(MAKE) -C $(@:realclean-%=%) clean NODEPENDS=TRUE
$(RealCleanExampleDirs):
$(MAKE) -C $(@:realclean-%=%) clean NODEPENDS=TRUE