forked from gotthardp/python-mercuryapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (19 loc) · 885 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
APIVER ?= 1.31.0.33
PYTHON ?= $(shell { command -v python3 || command -v python; } 2>/dev/null)
.PHONY: all mercuryapi install
all: mercuryapi
$(PYTHON) setup.py build
install: mercuryapi
$(PYTHON) setup.py install
mercuryapi: mercuryapi-$(APIVER)/.done
make -C mercuryapi-$(APIVER)/c/src/api
mkdir -p build/mercuryapi/include
find mercuryapi-*/c/src/api -type f -name '*.h' ! -name '*_imp.h' | grep -v 'ltkc_win32' | xargs cp -t build/mercuryapi/include
mkdir -p build/mercuryapi/lib
find mercuryapi-*/c/src/api -type f -name '*.a' -or -name '*.so.1' | xargs cp -t build/mercuryapi/lib
mercuryapi-$(APIVER)/.done: mercuryapi-$(APIVER).zip
unzip mercuryapi-$(APIVER).zip
patch -p0 -d mercuryapi-$(APIVER) < mercuryapi.patch
touch mercuryapi-$(APIVER)/.done
mercuryapi-$(APIVER).zip:
wget https://www.jadaktech.com/wp-content/uploads/2018/06/mercuryapi-$(APIVER).zip