forked from untoxa/gbvm
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
44 lines (37 loc) · 973 Bytes
/
Makefile
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
44
OBJDIR = obj
EXAMPLES = $(foreach dir,examples,$(wildcard $(dir)/*))
EXAMPLES_DIR = ./examples
TESTS = $(filter-out test/framework test/Makefile.test, $(foreach dir,test,$(wildcard $(dir)/*)))
TEST_DIR = ./test
all: examples test
.PHONY: develop examples test clean settings
develop:
$(MAKE) -C ./examples/develop
examples:
rm -rf $(EXAMPLES_DIR)/*/obj
rm -rf $(EXAMPLES_DIR)/*/build
@for example in $(EXAMPLES) ; do \
rm -rf $(OBJDIR) ; \
$(MAKE) -C $$example ; \
done
test:
rm -f $(TEST_DIR)/test.rpt
rm -f $(TEST_DIR)/*/capture.bmp
rm -rf $(TEST_DIR)/*/obj
rm -rf $(TEST_DIR)/*/build
rm -rf $(OBJDIR)
@for test in $(TESTS) ; do \
set -e; \
echo "# $$test"; \
$(MAKE) -C $$test clean settings test; \
echo ""; \
done
clean:
@echo "CLEANUP..."
rm -rf $(OBJDIR)
rm -rf $(ROM_BUILD_DIR)
rm -f $(TEST_DIR)/*/capture.bmp
rm -rf $(TEST_DIR)/*/obj
rm -rf $(TEST_DIR)/*/build
rm -rf $(EXAMPLES_DIR)/*/obj
rm -rf $(EXAMPLES_DIR)/*/build