Last active
August 29, 2015 14:04
-
-
Save shoken0x/4c84bf62ee7a52092e0a to your computer and use it in GitHub Desktop.
Makefile for Swift Extensions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PWD=$(shell pwd) | |
MODULE_NAME=YOUR_PROJECT_NAME | |
LIB_NAME=lib$(MODULE_NAME).dylib | |
LIB_PATH=$(PWD)/$(LIB_NAME) | |
SWIFT_MODULE_PATH=$(PWD)/$(MODULE_NAME).swiftmodule | |
module: clean | |
xcrun -sdk macosx swift -emit-library -o $(LIB_PATH) -Xlinker -install_name -Xlinker @rpath/$(LIB_NAME) -emit -module -emit-module-path $(SWIFT_MODULE_PATH) -module-name $(MODULE_NAME) -module-link-name $(MODULE_NAME) *.swift | |
clean: | |
rm -f $(LIB_NAME) $(MODULE_NAME).swiftdoc $(MODULE_NAME).swiftmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment