-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (24 loc) · 753 Bytes
/
Makefile
File metadata and controls
28 lines (24 loc) · 753 Bytes
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
export OBJ_HOME := $(realpath obj)
export SRC_HOME := $(realpath src)
export INCL_HOME := $(realpath include)
export TEST_LINK_FILES := -lgtest -lgtest_main
export TEST_INCLUDE :=
export EXECUTABLE := warsofcatan
ALLFILES := $(wildcard $(SRC_HOME)/*) $(wildcard $(INCL_HOME)/*)
export CXX := g++
export LD := g++
export CXXFLAGS := -g -I$(INCL_HOME) -std=c++0x -I/usr/include/SDL2 -I/usr/local/include/SDL2 -Wall
export LDFLAGS := -L/usr/local/lib -lSDL2 -lSDL2_ttf -lGL -lGLU -Wl,-R/usr/local/lib
.PHONY: all
all: $(EXECUTABLE)
$(EXECUTABLE): $(ALLFILES)
cd src && $(MAKE)
${LD} obj/*.o $(LDFLAGS) -o $(EXECUTABLE)
.PHONY: tests
tests: $(EXECUTABLE)
cd tests && $(MAKE)
tests/main.test
.PHONY: clean
clean:
rm -f $(EXECUTABLE)
rm -f obj/*.o