-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (26 loc) · 803 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
GPP=g++
LIBS=-lGL -lSDL -lSDL_image -lGLU -llua5.1
CML=-I $(PWD)/include/cml-1_0_0
LUA=-I /usr/include/lua5.1
INCLUDE=$(CML) $(LUA)
BIN=tview
EXEC=$(PWD)/$(BIN)
DEBUG=-D_DEBUG
#CCFLAGS=-std=c++0x $(DEBUG)
#CCFLAGS=-std=gnu++0x $(DEBUG)
CCFLAGS=$(DEBUG)
SOURCES = $(wildcard src/*.cpp)
HEADERS = $(wildcard src/*.h)
OBJECTS=bin/main.o bin/util.o bin/terrain_vertex.o bin/engine.o bin/view.o bin/light.o bin/window.o bin/args.o bin/terrain.o bin/castle.o bin/primitive.o bin/cylinder.o bin/lua.o bin/cone.o
#OBJECTS=$(wildcard bin/*.o)
#/$(BIN): bin/%.o
# why can't I use a wildcard?
$(BIN): $(OBJECTS)
$(GPP) $(LIBS) -o $@ $(OBJECTS)
bin/%.o: src/%.cpp $(HEADERS)
$(GPP) $(CCFLAGS) $(INCLUDE) -c -o $@ $<
clean:
rm $(OBJECTS)
rm $(BIN)
test: $(BIN)
$(EXEC) media/height.png < media/scene