-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (50 loc) · 1.69 KB
/
Makefile
File metadata and controls
64 lines (50 loc) · 1.69 KB
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
DEBUG = 1
#用于调试的设备地址
THEOS_DEVICE_IP = localhost
THEOS_DEVICE_PORT = 2222
ARCHS = arm64
#用于编译的SDK和支持的ios最低版本
TARGET = iphone:latest:13.0
include $(THEOS)/makefiles/common.mk
# 工程名称
TWEAK_NAME = WeChatBot
# 采用ARC内存管理
WeChatBot_CFLAGS = -fobjc-arc
#头文件
WeChatBot_OBJCFLAGS += -I./WeChatBot/Headers/wechatHeaders/
WeChatBot_OBJCFLAGS += -I./WeChatBot/Headers/
#忽略OC警告
WeChatBot_OBJCFLAGS += -Wno-deprecated-declarations -Wno-unused-variable
#编译的实现文件
WeChatBot_FILES = Tweak.xmi
WeChatBot_FILES += $(wildcard WeChatBot/Classes/*.mm) $(wildcard WeChatBot/Classes/*/*.mm)
WeChatBot_FILES += $(wildcard WeChatBot/Classes/*.m) $(wildcard WeChatBot/Classes/*/*.m)
#导入系统的frameworks
WeChatBot_FRAMEWORKS = Foundation UIKit
#导入系统库
WeChatBot_LIBRARIES = stdc++ c++
#导入第三方Frameworks, 动态库需特殊处理
WeChatBot_LDFLAGS += -F./Libraries/dynamic -F./Libraries/static # 识别的库实现
WeChatBot_CFLAGS += -F./Libraries/dynamic -F./Libraries/static # 头文件识别
WeChatBot_FRAMEWORKS += WCBFWStatic WCBFWDynamic
#导入第三方lib
WeChatBot_LDFLAGS += -L./Libraries/dynamic -L./Libraries/static # 识别的库实现
WeChatBot_CFLAGS += -I./Libraries/include # 头文件识别
WeChatBot_LIBRARIES += WCBStatic WCBDyLib
include $(THEOS_MAKE_PATH)/tweak.mk
before-package::
sh bin/check_dynamic_lib.sh #动态库处理脚本
cp ./bin/postinst .theos/_/DEBIAN/
cp ./bin/postrm .theos/_/DEBIAN/
chmod 755 .theos/_/DEBIAN/postinst
chmod 755 .theos/_/DEBIAN/postrm
after-install::
install.exec "killall -9 WeChat"
p::
make package
c::
make clean
i::
make
make p
make install