-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (33 loc) · 1.13 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
LIBS = -L/usr/local/lib -lSDL2 -Wl,-rpath=/usr/local/lib
INCLUDES = -I/usr/local/include
CXX_FLAGS = -c $(INCLUDES) -std=c++11
OBJECTS = main.o drawing.o mesh.o camera.o matrix.o util.o \
ui_sdl.o entity.o world.o widgets.o
OUTFILE = a.out
default: a.out
run: $(OUTFILE)
./$(OUTFILE)
clean:
rm $(OBJECTS) $(OUTFILE) out.ppm
$(OUTFILE): $(OBJECTS);
g++ $(OBJECTS) $(LIBS)
main.o: main.cpp drawing.h mesh.h entity.h util.h
g++ main.cpp $(CXX_FLAGS)
drawing.o: drawing.cpp drawing.h util.h
g++ drawing.cpp $(CXX_FLAGS)
mesh.o: mesh.cpp mesh.h entity.h matrix.h util.h
g++ mesh.cpp $(CXX_FLAGS)
camera.o: camera.cpp camera.h mesh.h entity.h drawing.h matrix.h util.h world.h
g++ camera.cpp $(CXX_FLAGS)
matrix.o: matrix.cpp matrix.h util.h
g++ matrix.cpp $(CXX_FLAGS)
util.o: util.cpp util.h
g++ util.cpp $(CXX_FLAGS)
ui_sdl.o: ui_sdl.cpp ui.h drawing.h util.h widgets.h
g++ ui_sdl.cpp $(CXX_FLAGS)
entity.o: entity.cpp entity.h matrix.h util.h
g++ entity.cpp $(CXX_FLAGS)
world.o: world.cpp world.h mesh.h entity.h camera.h util.h
g++ world.cpp $(CXX_FLAGS)
widgets.o: widgets.cpp widgets.h
g++ widgets.cpp $(CXX_FLAGS)