-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (54 loc) · 2.21 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
MY_CFLAGS := -O2 -fPIC $(CFLAGS)
MY_CXXFLAGS := -std=c++14 -O2 -fPIC -fvisibility=hidden $(CXXFLAGS)
MY_CPPFLAGS := -DGRAPHENGINE_IMPL_NAMESPACE=timecube -DNDEBUG -Igraphengine/include -Itimecube -Ivsxx -Ivsxx/vapoursynth $(CPPFLAGS)
MY_LDFLAGS := $(LDFLAGS)
MY_LIBS := $(LIBS)
graphengine_HDRS = \
graphengine/graphengine/cpuinfo.h \
graphengine/graphengine/node.h \
graphengine/graphengine/state.h \
graphengine/graphengine/x86/cpuinfo_x86.h \
graphengine/include/graphengine/filter.h \
graphengine/include/graphengine/graph.h \
graphengine/include/graphengine/namespace.h \
graphengine/include/graphengine/types.h
graphengine_OBJS = \
graphengine/graphengine/cpuinfo.o \
graphengine/graphengine/graph.o \
graphengine/graphengine/node.o \
graphengine/graphengine/x86/cpuinfo_x86.o
timecube_HDRS = \
timecube/cube.h \
timecube/lut.h \
timecube/timecube.h \
timecube/x86/lut_x86.h
timecube_OBJS = \
timecube/cube.o \
timecube/lut.o \
timecube/timecube.o \
timecube/x86/lut_avx2.o \
timecube/x86/lut_avx512.o \
timecube/x86/lut_sse41.o \
timecube/x86/lut_x86.o
vsxx_HDRS = \
vsxx/vapoursynth/VapourSynth.h \
vsxx/vapoursynth/VSConstants4.h \
vsxx/vapoursynth/VSHelper4.h \
vsxx/VapourSynth4++.hpp \
vsxx/vsxx4_pluginmain.h
ifeq ($(X86), 1)
timecube/x86/lut_avx2.o: EXTRA_CXXFLAGS := -mf16c -mavx2 -mfma -march=haswell
timecube/x86/lut_sse41.o: EXTRA_CXXFLAGS := -msse4.1
timecube/x86/lut_avx512.o: EXTRA_CXXFLAGS := -mf16c -mfma -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq -mtune=skylake-avx512
MY_CPPFLAGS := -DCUBE_X86 $(MY_CPPFLAGS)
endif
all: vscube.so
benchmark/benchmark: benchmark/main.o $(timecube_OBJS) $(graphengine_OBJS)
$(CXX) $(MY_LDFLAGS) $^ $(MY_LIBS) -o $@
vscube.so: vscube/vscube.o vsxx/vsxx4_pluginmain.o $(timecube_OBJS) $(graphengine_OBJS)
$(CXX) -shared $(MY_LDFLAGS) $^ $(MY_LIBS) -o $@
clean:
rm -f *.a *.o *.so benchmark/benchmark benchmark/*.o graphengine/graphengine/*.o graphengine/graphengine/x86/*.o timecube/*.o timecube/x86/*.o vscube/*.o vsxx/*.o
%.o: %.cpp $(graphengine_HDRS) $(timecube_HDRS) $(vsxx_HDRS)
$(CXX) -c $(EXTRA_CXXFLAGS) $(MY_CXXFLAGS) $(MY_CPPFLAGS) $< -o $@
.PHONY: clean