-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakefile.template
42 lines (37 loc) · 1.17 KB
/
makefile.template
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
# Use the following website for more Makefile info:
# http://www.cprogramming.com/tutorial/makefiles_continued.html
# $@: the target
# $?: list of dependents changed since last invocation of target
# $^: all dependents minus duplicate names
# $+: all dependents, including duplicates, in the written order
# $<: the first dependency
SOURCES=src/main.cpp \
src/math/vec2.cpp \
src/world/player.cpp \
src/world/gamestate.cpp \
src/graphics/font.cpp \
src/graphics/texture.cpp \
src/system/timer.cpp \
src/system/application.cpp \
src/input/input.cpp \
src/system/queue.cpp \
src/system/queuenotifier.cpp
OBJECTS=$(SOURCES:.cpp=.o)
CC=g++
DEBUG=
DEBUG_DEFINES=
CFLAGS=-Wall -c $(DEBUG)
CINCLUDES=
PLATFORM_LFLAGS=
PLATFORM_DEFINES=
LFLAGS=-lSDLmain -lSDL -lSDL_image -lSDL_mixer -lGLEW $(PLATFORM_LFLAGS)
LINCLUDES=-L/usr/local/lib -L/usr/lib
DEFINES=-D_GNU_SOURCE=1 -D_THREAD_SAFE $(DEBUG_DEFINES) $(PLATFORM_DEFINES)
EXECUTABLE=platformer
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(OBJECTS) -o $@ $(LFLAGS) $(LINCLUDES)
.cpp.o:
$(CC) $(CFLAGS) $(CINCLUDES) $(DEFINES) $< -o $@
clean:
rm -rf $(OBJECTS) platformerd platformer