-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
89 lines (71 loc) · 1.88 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
TARGET = iChabber
VERSION := r`unset LC_ALL ; unset LANG ; svn info | grep Revision | cut -f2 -d':' | sed 's/ //g'`
LANGUAGES=$(wildcard *.lproj)
CC = arm-apple-darwin-gcc
LD = $(CC)
CFLAGS = -DHAVE_OPENSSL -DDEBUG=1 -Wall -O2
LDFLAGS = -ObjC -lobjc \
-framework CoreFoundation \
-framework Foundation \
-framework UIKit \
-framework LayerKit \
-framework CoreGraphics \
-framework GraphicsServices \
-framework Celestial \
-framework CoreTelephony \
-framework Message \
-framework IOKit \
-framework AppSupport \
-lssl -lcrypto
LDFLAGS_FRAMEWORKSDIR=-F/opt/iphone-sdk/share/heavenly/System/Library/
all: $(TARGET)
genlocalestr:
for i in $(LANGUAGES); do \
genstrings -aq -o $$i/ *.m ;\
done
OBJS = lib/connwrap/connwrap.o \
lib/server.o \
lib/socket.o \
lib/utf8.o \
lib/utils.o \
lib/conf.o
APPOBJS = main.o \
iCabberApp.o \
iCabberView.o \
MyPrefs.o \
UserView.o \
NewMessage.o \
Buddy.o \
Notifications.o \
EyeCandy.o \
BuddyAction.o \
IconSet.o \
BuddyCell.o \
resolveHostname.o \
NSLogX.o
$(TARGET): version.h $(APPOBJS) $(OBJS)
$(LD) $(LDFLAGS_FRAMEWORKSDIR) $(LDFLAGS) -o $@ $^
version.h:
echo "#define APP_VERSION \"$(VERSION)\"" > $@
%.o: %.m
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
clean:
rm -f $(TARGET) $(OBJS) $(APPOBJS) $(TARGET)-$(VERSION).zip version.h
rm -rf $(TARGET).app
upload: $(TARGET)
scp $(TARGET) root@sashz-iphone:/Applications/iChabber.app/
package: $(TARGET)
rm -rf $(TARGET).app
mkdir -p $(TARGET).app
mkdir -p $(TARGET).app/smiles
cp $(TARGET) $(TARGET).app/$(TARGET)
cp Info.plist $(TARGET).app/Info.plist
cp icons/*.png $(TARGET).app/
cp sounds/*.aiff $(TARGET).app/
cp smiles/*.png $(TARGET).app/smiles/
for i in $(LANGUAGES); do \
mkdir -p $(TARGET).app/$$i; \
cp $$i/Localizable.strings $(TARGET).app/$$i; \
done
dist: package
zip -9r $(TARGET)-$(VERSION).zip $(TARGET).app/