-
Notifications
You must be signed in to change notification settings - Fork 63
/
Makefile
28 lines (20 loc) · 890 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
28
APIZIP ?= mercuryapi-AHAB-1.35.2.72-1.zip
APIVER ?= 1.35.2.72
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' ! -path '*ltkc_win32*' -exec cp {} build/mercuryapi/include/ \;
mkdir -p build/mercuryapi/lib
find mercuryapi-*/c/src/api -type f \( -name '*.a' -or -name '*.so.1' \) -exec cp {} build/mercuryapi/lib/ \;
mercuryapi-$(APIVER)/.done: $(APIZIP)
unzip $(APIZIP)
patch -p0 -d mercuryapi-$(APIVER) < mercuryapi.patch
touch mercuryapi-$(APIVER)/.done
$(APIZIP):
curl https://www.jadaktech.com/wp-content/uploads/2022/08/$(APIZIP) -o $(APIZIP)