-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
27 lines (21 loc) · 935 Bytes
/
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
export VERSION = 1.0.4
export GITCOMMIT = $(shell git rev-parse --short HEAD)
export CFLAGS = -DVERSION=\"$(VERSION)\" -DGITCOMMIT=\"$(GITCOMMIT)\"
all: build
sandscript-library-interface/.git:
git clone https://github.com/sandvine/sandscript-library-interface
build: sandscript-library-interface/.git pal.c
python3 setup.py build
clean:
python3 setup.py clean -a
@rm -rf build *.rpm
install: build
install -m 0755 -d $(DESTDIR)/usr/local/sandvine/loadable
install -m 0755 build/lib.*/*.so $(DESTDIR)/usr/local/sandvine/loadable
install -m 0755 -d $(DESTDIR)/usr/local/sandvine/etc
install -m 0444 SandScript.py $(DESTDIR)/usr/local/sandvine/etc
install -m 0644 policy.py.sample $(DESTDIR)/usr/local/sandvine/etc
install -m 0644 policy_test.py $(DESTDIR)/usr/local/sandvine/etc
rpm-release:
mv ./build/lib.linux-x86_64-3.4/SandScripthon.cpython-34m.so ./build/lib.linux-x86_64-3.4/SandScripthon.so
hack/rpmbuild.sh .