-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (31 loc) · 1019 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
48
49
# Makefile for the CITS3003 project running on the Mac
#
# Du Huynh
# April 2016
GCC_OPTIONS=-I ../../include -I ../../assimp-3.1.1/include/ \
-w -fpermissive -O3 -g
GL_OPTIONS=-D__APPLE__ -D__MACH__ -framework OpenGL -framework GLUT
LIBRARY = -Wl,-rpath,. -L. -lassimp
OPTIONS=$(GCC_OPTIONS) $(GL_OPTIONS)
SHADER = InitShader.o
SHADER_SRC = ../../Common/InitShader.cpp
PROGRAM = scene-start
DIRT = $(wildcard *.o *.i *~ */*~ *.log assimp_log.txt)
RM = /bin/rm
# -------- rules for building programs --------
.PHONY: clean rmprogram clobber
default all: $(PROGRAM)
$(PROGRAM): $(SHADER)
$(SHADER): $(SHADER_SRC)
g++ -c $(SHADER_SRC) $(OPTIONS)
scene-start: scene-start.cpp gnatidread.h bitmap.o
g++ -o scene-start scene-start.cpp $(SHADER) bitmap.o $(OPTIONS) $(LIBRARY)
%.o: %.c
gcc -c $*.c $(OPTIONS)
# -------- rules for cleaning up files that can be rebuilt --------
clean:
$(RM) -f $(DIRT)
rmprogram:
$(RM) -f $(PROGRAM) $(INIT_SHADER)
$(RM) -rf scene-start.dSYM
clobber: clean rmprogram