-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (34 loc) · 844 Bytes
/
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
FILE=skeleton
########
# Directories
S_DIR=Source
B_DIR=Build
########
# Output
EXEC=$(B_DIR)/$(FILE)
# default build settings
CC_OPTS=-c -fopenmp -pipe -Wall -fno-strict-aliasing -Wno-switch -ggdb -g3 -O3 -march=native -mtune=native
LN_OPTS=-fopenmp
CC=g++
########
# SDL options
SDL_CFLAGS := $(shell sdl2-config --cflags)
GLM_CFLAGS := -I../glm/
SDL_LDFLAGS := $(shell sdl2-config --libs)
########
# This is the default action
all:Build
########
# Object list
#
OBJ = $(B_DIR)/$(FILE).o
########
# Objects
$(B_DIR)/$(FILE).o : $(S_DIR)/$(FILE).cpp $(S_DIR)/SDLauxiliary.h $(S_DIR)/TestModelH.h
$(CC) $(CC_OPTS) -o $(B_DIR)/$(FILE).o $(S_DIR)/$(FILE).cpp $(SDL_CFLAGS) $(GLM_CFLAGS)
########
# Main build rule
Build : $(OBJ) Makefile
$(CC) $(LN_OPTS) -o $(EXEC) $(OBJ) $(SDL_LDFLAGS)
clean:
rm -f $(B_DIR)/*