-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmakefile
48 lines (35 loc) · 1.78 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
CC=clang
LD=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
MIG=mig
all: processorcontrol server client lsserv notifications libtstlib.dylib injectee inject
processorcontrol: processorcontrol.o
$(LD) $< -macosx_version_min 10.8 -framework System -o $@
server: server.o Info.plist
$(LD) $(filter %.o, $<) -sectcreate __TEXT __info_plist Info.plist -macosx_version_min 10.8 -framework System -o $@
client: client.o
$(LD) $< -macosx_version_min 10.8 -framework System -o $@
exceptionhandler: exceptions.c /usr/include/mach/mach_exc.defs
$(MIG) /usr/include/mach/mach_exc.defs
$(CC) -c exceptions.c -o exceptions.o -Wall -Werror
$(CC) -c mach_excServer.c -o mach_excServer.o
$(LD) exceptions.o mach_excServer.o -macosx_version_min 10.8 -framework System -lcapstone -o $@
notifications: notifications.c include/UserNotification/UNDRequest.defs
$(MIG) -I./include/ -user UNDRequest.c include/UserNotification/UNDRequest.defs
rm UNDRequestServer.c
$(CC) -c notifications.c -o notifications.o -I./include/ -Wall -Werror
$(CC) -c UNDRequest.c -o UNDRequest.o -I./include/
$(LD) UNDRequest.o notifications.o -macosx_version_min 10.8 -framework System -o $@
lsserv: lsserv.o
$(LD) $< -macosx_version_min 10.8 -framework System -o $@
libtstlib.dylib: tstlib.o
$(LD) $< -macosx_version_min 10.8 -framework System -dylib -o $@
injectee: injectee.o
$(LD) $< -macosx_version_min 10.8 -framework System -o $@
inject: inject.o Info2.plist
$(LD) $< -sectcreate __TEXT __info_plist Info2.plist -macosx_version_min 10.8 -framework System -o $@
codesign -s inject_codesign $@
%.o: %.c
$(CC) -c $< -o $@ -Wall -Werror
.PHONY: all clean
clean:
rm -f processorcontrol processorcontrol.o server.o client.o server client inject injectee exceptionhandler libtstlib.dylib lsserv