-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (37 loc) · 1.66 KB
/
Copy pathMakefile
File metadata and controls
56 lines (37 loc) · 1.66 KB
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
DUMMY_OBJ = AIDummy.o
# Add here any extra .o player files you want to link to the executable
EXTRA_OBJ = AIMarc.o AIDestro.o AImarquitus.o AItoasty1.o AIScorpion.o AIDeadPool08.o AIJugador.o AIJugadorcopia.o AIHenryKingus.o AIChicoso.o AIMiriam.o AIMarais.o AIpquilez2.o AIHala.o AItoasty.o AIDSR6.o AIGotri_v1.7.o AIVasquito.o AICR7.o
# Configuration
OPTIMIZE = 3 # Optimization level (0 to 3)
DEBUG = 0 # Compile for debugging (0 or 1)
PROFILE = 0 # Compile for profile (0 or 1)
# For debugging matches against Dummy
# OPTIMIZE = 0, DEBUG = 1
# For debugging matches among your players
# OPTIMIZE = 0, DEBUG = 1 and add -D_GLIBCXX_DEBUG at the end of DEBUG_FLAGS
# Flags
ifeq ($(strip $(PROFILE)),1)
PROFILEFLAGS=-pg
endif
ifeq ($(strip $(DEBUG)),1)
DEBUGFLAGS=-g -O0 -fno-inline #-D_GLIBCXX_DEBUG
endif
CXXFLAGS = -std=c++11 -Wall -Wno-unused-variable -fPIC $(PROFILEFLAGS) $(DEBUGFLAGS) -O$(strip $(OPTIMIZE))
LDFLAGS = -std=c++11 $(PROFILEFLAGS) $(DEBUGFLAGS) -O$(strip $(OPTIMIZE))
# The following two lines will detect all your players (files matching "AI*.cc")
PLAYERS_SRC = $(wildcard AI*.cc)
PLAYERS_OBJ = $(patsubst %.cc, %.o, $(PLAYERS_SRC)) $(EXTRA_OBJ) $(DUMMY_OBJ)
# Rules
OBJ = Structs.o Settings.o State.o Info.o Random.o Board.o Action.o Player.o Registry.o Utils.o
all: Game
clean:
rm -rf Game *.o *.exe Makefile.deps
Game: $(OBJ) Game.o Main.o $(PLAYERS_OBJ)
$(CXX) $^ -o $@ $(LDFLAGS)
SecGame: $(OBJ) SecGame.o SecMain.o
$(CXX) $^ -o $@ $(LDFLAGS) -lrt
%.exe: %.o $(OBJ) SecGame.o SecMain.o
$(CXX) $^ -o $@ $(LDFLAGS) -lrt
Makefile.deps: *.cc
$(CXX) $(CXXFLAGS) -MM *.cc > Makefile.deps
include Makefile.deps