-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (29 loc) · 1.17 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
# Source files
SRC = Camera.cpp Color.cpp HdrApp.cpp Image.cpp ImageManager.cpp main.cpp ZMath.cpp Matrix4.cpp MemoryManager.cpp OpenGLApp.cpp OpenGLFBO.cpp OpenGLRenderer.cpp OpenGLShader.cpp OpenGLTextureCube.cpp TriMesh.cpp TriMeshManager.cpp Vector3.cpp File.cpp DownSampler.cpp OpenGLFont.cpp OpenGLTexture2D.cpp
OBJ = $(SRC:%.cpp=objs/%.o)
OUT = ../bin/envmap2
# Include
INCLUDES = -I. `sdl-config --cflags`
# Libraries path
# LIBS = -lGL -lGLU -lboost_thread-mt `sdl-config --libs`
LIBS = -framework OpenGL -lboost_thread-mt `sdl-config --libs`
# Compiler
CCC = clang
CXX = clang++
# C++ Compiler flags
CXXFLAGS = -Os -fomit-frame-pointer -W -Wall -Wextra -pipe
# CXXFLAGS = -O0 -g -W -Wall -Wextra -pipe
.SUFFIXES: .cpp
default: prepare $(OUT)
prepare:
mkdir -p objs/ ../bin/
$(OBJ): objs/%.o: %.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
objs/GLee.o:
$(CCC) $(CXXFLAGS) $(INCLUDES) -c GLee.c -o objs/GLee.o
objs/rgbe.o:
$(CCC) $(CXXFLAGS) $(INCLUDES) -c rgbe.c -o objs/rgbe.o
$(OUT): $(OBJ) objs/GLee.o objs/rgbe.o
$(CXX) $(OBJ) objs/GLee.o objs/rgbe.o -o $(OUT) $(LIBS)
clean:
rm -f objs/*.o $(OUT)