forked from danmar/simplecpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (23 loc) · 908 Bytes
/
Makefile
File metadata and controls
32 lines (23 loc) · 908 Bytes
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
all: testrunner simplecpp
CPPFLAGS ?=
CXXFLAGS = -Wall -Wextra -pedantic -Wcast-qual -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wpacked -Wredundant-decls -Wundef -Woverloaded-virtual -std=c++11 -g $(CXXOPTS)
LDFLAGS = -g $(LDOPTS)
# Define test source dir macro for compilation (preprocessor flags)
TEST_CPPFLAGS = -DSIMPLECPP_TEST_SOURCE_DIR=\"$(CURDIR)\"
# Only test.o gets the define
test.o: CPPFLAGS += $(TEST_CPPFLAGS)
test.o: CXXFLAGS += -Wno-multichar
%.o: %.cpp simplecpp.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $<
testrunner: test.o simplecpp.o
$(CXX) $(LDFLAGS) simplecpp.o test.o -o testrunner
test: testrunner simplecpp
./testrunner
python3 run-tests.py
python3 -m pytest integration_test.py -vv
selfcheck: simplecpp
CXX=$(CXX) ./selfcheck.sh
simplecpp: main.o simplecpp.o
$(CXX) $(LDFLAGS) main.o simplecpp.o -o simplecpp
clean:
rm -f testrunner simplecpp *.o