-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (58 loc) · 1.85 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
# Makefile for gcc compiler for iPhone
PROJECTNAME=CopierciN
CC=arm-apple-darwin9-gcc
LD=$(CC)
LDFLAGS = -arch arm -lobjc -lsqlite3
LDFLAGS += -framework CoreFoundation
LDFLAGS += -framework Foundation
LDFLAGS += -framework UIKit
LDFLAGS += -framework AddressBook
LDFLAGS += -framework GraphicsServices
LDFLAGS += -L"/usr/lib"
LDFLAGS += -F"/System/Library/Frameworks"
LDFLAGS += -F"/System/Library/PrivateFrameworks"
CFLAGS = -I"/private/var/include"
#CFLAGS = -I"/private/var/mobile/Development/2.0FrameworkHeaders"
CFLAGS += -I"/usr/include"
CFLAGS += -F"/System/Library/Frameworks"
CFLAGS += -F"/System/Library/PrivateFrameworks"
CFLAGS += -DDEBUG -O3 -Wall -std=c99 -funroll-loops
CFLAGS += -DMAC_OS_X_VERSION_MAX_ALLOWED=1050
BUILDDIR=./build/2.0
SRCDIR=./Classes
RESDIR=./Resources
OBJS=$(patsubst %.m,%.o,$(wildcard $(SRCDIR)/*.m))
OBJS+=$(patsubst %.c,%.o,$(wildcard $(SRCDIR)/*.c))
OBJS+=$(patsubst %.cpp,%.o,$(wildcard $(SRCDIR)/*.cpp))
RESOURCES=$(wildcard $(RESDIR)/*)
APPFOLDER=Copiercin.app
INSTALLFOLDER=Copiercin.app
all: dist
$(PROJECTNAME): $(OBJS)
$(LD) $(LDFLAGS) -o $@ $^
%.o: %.m
$(CC) -c $(CFLAGS) $< -o $@
%.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
%.o: %.cpp
$(CC) -c $(CPPFLAGS) $< -o $@
dist: $(PROJECTNAME)
/bin/rm -rf $(BUILDDIR)
/bin/mkdir -p $(BUILDDIR)/$(APPFOLDER)
/bin/cp $(RESDIR)/* $(BUILDDIR)/$(APPFOLDER)
/bin/cp Info.plist $(BUILDDIR)/$(APPFOLDER)/Info.plist
@echo "APPL????" > $(BUILDDIR)/$(APPFOLDER)/PkgInfo
/usr/bin/ldid -S $(PROJECTNAME)
rm /Applications/Copiercin.app/copiercin
/bin/cp $(PROJECTNAME) /Applications/Copiercin.app/copiercin
install: dist
/bin/cp -r $(BUILDDIR)/$(APPFOLDER) /Applications/$(INSTALLFOLDER)
@echo "Application $(INSTALLFOLDER) installed"
appLoad
uninstall:
/bin/rm -fr /Applications/$(INSTALLFOLDER)
appLoad 1
clean:
@rm -f $(SRCDIR)/*.o
@rm -rf $(BUILDDIR)
@rm -f $(PROJECTNAME)