-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (30 loc) · 1.17 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
NAME = checkers
CC = g++
CCFLAGS = -std=c++0x -Wall -pedantic -Wno-long-long -O0 -ggdb
SOURCES = AIPlayer.cpp Console.cpp exceptions.cpp GameController.cpp KingPiece.cpp LocalPlayer.cpp MenPiece.cpp NetworkConnection.cpp NetworkPlayer.cpp Piece.cpp Player.cpp Savefile.cpp UIRenderer.cpp UIRendererCompatible.cpp UIRendererUnicode.cpp
OBJECTS = $(SOURCES:.cpp=.o)
all: compile doc
compile: copysplash $(NAME)
@echo Built. Compiled sucessfully!
@echo " - Run the game with './checkers' command"
$(NAME): $(OBJECTS)
@echo Linking and compiling executable...
@$(CC) $(CCFLAGS) $^ src/main.cpp -o $@
%.o: src/%.cpp
@echo "Building object $< ..."
@$(CC) $(CCFLAGS) -c $<
copysplash:
@cp src/checkers-splash.txt ./checkers-splash.txt
@echo "Splash file copied into build directory..."
run:
@echo "This program requires parameters to start with options. See the documentation or readme."
@echo "The program will start with default options..."
@sleep 4
@./$(NAME)
clean:
@rm -f $(OBJECTS) $(NAME) checkers-splash.txt
@echo Directory cleaned.
doc:
@echo Generating documentation to directory doc/ , give me a second...
@doxygen Doxyfile
@echo Done