Skip to content

Instantly share code, notes, and snippets.

@stek29
Last active December 9, 2021 04:09
Show Gist options
  • Save stek29/a90484f9d08dcbfe3947835e115f554e to your computer and use it in GitHub Desktop.
Save stek29/a90484f9d08dcbfe3947835e115f554e to your computer and use it in GitHub Desktop.
git://git.saurik.com/uikittools.git
diff --git a/makefile b/makefile
index bb00062cb52c..f9b011a8d94f 100644
--- a/makefile
+++ b/makefile
@@ -1,4 +1,4 @@
-uikittools = uiduid uicache uiopen gssc sbdidlaunch sbreload cfversion iomfsetgamma ldrestart
+uikittools = uiduid uicache uiopen gssc cfversion iomfsetgamma ldrestart
all: $(uikittools)
@@ -13,13 +13,13 @@ flags := -Os -Werror
flags += -framework CoreFoundation
flags += -framework Foundation
flags += -miphoneos-version-min=2.0
-flags += -arch armv6
+flags += -arch arm64
ldrestart := -std=c++11
gssc := -lobjc
iomfsetgamma := -I. $(private) -framework IOKit -framework IOMobileFramebuffer
sbdidlaunch := $(private) -framework SpringBoardServices
-uicache := -framework UIKit # XXX: UIKit -> MobileCoreServices
+uicache := -lc++ -framework UIKit # XXX: UIKit -> MobileCoreServices
uiduid := -framework UIKit
uiopen := -framework UIKit
uishoot := -framework UIKit
@@ -27,17 +27,19 @@ uishoot := -framework UIKit
uicache: csstore.cpp
extrainst_: csstore.cpp
+IGCC ?= xcrun -sdk iphoneos gcc
+
%: %.mm
- cycc -- -o $@ $^ $(flags) $($@)
- ldid -S$(wildcard $@.xml) $@
+ $(IGCC) -o $@ $^ $(flags) $($@)
+ ldid2 -S$(wildcard $@.xml) $@
%: %.cpp
- cycc -- -o $@ $^ $(flags) $($@)
- ldid -S$(wildcard $@.xml) $@
+ $(IGCC) -o $@ $^ $(flags) $($@)
+ ldid2 -S$(wildcard $@.xml) $@
%: %.c
- cycc -- -o $@ -x c $^ $(flags) $($@)
- ldid -S$(wildcard $@.xml) $@
+ $(IGCC) -o $@ -x c $^ $(flags) $($@)
+ ldid2 -S$(wildcard $@.xml) $@
package: all extrainst_
sudo rm -rf _
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment