-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (24 loc) · 994 Bytes
/
Copy pathMakefile
File metadata and controls
35 lines (24 loc) · 994 Bytes
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
CXX = clang++
APP_DEBUG = transform-feedback_debug
APP_RELEASE = transform-feedback_release
CXXFLAGS = -DGL_GLEXT_PROTOTYPES -Wall -Werror -Ofast -DRELEASE -std=c++11 -pedantic `sdl2-config --cflags` `pkg-config --cflags SDL2_image glew`
CXXFLAGSD = -DGL_GLEXT_PROTOTYPES -Wall -Werror -ggdb -std=c++11 -pedantic -pg `sdl2-config --cflags` `pkg-config --cflags SDL2_image glew`
LIBS = `sdl2-config --libs` `pkg-config --libs SDL2_image glew` -lGL
LIBSD = `sdl2-config --libs` `pkg-config --libs SDL2_image glew` -lGL -pg
SRCS = transform-feedback.cpp utils.cpp
OBJS_RELEASE = $(SRCS:.cpp=_r.o)
OBJS_DEBUG = $(SRCS:.cpp=_d.o)
all: $(APP_DEBUG) $(APP_RELEASE)
debug: $(APP_DEBUG)
release: $(APP_RELEASE)
%_r.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
%_d.o: %.cpp
$(CXX) $(CXXFLAGSD) -c $< -o $@
$(APP_DEBUG): $(OBJS_DEBUG)
$(CXX) -o $@ $^ $(LIBSD)
$(APP_RELEASE): $(OBJS_RELEASE)
$(CXX) -o $@ $^ $(LIBS)
strip $@
clean:
rm -f *_r.o *_d.o $(APP_DEBUG) $(APP_RELEASE) *~