File: Makefile

package info (click to toggle)
olm 3.2.16%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,208 kB
  • sloc: cpp: 15,245; ansic: 10,894; java: 3,244; objc: 2,291; javascript: 1,882; python: 1,839; makefile: 439; sh: 245; asm: 7; xml: 1
file content (52 lines) | stat: -rw-r--r-- 1,878 bytes parent folder | download | duplicates (3)
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
all: olm-python3

OLM_HEADERS = ../include/olm/olm.h ../include/olm/inbound_group_session.h \
	      ../include/olm/outbound_group_session.h

include/olm/olm.h: $(OLM_HEADERS)
	mkdir -p include/olm
	$(CPP) -DOLM_STATIC_DEFINE -I dummy -I ../include -o include/olm/olm.h ../include/olm/olm.h
# add memset to the header so that we can use it to clear buffers
	echo 'void *memset(void *s, int c, size_t n);' >> include/olm/olm.h

include/olm/pk.h: include/olm/olm.h ../include/olm/pk.h
	$(CPP) -DOLM_STATIC_DEFINE -I dummy  -I ../include -o include/olm/pk.h ../include/olm/pk.h

include/olm/sas.h: include/olm/olm.h ../include/olm/sas.h
	$(CPP) -DOLM_STATIC_DEFINE -I dummy -I ../include -o include/olm/sas.h ../include/olm/sas.h

include/olm/error.h: include/olm/olm.h ../include/olm/error.h
	$(CPP) -DOLM_STATIC_DEFINE -I dummy -I ../include -o include/olm/error.h ../include/olm/error.h

headers: include/olm/olm.h include/olm/pk.h include/olm/sas.h include/olm/error.h

olm-python3: headers
	DEVELOP=$(DEVELOP) python3 setup.py build

install: install-python3

install-python3: olm-python3
	python3 setup.py install --skip-build -O1 --root=$(DESTDIR)

test: olm-python3
	rm -rf install-temp
	mkdir -p install-temp/3
	PYTHONPATH=install-temp/3 python3 setup.py install --skip-build --install-lib install-temp/3 --install-script install-temp/bin
	PYTHONPATH=install-temp/3 python3 -m pytest
	PYTHONPATH=install-temp/3 python3 -m pytest --flake8 --benchmark-disable
	PYTHONPATH=install-temp/3 python3 -m pytest --isort --benchmark-disable
	PYTHONPATH=install-temp/3 python3 -m pytest --cov --cov-branch --benchmark-disable
	rm -rf install-temp

isort:
	isort -y -p olm

clean:
	rm -rf python_olm.egg-info/ dist/ __pycache__/
	rm -rf *.so _libolm.o
	rm -rf packages/
	rm -rf build/
	rm -rf install-temp/
	rm -rf include/

.PHONY: all olm-python3 install install-python3 clean test