-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
28 lines (18 loc) · 849 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
.PHONY: all test
all: bin/bulls_and_cows bin/test
clean:
rm -rf bin/bulls_and_cows bin/test *.o
test:
./bin/test
build/src/main.o: src/main.cpp
g++ -std=c++17 -Wall -Werror -c -o build/src/main.o src/main.cpp
build/src/bulls_and_cows.o: src/bulls_and_cows.cpp
g++ -std=c++17 -Wall -Werror -c -o build/src/bulls_and_cows.o src/bulls_and_cows.cpp
bin/bulls_and_cows: build/src/main.o build/src/bulls_and_cows.o
g++ -o bin/bulls_and_cows build/src/main.o build/src/bulls_and_cows.o
build/test/main.o: test/main.cpp
g++ -std=c++17 -Wall -Werror -c -o build/test/main.o test/main.cpp
build/test/test.o: test/test.cpp
g++ -std=c++17 -Wall -Werror -c -o build/test/test.o test/test.cpp
bin/test: build/test/main.o build/test/test.o build/src/bulls_and_cows.o
g++ -o bin/test build/test/main.o build/test/test.o build/src/bulls_and_cows.o