urho/MakeiOS

70 строки
4.1 KiB
Plaintext
Исходник Постоянная ссылка Обычный вид История

# armv7s, armv7, arm64, i386, x86_64
2015-09-07 22:25:54 +03:00
ARCH=i386
2018-11-11 02:14:36 +03:00
SDK_VER=12.1
2016-01-18 21:38:35 +03:00
MIN_IOS_VER=8.0
2018-02-20 02:42:35 +03:00
# MIN_IOS_VER must be 8.0 or higher
OUTPUT_DIR=Bin/iOS
URHO_DIR=Urho3D/Urho3D_iOS
URHO_SOURCE_DIR=Urho3D/Source
2015-09-06 18:03:47 +03:00
2015-09-08 16:28:22 +03:00
ifeq ($(ARCH), i386)
2015-09-07 22:25:54 +03:00
TARGET=iPhoneSimulator
else ifeq ($(ARCH), x86_64)
TARGET=iPhoneSimulator
2015-09-08 16:28:22 +03:00
else
TARGET=iPhoneOS
endif
URHO_FLAGS=-I$(URHO_DIR)/include -I$(URHO_DIR)/include/Urho3D/ThirdParty -I$(URHO_DIR)/include/Urho3D/ThirdParty/Bullet -DURHO3D_NEON -DSTBI_NEON -DURHO3D_FILEWATCHER -DURHO3D_PROFILING -DURHO3D_LOGGING -DKNET_UNIX -DURHO3D_OPENGL -DURHO3D_NAVIGATION -DURHO3D_NETWORK -DURHO3D_PHYSICS -DURHO3D_URHO2D -DURHO3D_STATIC_DEFINE -DIOS
URHO_LIBS=-framework AudioToolbox -framework AVFoundation -framework CoreAudio -framework CoreGraphics -framework Foundation -framework OpenGLES -framework QuartzCore -framework UIKit -framework GameController -framework CoreMotion -Wl,-search_paths_first -Wl,-headerpad_max_install_names $(URHO_DIR)/lib/libUrho3D.a -ldl -lpthread
2017-09-06 03:44:25 +03:00
CXXFLAGS=-g -stdlib=libc++ -std=c++0x -Wno-address-of-temporary -Wno-return-type-c-linkage -Wno-c++11-extensions $(URHO_FLAGS)
2015-09-06 18:03:47 +03:00
XCODE_BASE=/Applications/Xcode.app/Contents
TARGET_BASE=$(XCODE_BASE)/Developer/Platforms/$(TARGET).platform
XCODE_FRAMEWORKS=$(TARGET_BASE)/Developer/SDKs/$(TARGET)$(SDK_VER).sdk/System/Library/Frameworks/
XCODE_INCLUDES=$(TARGET_BASE)/Developer/SDKs/$(TARGET)$(SDK_VER).sdk/usr/include
XCODE_SDK=$(XCODE_BASE)/Developer/Platforms/$(TARGET).platform/Developer/SDKs/$(TARGET)$(SDK_VER).sdk
CPP=clang++ -arch $(ARCH) -F$(XCODE_FRAMEWORKS) -I$(XCODE_INCLUDES) -fapplication-extension -mios-simulator-version-min=$(MIN_IOS_VER) -miphoneos-version-min=$(MIN_IOS_VER) -isysroot $(XCODE_SDK) $(CXXFLAGS) -msse3
2015-09-06 18:03:47 +03:00
Urho3D_IOS:
rm -rf $(URHO_DIR) && mkdir -p $(URHO_DIR) && $(URHO_SOURCE_DIR)/./cmake_ios.sh $(URHO_DIR) -DURHO3D_PCH=0 -DIPHONEOS_DEPLOYMENT_TARGET=$(MIN_IOS_VER) -DURHO3D_TOOLS=0 -DURHO3D_LUA=0 -DURHO3D_WEBP=0 -DURHO3D_ANGELSCRIPT=0 -DURHO3D_C++11=1
libUrho3D.a: Urho3D_IOS
ifeq ($(ARCH), i386)
cd $(URHO_DIR) && xcodebuild -arch "i386" IPHONEOS_DEPLOYMENT_TARGET=$(MIN_IOS_VER) ONLY_ACTIVE_ARCH=NO VALID_ARCHS="i386" -target Urho3D -sdk iphonesimulator$(SDK_VER)
else ifeq ($(ARCH), x86_64)
cd $(URHO_DIR) && xcodebuild -arch "x86_64" IPHONEOS_DEPLOYMENT_TARGET=$(MIN_IOS_VER) ONLY_ACTIVE_ARCH=NO VALID_ARCHS="x86_64" -target Urho3D -sdk iphonesimulator$(SDK_VER)
else
cd $(URHO_DIR) && xcodebuild ARCHS=$(ARCH) IPHONEOS_DEPLOYMENT_TARGET=$(MIN_IOS_VER) ONLY_ACTIVE_ARCH=NO -target Urho3D -configuration Release
endif
2015-09-06 18:03:47 +03:00
MakeBinDirectory:
mkdir -p $(OUTPUT_DIR)
2015-11-10 22:12:16 +03:00
libmono-urho.dylib: MakeBinDirectory libUrho3D.a vector.o binding.o glue.o events.o ApplicationProxy.o
mkdir -p $(OUTPUT_DIR) && $(CPP) -dynamiclib -g -o $(OUTPUT_DIR)/libmono-urho_$(ARCH).dylib -g $(URHO_LIBS) $(OUTPUT_DIR)/binding.o $(OUTPUT_DIR)/glue.o $(OUTPUT_DIR)/vector.o $(OUTPUT_DIR)/events.o $(OUTPUT_DIR)/ApplicationProxy.o
2015-09-06 18:03:47 +03:00
fat-libmono-urho.dylib:
make libmono-urho.dylib -f MakeiOS ARCH="i386" && make libmono-urho.dylib -f MakeiOS ARCH="x86_64" && make libmono-urho.dylib -f MakeiOS ARCH="armv7" && make libmono-urho.dylib -f MakeiOS ARCH="arm64" && cd $(OUTPUT_DIR) && lipo -create libmono-urho_i386.dylib libmono-urho_x86_64.dylib libmono-urho_armv7.dylib libmono-urho_arm64.dylib -output libmono-urho.dylib
Urho.framework: fat-libmono-urho.dylib
rm -rf $(OUTPUT_DIR)/Urho.framework && mkdir $(OUTPUT_DIR)/Urho.framework && cp Bindings/iOS/Urho.framework.plist $(OUTPUT_DIR)/Urho.framework/Info.plist && cd $(OUTPUT_DIR) && cp libmono-Urho.dylib Urho.framework/Urho && install_name_tool -id @rpath/Urho.framework/Urho Urho.framework/Urho && zip -r Urho.framework.zip Urho.framework
binding.o:
$(CPP) -c -o $(OUTPUT_DIR)/binding.o Bindings/Portable/Generated/binding.cpp
2015-09-06 18:03:47 +03:00
glue.o:
$(CPP) -c -o $(OUTPUT_DIR)/glue.o Bindings/Native/glue.cpp
2015-09-06 18:03:47 +03:00
vector.o:
$(CPP) -c -o $(OUTPUT_DIR)/vector.o Bindings/Native/vector.cpp
2015-09-06 18:03:47 +03:00
events.o:
$(CPP) -c -o $(OUTPUT_DIR)/events.o Bindings/Portable/Generated/events.cpp
2015-09-06 18:03:47 +03:00
ApplicationProxy.o:
$(CPP) -c -o $(OUTPUT_DIR)/ApplicationProxy.o Bindings/Native/ApplicationProxy.cpp
2016-01-26 16:01:21 +03:00
Urho.iOS.dll:
/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool -v build "--configuration:Release" -p:Urho.iOS Urho.sln