-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMakefile
45 lines (31 loc) · 1.16 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
# compiler used
CC = g++
# optional compile time flags (-O2, -O3 etc)
CFLAGS = -O3
EXE = showSTL.x
## Build targets
# root target (builds the final executable)
$(EXE): main.o \
getGeometryInput.o \
readBINARY.o \
readASCII.o \
drawGeometry.o \
createVertexArray.o
$(CC) main.o getGeometryInput.o readBINARY.o readASCII.o drawGeometry.o createVertexArray.o -o $(EXE) -framework OpenGL -framework Cocoa -framework IOKit -L /usr/local/lib -lglfw
# compile dependencies
main.o: main.h main.cpp
$(CC) $(CFLAGS) -I /usr/local/include -c main.cpp -o main.o
getGeometryInput.o: getGeometryInput.h getGeometryInput.cpp
$(CC) $(CFLAGS) -c getGeometryInput.cpp -o getGeometryInput.o
readBINARY.o: readBINARY.h readBINARY.cpp
$(CC) $(CFLAGS) -c readBINARY.cpp -o readBINARY.o
readASCII.o: readASCII.h readASCII.cpp
$(CC) $(CFLAGS) -c readASCII.cpp -o readASCII.o
drawGeometry.o: drawGeometry.h drawGeometry.cpp
$(CC) $(CFLAGS) -I /usr/local/include -c drawGeometry.cpp -o drawGeometry.o
createVertexArray.o: createVertexArray.h createVertexArray.cpp
$(CC) $(CFLAGS) -c createVertexArray.cpp -o createVertexArray.o
clean:
/bin/rm -f *.o
veryclean:
/bin/rm -f *.o *.x