This repository has been archived by the owner on Jan 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
62 lines (47 loc) · 2.36 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
export TARGET = iphone:latest:5.0
export ADDITIONAL_CFLAGS = -Wextra -Wno-unused-parameter
INSTALL_TARGET_PROCESSES = Preferences
DOCS_STAGING_DIR = _docs
DOCS_OUTPUT_PATH = docs
include $(THEOS)/makefiles/common.mk
FRAMEWORK_NAME = Opener
Opener_FILES = $(wildcard *.x) $(wildcard *.m)
Opener_PUBLIC_HEADERS = Opener.h HBLibOpener.h HBLOHandler.h
Opener_FRAMEWORKS = MobileCoreServices
Opener_PRIVATE_FRAMEWORKS = SpringBoardServices
Opener_EXTRA_FRAMEWORKS = Cephei CydiaSubstrate
Opener_CFLAGS = -include Global.h -fobjc-arc
Opener_INSTALL_PATH = /usr/lib/Opener
SUBPROJECTS = openerd client prefs
include $(THEOS_MAKE_PATH)/framework.mk
include $(THEOS_MAKE_PATH)/aggregate.mk
after-Opener-stage::
@# create directories
$(ECHO_NOTHING)mkdir -p \
$(THEOS_STAGING_DIR)/DEBIAN $(THEOS_STAGING_DIR)/usr/lib \
$(THEOS_STAGING_DIR)/Library/Frameworks \
$(THEOS_STAGING_DIR)/Library/LaunchDaemons \
$(THEOS_STAGING_DIR)/Library/MobileSubstrate/DynamicLibraries$(ECHO_END)
@# {pre,post}inst -> /DEBIAN/
$(ECHO_NOTHING)cp preinst postinst prerm postrm $(THEOS_STAGING_DIR)/DEBIAN$(ECHO_END)
@# /Library/Frameworks/Opener.framework -> /usr/lib/Opener/Opener.framework
$(ECHO_NOTHING)ln -s /usr/lib/Opener/Opener.framework $(THEOS_STAGING_DIR)/Library/Frameworks/Opener.framework$(ECHO_END)
@# /usr/lib/Opener/Opener.framework/Opener -> /Library/MobileSubstrate/DynamicLibraries/libopener.dylib
$(ECHO_NOTHING)ln -s /usr/lib/Opener/Opener.framework/Opener $(THEOS_STAGING_DIR)/Library/MobileSubstrate/DynamicLibraries/libopener.dylib$(ECHO_END)
@# libopener.plist -> /Library/MobileSubstrate/DynamicLibraries/libopener.plist
$(ECHO_NOTHING)cp libopener.plist $(THEOS_STAGING_DIR)/Library/MobileSubstrate/DynamicLibraries/libopener.plist$(ECHO_END)
$(ECHO_NOTHING)cp openerd/ws.hbang.openerd.plist $(THEOS_STAGING_DIR)/Library/LaunchDaemons$(ECHO_END)
after-install::
ifeq ($(RESPRING),1)
install.exec "spring 'prefs:root=Opener'"
else
install.exec "uiopen 'prefs:root=Opener'"
endif
docs:: stage
$(ECHO_NOTHING)ln -s $(THEOS_VENDOR_INCLUDE_PATH) $(THEOS_STAGING_DIR)/usr/lib/include$(ECHO_END)
$(ECHO_BEGIN)$(PRINT_FORMAT_MAKING) "Generating docs"; jazzy --module-version $(THEOS_PACKAGE_BASE_VERSION)$(ECHO_END)
$(ECHO_NOTHING)rm $(THEOS_STAGING_DIR)/usr/lib/include$(ECHO_END)
$(ECHO_NOTHING)rm docs/undocumented.json$(ECHO_END)
ifeq ($(FINALPACKAGE),1)
before-package:: docs
endif