summaryrefslogtreecommitdiff
path: root/data/uikittools/telesphoreo.diff
blob: 73beb99dca71842bef327d49e1183e535df9bdc2 (plain)
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
diff --git a/makefile b/makefile
index 6764f73..055bbf8 100644
--- a/makefile
+++ b/makefile
@@ -1,4 +1,6 @@
 uikittools = uiduid uicache uiopen gssc sbdidlaunch sbreload cfversion iomfsetgamma ldrestart ecidecid
+CC = $(PKG_TARG)-gcc
+CPP = $(PKG_TARG)-g++
 
 all: $(uikittools)
 
@@ -9,11 +11,9 @@ clean:
 
 private := -F/System/Library/PrivateFrameworks
 
-flags := -Os -Werror
+flags := -Os -Werror -Wno-deprecated-declarations
 flags += -framework CoreFoundation
 flags += -framework Foundation
-flags += -miphoneos-version-min=2.0
-flags += -arch armv6
 
 ldrestart := -std=c++11
 gssc := -lobjc
@@ -28,31 +28,29 @@ uicache: csstore.cpp
 extrainst_: csstore.cpp
 
 %: %.m
-	cycc -- -o $@ -x c $^ $(flags) $($@)
+	$(CC) -o $@ $^ $(flags) $($@)
-	ldid -S$(wildcard $@.xml) $@
+	@if [ ! -z "$(wildcard $@.xml)" ]; then \
+		ldid -S$(wildcard $@.xml) $@; \
+	fi
 
 %: %.mm
-	cycc -- -o $@ $^ $(flags) $($@)
-	ldid -S$(wildcard $@.xml) $@
+	$(CPP) -o $@ $^ $(flags) $($@)
+	@if [ ! -z "$(wildcard $@.xml)" ]; then \
+		ldid -S$(wildcard $@.xml) $@; \
+	fi
 
 %: %.cpp
-	cycc -- -o $@ $^ $(flags) $($@)
-	ldid -S$(wildcard $@.xml) $@
+	$(CPP) -o $@ $^ $(flags) $($@)
+	@if [ ! -z "$(wildcard $@.xml)" ]; then \
+		ldid -S$(wildcard $@.xml) $@; \
+	fi
 
 %: %.c
-	cycc -- -o $@ -x c $^ $(flags) $($@)
-	ldid -S$(wildcard $@.xml) $@
-
-package: all extrainst_
-	sudo rm -rf _
-	mkdir -p _/usr/bin
-	cp -a $(filter-out %.dylib,$(uikittools)) _/usr/bin
-	mkdir -p _/DEBIAN
-	./control.sh _ >_/DEBIAN/control
-	cp -a extrainst_ _/DEBIAN/
-	mkdir -p debs
-	ln -sf debs/uikittools_$$(./version.sh)_iphoneos-arm.deb uikittools.deb
-	sudo chown -R 0 _
-	sudo chgrp -R 0 _
-	dpkg-deb -b _ uikittools.deb
-	readlink uikittools.deb
+	$(CC) -o $@ -x c $^ $(flags) $($@)
+	@if [ ! -z "$(wildcard $@.xml)" ]; then \
+		ldid -S$(wildcard $@.xml) $@; \
+	fi
+
+install: all
+	mkdir -p $(DESTDIR)/usr/bin
+	cp -a $(filter-out %.dylib,$(uikittools)) $(DESTDIR)/usr/bin