Created
January 11, 2013 13:26
-
-
Save hiroakit/4510639 to your computer and use it in GitHub Desktop.
ユニバーサルな静的ライブラリを作るmakefileを作りました.
https://github.com/Inferis/ViewDeck のコミットab62d8e6b0a4a8d1e606f58bebf4cf0e8cc2816eを使っています. なお,上記のコミットには静的ライブラリを生成できるプロジェクトファイルが含まれていません.
従って,このmakefileを実行する前に,自分でプロジェクトファイルを用意する必要があります.
(Xcodeで新規プロジェクト生成時に選択できるCocoa Touch Static Libraryを利用するのが楽だと思います)
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
TARGET = ViewDeck | |
PROJECT = $(TARGET).xcodeproj | |
LIB_NAME = lib$(TARGET) | |
BUILD_CONFIG = Release | |
BUILD_DIR = ./build | |
OUTPUT_DIR = $(BUILD_DIR) | |
OUTPUT_FILE = $(TARGET) | |
default: init | |
init: | |
@echo "For iOS Device ------------- \n" | |
xcodebuild -configuration $(BUILD_CONFIG) -sdk iphonesimulator6.0 -target $(TARGET) -project $(PROJECT) | |
@echo "\n" | |
@echo "For iOS Simulator ---------- \n" | |
xcodebuild -configuration $(BUILD_CONFIG) -sdk iphoneos6.0 -target $(TARGET) -project $(PROJECT) | |
@echo "\n" | |
@echo "Create Universal library ----- \n" | |
lipo -create "$(BUILD_DIR)/$(BUILD_CONFIG)-iphoneos/$(LIB_NAME).a" "$(BUILD_DIR)/$(BUILD_CONFIG)-iphonesimulator/$(LIB_NAME).a" -output $(OUTPUT_DIR)/$(OUTPUT_FILE).a | |
@echo "\n" | |
@echo "make end" | |
clean: | |
-rm -rf build/* | |
ALL: clean init |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
課題として,以下を残す