-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·64 lines (48 loc) · 1.25 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
TARGET = territorium
USING_OPENGL = 1
USING_SOIL = 1
CXX = clang++
CFLAGS = -Wall -g -std=c++11
#############################
## SETUP OpenGL & GLUT
#############################
# if we are using OpenGL & GLUT in this program
ifeq ($(USING_OPENGL), 1)
# Windows builds
ifeq ($(OS), Windows_NT)
INCPATH += -I$(LAB_INC_PATH)
LIBPATH += -L$(LAB_LIB_PATH)
LIBS += -lglut -lopengl32 -lglu32
# Mac builds
else ifeq ($(shell uname), Darwin)
LIBS += -framework GLUT -framework OpenGL
# Linux and all other builds
else
LIBS += -lglut -lGL -lGLU
endif
endif
#############################
## SETUP SOIL
#############################
# if we are using SOIL in this program
ifeq ($(USING_SOIL), 1)
# Windows builds
ifeq ($(OS), Windows_NT)
INCPATH += -I$(LAB_INC_PATH)
LIBPATH += -L$(LAB_LIB_PATH)
# Mac builds
else ifeq ($(shell uname), Darwin)
LIBS += -framework Cocoa
# Linux and other builds
else
endif
LIBS += -lSOIL
endif
#############################
## COMPILATION INSTRUCTIONS
#############################
all: $(TARGET)
clean:
rm -f $(TARGET)
$(TARGET): clean
$(CXX) $(CFLAGS) $(INCPATH) ./src/*.cpp -o $(TARGET) $(LIBPATH) $(LIBS)