-
Notifications
You must be signed in to change notification settings - Fork 83
/
Makefile
65 lines (58 loc) · 2.47 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
LIBRARY_NAME = librocketbootstrap
librocketbootstrap_FILES = Tweak.x Shims.x
librocketbootstrap_LIBRARIES = substrate
librocketbootstrap_FRAMEWORKS = Foundation
librocketbootstrap_USE_MODULES = 0
TOOL_NAME = rocketd _rocketd_reenable
rocketd_FILES = rocketd.c
rocketd_CFLAGS = -fblocks
rocketd_FRAMEWORKS = CoreFoundation
rocketd_INSTALL_PATH = /usr/libexec
rocketd_USE_MODULES = 0
rocketd_CODESIGN_FLAGS = -Sentitlements.xml
_rocketd_reenable_FILES = rocketd_reenable.c
_rocketd_reenable_INSTALL_PATH = /usr/libexec
_rocketd_reenable_USE_MODULES = 0
_rocketd_reenable_CODESIGN_FLAGS = -Sentitlements.xml
ADDITIONAL_CFLAGS = -std=c99 -Ioverlayheaders
# Support targeting 3.0 in packaged builds, but allow testing packages/builds to be missing support for old iOS versions
XCODE4_PATH ?= /Applications/Xcode_Legacy.app
XCODE6_PATH ?= /Volumes/Xcode/Xcode.app
XCODE9_PATH ?= /Volumes/Xcode_9.4.1/Xcode.app
ifeq ($(wildcard $(XCODE4_PATH)/.*),)
ADDITIONAL_CFLAGS += -Idefaultheaders
IPHONE_ARCHS = armv7 armv7s arm64 arm64e
TARGET_IPHONEOS_DEPLOYMENT_VERSION = 8.4
ifeq ($(FINALPACKAGE),1)
$(error Building final package requires a legacy Xcode install!)
endif
else
armv6_CFLAGS += -Ifullheaders
armv7_CFLAGS += -Ifullheaders
armv7s_CFLAGS += -Ifullheaders
arm64_CFLAGS += -Idefaultheaders
arm64e_CFLAGS += -Idefaultheaders
rocketd_IPHONE_ARCHS = armv6 arm64
_rocketd_reenable_IPHONE_ARCHS = armv6 arm64
IPHONE_ARCHS = armv6 armv7 armv7s arm64 arm64e
SDKVERSION_armv6 = 5.1
INCLUDE_SDKVERSION_armv6 = 8.4
TARGET_IPHONEOS_DEPLOYMENT_VERSION_armv6 = 3.0
TARGET_IPHONEOS_DEPLOYMENT_VERSION_armv7 = 4.0
TARGET_IPHONEOS_DEPLOYMENT_VERSION_armv7s = 6.0
TARGET_IPHONEOS_DEPLOYMENT_VERSION_arm64 = 7.0
TARGET_IPHONEOS_DEPLOYMENT_VERSION_arm64e = 12.0
TARGET_IPHONEOS_DEPLOYMENT_VERSION = 9.0
THEOS_PLATFORM_SDK_ROOT_armv6 = $(XCODE4_PATH)/Contents/Developer
THEOS_PLATFORM_SDK_ROOT_armv7 = $(XCODE6_PATH)/Contents/Developer
THEOS_PLATFORM_SDK_ROOT_armv7s = $(XCODE6_PATH)/Contents/Developer
THEOS_PLATFORM_SDK_ROOT_arm64 = $(XCODE9_PATH)/Contents/Developer
endif
include framework/makefiles/common.mk
include framework/makefiles/library.mk
include framework/makefiles/tool.mk
stage::
mkdir -p "$(THEOS_STAGING_DIR)/usr/include"
cp -a rocketbootstrap.h rocketbootstrap_dynamic.h "$(THEOS_STAGING_DIR)/usr/include"
plutil -convert binary1 "$(THEOS_STAGING_DIR)/Library/MobileSubstrate/DynamicLibraries/RocketBootstrap.plist"
plutil -convert binary1 "$(THEOS_STAGING_DIR)/Library/LaunchDaemons/com.rpetrich.rocketbootstrapd.plist"