2021-11-19 14:46:33 +01:00
|
|
|
all: olm-python3
|
2018-07-08 12:19:16 +02:00
|
|
|
|
2018-11-28 14:54:09 +01:00
|
|
|
OLM_HEADERS = ../include/olm/olm.h ../include/olm/inbound_group_session.h \
|
2021-06-17 17:55:16 +02:00
|
|
|
../include/olm/outbound_group_session.h
|
2018-11-28 14:54:09 +01:00
|
|
|
|
|
|
|
include/olm/olm.h: $(OLM_HEADERS)
|
2018-10-13 00:53:18 +02:00
|
|
|
mkdir -p include/olm
|
2021-09-16 23:06:45 +02:00
|
|
|
$(CPP) -DOLM_STATIC_DEFINE -I dummy -I ../include -o include/olm/olm.h ../include/olm/olm.h
|
2018-10-16 06:31:56 +02:00
|
|
|
# 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
|
2018-10-13 00:53:18 +02:00
|
|
|
|
2018-11-28 14:54:09 +01:00
|
|
|
include/olm/pk.h: include/olm/olm.h ../include/olm/pk.h
|
2021-09-16 23:06:45 +02:00
|
|
|
$(CPP) -DOLM_STATIC_DEFINE -I dummy -I ../include -o include/olm/pk.h ../include/olm/pk.h
|
2018-11-28 14:54:09 +01:00
|
|
|
|
2019-04-02 12:54:00 +02:00
|
|
|
include/olm/sas.h: include/olm/olm.h ../include/olm/sas.h
|
2021-09-16 23:06:45 +02:00
|
|
|
$(CPP) -DOLM_STATIC_DEFINE -I dummy -I ../include -o include/olm/sas.h ../include/olm/sas.h
|
2019-04-02 12:54:00 +02:00
|
|
|
|
2021-06-17 17:55:16 +02:00
|
|
|
include/olm/error.h: include/olm/olm.h ../include/olm/error.h
|
2021-09-16 23:06:45 +02:00
|
|
|
$(CPP) -DOLM_STATIC_DEFINE -I dummy -I ../include -o include/olm/error.h ../include/olm/error.h
|
2021-06-17 17:55:16 +02:00
|
|
|
|
|
|
|
headers: include/olm/olm.h include/olm/pk.h include/olm/sas.h include/olm/error.h
|
2018-11-28 14:54:11 +01:00
|
|
|
|
2021-11-19 14:46:33 +01:00
|
|
|
install: install-python3
|
2018-07-08 12:19:16 +02:00
|
|
|
|
2018-10-13 01:06:46 +02:00
|
|
|
install-python3: olm-python3
|
|
|
|
python3 setup.py install --skip-build -O1 --root=$(DESTDIR)
|
2018-07-08 12:19:16 +02:00
|
|
|
|
2021-11-19 14:46:33 +01:00
|
|
|
test: olm-python3
|
2018-10-13 01:06:46 +02:00
|
|
|
rm -rf install-temp
|
2021-12-21 19:24:34 +01:00
|
|
|
mkdir -p install-temp/3
|
2018-10-13 01:06:46 +02:00
|
|
|
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
|
2018-07-08 12:19:16 +02:00
|
|
|
|
2019-06-18 13:52:02 +02:00
|
|
|
isort:
|
|
|
|
isort -y -p olm
|
|
|
|
|
2018-10-13 01:06:46 +02:00
|
|
|
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/
|
|
|
|
|
2021-11-19 14:46:33 +01:00
|
|
|
.PHONY: all olm-python3 install install-python3 clean test
|