-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
45 lines (37 loc) · 1.46 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
OPT ?= -O3
LIBS :=-L SFML_Monopoly/lib/ -l sfml-graphics -l sfml-window -l sfml-system
CXX := g++ -std=c++17 -Wextra -Wall -Wpedantic
INC := -I Monopoly/
SRC := Monopoly/*.o
OBJ := Monopoly/Player.o Monopoly/main.o Monopoly/GameEngine.o Monopoly/Button.o Monopoly/ActiveScreen.o Monopoly/ContextWindow.o Monopoly/MonopolyGameEngine.o Monopoly/Field.o Monopoly/Board.o Monopoly/GameScreen.o Monopoly/NotificationWall.o Monopoly/Withdraw.o Monopoly/Chance.o Monopoly/AiAdapter.o Monopoly/Tinyann.o Monopoly/Tinyneat.o
all: monopolyVsAI clean
tests: monopolyTests
Monopoly/%.o: Monopoly/%.cc
$(CXX) -c $< -o $@ -I SFML_Monopoly/include $(INC) $(OPT)
monopolyVsAI: $(OBJ)
$(CXX) -o Monopoly/monopolyVsAI $(SRC) $(LIBS) $(INC) $(OPT)
$(info Optimimzation is $(OPT))
testsConfig:
mkdir Monopoly/tests/catch2
git clone --depth 1 https://github.com/catchorg/Catch2.git Monopoly/tests/catch2
cd Monopoly/tests/catch2
cmake -BMonopoly/tests/build -H. -DBUILD_TESTING=OFF Monopoly/tests/catch2
sudo cmake --build Monopoly/tests/build/ --target install
cd ../..
tests:
cmake Monopoly/tests/CMakeLists.txt
make -C Monopoly/tests/
rm -f monopolyTests
cleanAll: clean cleanTests cleanTestsConfig
clean:
rm -f Monopoly/*.o
cleanTests:
rm -frd Monopoly/tests/CMakeFiles
rm -f Monopoly/tests/*cmake
rm -f Monopoly/tests/CMakeCache.txt
rm -f Monopoly/tests/Makefile
rm -f Monopoly/tests/tests
rm -f monopolyTests
cleanTestsConfig:
rm -frd Monopoly/tests/build
rm -frd Monopoly/tests/catch2