diff options
author | Teddy Wing | 2018-11-06 06:00:11 +0100 |
---|---|---|
committer | Teddy Wing | 2018-11-06 06:00:11 +0100 |
commit | e9b638521e7c450e4947090d3672aab852c8e758 (patch) | |
tree | 9801e9c09b73f067af99c0b43f969f74434326b1 /Makefile | |
parent | 2c4c9e9e750cfe8c78fc15e07a405cfeef46d5c8 (diff) | |
download | DomeKey-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-- | Makefile | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 |