forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ldid.mk
41 lines (32 loc) · 1.25 KB
/
ldid.mk
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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += ldid
LDID_VERSION := 2.1.2
DEB_LDID_V ?= $(LDID_VERSION)-1
ldid-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://github.com/Diatrus/saurik-ldid/archive/v$(LDID_VERSION).tar.gz
$(call EXTRACT_TAR,v$(LDID_VERSION).tar.gz,saurik-ldid-$(LDID_VERSION),ldid)
mkdir -p $(BUILD_STAGE)/ldid/usr/bin
ifneq ($(wildcard $(BUILD_WORK)/ldid/.build_complete),)
ldid:
@echo "Using previously built ldid."
else
ldid: ldid-setup openssl libplist
$(CC) -c $(CFLAGS) $(LDFLAGS) -o $(BUILD_WORK)/ldid/lookup2.o $(BUILD_WORK)/ldid/lookup2.c -I$(BUILD_WORK)/ldid
$(CXX) $(CXXFLAGS) $(LDFLAGS) -std=c++11 -o $(BUILD_STAGE)/ldid/usr/bin/ldid $(BUILD_WORK)/ldid/lookup2.o $(BUILD_WORK)/ldid/ldid.cpp -I$(BUILD_WORK)/ldid -framework CoreFoundation -framework Security -lcrypto -lplist-2.0 -lxml2
$(LN) -s ldid $(BUILD_STAGE)/ldid/usr/bin/ldid2
touch $(BUILD_WORK)/ldid/.build_complete
endif
ldid-package: ldid-stage
# ldid.mk Package Structure
rm -rf $(BUILD_DIST)/ldid
# ldid.mk Prep ldid
cp -a $(BUILD_STAGE)/ldid $(BUILD_DIST)
# ldid.mk Sign
$(call SIGN,ldid,general.xml)
# ldid.mk Make .debs
$(call PACK,ldid,DEB_LDID_V)
# ldid.mk Build cleanup
rm -rf $(BUILD_DIST)/ldid
.PHONY: ldid ldid-package