-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (31 loc) · 806 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
#
# Makefile for ppgso examples
#
# "make program" to make one program
# "make" or "make all" to make all executables
# "make clean" to remove executables
#
CC = g++
CFLAGS = -O2 -std=c++11 -Wpedantic -Wall -Wfloat-equal -Wextra -Wsign-promo -Wsign-compare -Wconversion -Wno-sign-conversion -I/usr/local/include -L/usr/local/lib
LFLAGS = -lm
UNAME := $(shell uname -s)
ALL = gl_project
all: $(ALL)
gl_%: gl_%.cpp
$(CC) -o $@ $< $(CFLAGS) $(LFLAGS) $(GL_LFLAGS)
# Linux
ifeq ($(UNAME),Linux)
GL_LFLAGS = -lGLEW -lglfw3 -lGL -lX11 -lXi -lXrandr -lXxf86vm -lXinerama -lXcursor -lrt -lm -pthread
clean:
-rm $(ALL)
# OSX
else ifeq ($(UNAME),Darwin)
GL_LFLAGS = -lGLEW -lglfw3 -framework OpenGL
clean:
-rm $(ALL)
# Windows
else
GL_LFLAGS = -lglew32 -lglfw3 -lOpenGL32 -lglu32
clean:
-del *.exe
endif