Created
August 14, 2014 03:25
-
-
Save steelwheels/da7063e9fd6fe60941d1 to your computer and use it in GitHub Desktop.
The script to install static library for the iOS
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
# | |
# install.mk | |
# | |
INSTALL_PATH = $(HOME)/local | |
LIB_NAME = lib${PROJECT_NAME}.a | |
CONFIGURATION = Release | |
build_command = xcodebuild build -target $(PROJECT_NAME) \ | |
-project $(PROJECT_NAME).xcodeproj \ | |
-configuration $(CONFIGURATION) \ | |
ONLY_ACTIVE_ARCH=NO \ | |
BUILD_DIR=$(BUILD_DIR) \ | |
BUILD_ROOT=$(BUILD_ROOT) | |
all: build_library install_library install_header install_resource | |
build_library: dummy | |
$(build_command) -sdk iphoneos | |
$(build_command) -sdk iphonesimulator | |
install_library: dummy | |
mkdir -p $(INSTALL_PATH)/lib | |
lipo -create -output $(INSTALL_PATH)/lib/$(LIB_NAME) \ | |
${BUILD_DIR}/${CONFIGURATION}-iphoneos/$(LIB_NAME) \ | |
${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/$(LIB_NAME) | |
install_header: dummy | |
mkdir -p $(INSTALL_PATH)/include/$(PROJECT_NAME) | |
install -m 0644 ${BUILD_DIR}/${CONFIGURATION}-iphoneos/include/$(PROJECT_NAME)/*.h \ | |
$(INSTALL_PATH)/include/$(PROJECT_NAME) | |
install_resource: dummy | |
mkdir -p $(INSTALL_PATH)/resource | |
find $(PROJECT_DIR) -name "*.xib" -exec install -m 0644 "{}" $(INSTALL_PATH)/resource ";" | |
dummy: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment