Skip to content

Commit d4a5125

Browse files
committed
exam
1 parent aff8faf commit d4a5125

File tree

5 files changed

+18313
-0
lines changed

5 files changed

+18313
-0
lines changed

exam/Makefile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
SRC = tests.cpp
2+
3+
CXX = c++
4+
CXXFLAGS = -Wall -Wextra -std=c++14 -O3
5+
6+
EXE = $(SRC:.cpp=.x)
7+
8+
# eliminate default suffixes
9+
.SUFFIXES:
10+
SUFFIXES =
11+
12+
# just consider our own suffixes
13+
.SUFFIXES: .cpp .x .o
14+
15+
all: $(EXE)
16+
17+
check: tests.x
18+
./$< -s
19+
20+
.PHONY: all
21+
22+
%.x:
23+
$(CXX) $^ -o $@
24+
25+
%.o: %.cpp
26+
$(CXX) $< -o $@ $(CXXFLAGS) -c
27+
28+
format: $(SRC)
29+
@clang-format -i $^ -verbose || echo "Please install clang-format to run this command"
30+
31+
.PHONY: format
32+
33+
clean:
34+
rm -f $(EXE) *~ *.o
35+
36+
.PHONY: clean
37+
38+
tests.x : tests_main.o tests.o
39+
40+
tests.o: tests.cpp catch.hpp stack_pool.hpp
41+
42+
format : stack_pool.hpp

0 commit comments

Comments
 (0)