summarylogtreecommitdiffstats
path: root/Makefile.custom
blob: c6206f3a916fbe1664edf80d3a436111430f94bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
PREFIX  ?= /usr/local
DESTDIR ?=

CXXFLAGS=-std=c++11 -Wno-unknown-pragmas -Wall \
       -fPIC -march=native -O2 -pipe -fno-plt -DFORTIFY_SOURCE=2 \
       -I/usr/include/mxnet -I/usr/include/vapoursynth
LDFLAGS=-Wl,-z,relro,-z,now \
	-shared -fPIC -lpthread -lmxnet

all: libvsmxnet.so

clean: 
	rm -f *.o *.so

install: all
	install -Dm755 libvsmxnet.so $(DESTDIR)$(PREFIX)/lib/vapoursynth/libvsmxnet.so
	install -Dm644 README.md $(DESTDIR)$(PREFIX)/share/doc/vapoursynth/plugins/vsmxnet/README.md

libvsmxnet.o:
	g++ -c ${CXXFLAGS} -o libvsmxnet.o vs_mxnet/vsMXNet.cpp

libvsmxnet.so: libvsmxnet.o
	g++ ${LDFLAGS} -o libvsmxnet.so libvsmxnet.o