forked from camsas/Musketeer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (46 loc) · 1.37 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.PHONY: clean test dependencies help info
.DEFAULT: all
# Get common build settings
include include/Makefile.config
include include/Makefile.common
all: tests-clean dependencies musketeer
help: info
info:
@echo "C++ compiler: $(CXX)"
@echo "CPPFLAGS: $(CPPFLAGS)"
@echo "CXXFLAGS: $(CXXFLAGS)"
@echo "Platform: $(PLATFORM)"
@echo "Build output in $(BUILD_DIR)"
@echo
@echo "Targets:"
@echo " - all: build all code"
@echo " - clean: remove all temporary build infrastructure"
@echo " - examples: build example jobs"
@echo " - dependencies: set up external dependencies (should only run once "
@echo " and automatically, but can be re-run manually)"
@echo " - test: run unit tests (must be preceded by clean & make all)"
@echo
dependencies: ext/.ext-ok
ext/.ext-ok:
$(SCRIPTS_DIR)/setup.sh
musketeer: dependencies base
$(MAKE) $(MAKEFLAGS) -C $(SRC_ROOT_DIR) all
base:
$(MAKE) $(MAKEFLAGS) -C $(SRC_ROOT_DIR) antlr
$(MAKE) $(MAKEFLAGS) -C $(SRC_ROOT_DIR)/base all
test: dependencies
$(MAKE) $(MAKEFLAGS) -C tests run
tests-clean:
rm -f build/tests/all_tests.txt
mkdir -p build/tests
touch build/tests/all_tests.txt
clean:
rm -rf build
rm -rf src/generated-cxx/*
rm -rf src/generated-c/*
rm -f ext/.ext-ok
find src/ -depth -name .setup -type f -delete
lint:
python tests/all_lint.py src/ False
lint-verb:
python tests/all_lint.py src/ True