-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (49 loc) · 1.77 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
56
57
58
59
60
61
62
63
64
65
66
#----------------------------------------------
# Makefile for CpSc8170 - Proj1: Bouncing Balls
#----------------------------------------------
#
# Gina Guerrero
# August 28, 2013
#
CC = g++
C = cpp
H = h
CFLAGS = -g
ifeq ("$(shell uname)", "Darwin")
LDFLAGS = -framework Foundation -framework GLUT -framework OpenGL -lm
else
ifeq ("$(shell uname)", "Linux")
LDFLAGS = -lglut -lGL -lm -L/usr/local/lib -lGLU
endif
endif
HFILES = Matrix.${H} Vector.${H} Utility.${H} Model.${H} Attributes.${H} Entity.${H} gauss.${H} Particle.${H} Pmanager.${H} Pgenerator.${H}
OFILES = Matrix.o Vector.o Utility.o Model.o Attributes.o Entity.o gauss.o Particle.o Pmanager.o Pgenerator.o
PROJECT = particles
${PROJECT}: ${PROJECT}.o $(OFILES)
${CC} $(CFLAGS) -o ${PROJECT} ${PROJECT}.o $(OFILES) $(LDFLAGS)
${PROJECT}.o: ${PROJECT}.${C} $(HFILES)
${CC} $(CFLAGS) -c ${PROJECT}.${C}
Pgenerator.o: Pgenerator.${C} Pgenerator.${H}
${CC} ${CFLAGS} -c ${INCFLAGS} Pgenerator.${C}
Pmanager.o: Pmanager.${C} Pmanager.${H}
${CC} ${CFLAGS} -c ${INCFLAGS} Pmanager.${C}
Particle.o: Particle.${C} Particle.${H}
${CC} ${CFLAGS} -c ${INCFLAGS} Particle.${C}
gauss.o: gauss.${C} gauss.${H}
${CC} ${CFLAGS} -c ${INCFLAGS} gauss.${C}
Entity.o: Entity.${C} Entity.${H}
${CC} ${CFLAGS} -c ${INCFLAGS} Entity.${C}
Attributes.o: Attributes.${C} Attributes.${H}
${CC} ${CFLAGS} -c ${INCFLAGS} Attributes.${C}
Model.o: Model.${C} Model.${H}
${CC} ${CFLAGS} -c ${INCFLAGS} Model.${C}
Matrix.o: Matrix.${C} Matrix.${H} Vector.${H} Utility.${H}
${CC} $(CFLAGS) -c Matrix.${C}
Vector.o: Vector.${C} Vector.${H} Utility.${H}
${CC} $(CFLAGS) -c Vector.${C}
Utility.o: Utility.${C} Utility.${H}
${CC} $(CFLAGS) -c Utility.${C}
debug:
make 'DFLAGS = /usr/lib/debug/malloc.o'
clean:
rm *.o *~ ${PROJECT}