-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
41 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
# Makefile for general visualization
CXX = g++
#CXXFLAGS = -std=c++14 -g -Wall -march=native -fopenmp -fno-omit-frame-pointer -O2 -flto -Wno-sign-compare -fsanitize=address
CXXFLAGS = -std=c++14 -g -O2 -fPIC#-Wall -march=native -fopenmp -fno-omit-frame-pointer -flto -Wno-sign-compare
LIBFLAGS = `pkg-config --cflags --libs cairo libavformat libavcodec libswresample libswscale libavutil`
VPATH = src src/animators src/objects src/encoders src/systems
SRCS = $(wildcard ./*.cpp) \
$(wildcard src/*.cpp) \
$(wildcard src/animators/*.cpp) \
$(wildcard src/objects/*.cpp) \
$(wildcard src/encoders/*.cpp) \
$(wildcard src/systems/*.cpp)
DEPS = $(wildcard include/*.h) \
$(wildcard include/animators/*.h) \
$(wildcard include/objects/*.h) \
$(wildcard include/encoders/*.h) \
$(wildcard include/systems/*.h)
OBJS = $(notdir $(SRCS:.cpp=.o))
LIB_OBJS = $(filter-out vis_test.o, $(OBJS))
vis_test: $(OBJS)
$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBFLAGS)
lib: $(LIB_OBJS)
cp -R include/ gathvl/
$(CXX) -shared -Wl,-soname,libgathvl.so -o libgathvl.so $^
%.o:%.cpp $(DEPS)
$(CXX) $(CXXFLAGS) -c -o $@ $< $(LIBFLAGS)
.PHONEY: clean
clean:
rm -Rf vis_test libgathvl.so gathvl/ $(OBJS)