-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
54 lines (42 loc) · 1.27 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
ARCH = armv6
GCCVER = 4.2.1
SDKVER = 3.0
SDK = /Developer/Platforms/iPhoneOS.platform/Developer
SYSROOT = $(SDK)/SDKs/iPhoneOS$(SDKVER).sdk
CC = $(SDK)/usr/bin/arm-apple-darwin9-gcc-$(GCCVER)
CPP = $(SDK)/usr/bin/arm-apple-darwin9-g++-$(GCCVER)
LD = $(CC)
LDFLAGS += -framework CoreFoundation
LDFLAGS += -framework Foundation
LDFLAGS += -L"$(SDK)/usr/lib"
LDFLAGS += -F"$(SDK)/System/Library/Frameworks"
LDFLAGS += -F"$(SDK)/System/Library/PrivateFrameworks"
LDFLAGS += -lobjc
LDFLAGS += -dynamiclib
LDFLAGS += -march=$(ARCH)
LDFLAGS += -mcpu=arm1176jzf-s
LDFLAGS += -fobjc-call-cxx-cdtors
LDFLAGS += -isysroot $(SYSROOT)
CFLAGS += -I"$(SDK)/usr/lib/gcc/arm-apple-darwin9/$(GCCVER)/include"
CFLAGS += -I"$(SYSROOT)/usr/include"
CFLAGS += -I"$(SDK)/usr/include"
CFLAGS += -F"$(SYSROOT)/System/Library/Frameworks"
CFLAGS += -F"$(SYSROOT)/System/Library/PrivateFrameworks"
CFLAGS += -DDEBUG -std=c99
CFLAGS += -Diphoneos_version_min=2.2
CFLAGS += -dynamiclib
CFLAGS += -march=$(ARCH)
CFLAGS += -mcpu=arm1176jzf-s
CPPFLAGS = $(CFLAGS)
CPPFLAGS += -fobjc-call-cxx-cdtors
TARGET = Toggle.dylib
all: $(TARGET)
$(TARGET): MailFetchToggle.o
$(LD) $(LDFLAGS) -o $@ $^
ldid -S $(TARGET)
%.o: %.m
$(CC) -c $(CFLAGS) $< -o $@
%.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
clean:
rm -f *.o $(TARGET)