aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTeddy Wing2018-11-06 06:00:11 +0100
committerTeddy Wing2018-11-06 06:00:11 +0100
commite9b638521e7c450e4947090d3672aab852c8e758 (patch)
tree9801e9c09b73f067af99c0b43f969f74434326b1 /Makefile
parent2c4c9e9e750cfe8c78fc15e07a405cfeef46d5c8 (diff)
downloadDomeKey-e9b638521e7c450e4947090d3672aab852c8e758.tar.bz2
Add file size optimisations to Release build
* Remove `dome-key-map/target/debug` from Release library search paths. This was causing the Release build to link against the debug version of dome-key-map, resulting in a 25 Mb binary. * Strip debug symbols * Turn on link-time optimisation This takes the Release binary down to 1.5 Mb. Added an `archive` target to the Makefile. This does additional optimisations (maybe stripping symbols?), and gives us a final binary size of 1.1 Mb. Much better.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 02b2a62..f2029ff 100644
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,17 @@ $(RUST_LIB_RELEASE): $(RUST_SOURCE_FILES)
$(MAKE) -C $(RUST_DIR) $(RUST_LOCAL_LIB_RELEASE)
+# Archive
+
+.PHONY: archive
+archive: clean-release
+ xcodebuild -project DomeKey.xcodeproj \
+ -scheme DomeKey \
+ -configuration Release \
+ archive \
+ -archivePath build/Release.xcarchive
+
+
# Sounds
DomeKey/sound_data.h: sounds/*.mp3