-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (30 loc) · 1.27 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
CC = g++
ifeq ($(shell sw_vers 2>/dev/null | grep Mac | awk '{ print $$2}'),Mac)
CFLAGS = -g -DGL_GLEXT_PROTOTYPES -DOSX
INCFLAGS = -I./glm-0.9.2.7 -I/usr/X11/include -I./include/
LDFLAGS = -framework GLUT -framework OpenGL -L./osxlib/ \
-L"/System/Library/Frameworks/OpenGL.framework/Libraries" \
-lGL -lGLU -lm -lstdc++ -lfreeimage
else
CFLAGS = -g -DGL_GLEXT_PROTOTYPES
INCFLAGS = -I./glm-0.9.2.7 -I./include/ -I/usr/X11R6/include -I/sw/include \
-I/usr/sww/include -I/usr/sww/pkg/Mesa/include
LDFLAGS = -L/usr/X11R6/lib -L/sw/lib -L/usr/sww/lib \
-L/usr/sww/bin -L/usr/sww/pkg/Mesa/lib -lglut -lGLU -lGL -lX11 -lfreeimage
endif
RM = /bin/rm -f
all: checkers
checkers: main.o shaders.o Transform.o display.o variables.h shaders.h Transform.h checkers.o
$(CC) $(CFLAGS) -o checkers shaders.o main.o Transform.o display.o checkers.o $(INCFLAGS) $(LDFLAGS)
checkers.o: checkers.cpp
$(CC) $(CFLAGS) $(INCFLAGS) -c checkers.cpp
main.o: main.cpp shaders.h Transform.h variables.h
$(CC) $(CFLAGS) $(INCFLAGS) -c main.cpp
shaders.o: shaders.cpp shaders.h
$(CC) $(CFLAGS) $(INCFLAGS) -c shaders.cpp
display.o: display.cpp variables.h
$(CC) $(CFLAGS) $(INCFLAGS) -c display.cpp
Transform.o: Transform.cpp Transform.h
$(CC) $(CFLAGS) $(INCFLAGS) -c Transform.cpp
clean:
$(RM) *.o checkers *.png