2016-06-06 13:18:52 +03:00
|
|
|
TOP=../..
|
2016-05-26 16:06:52 +03:00
|
|
|
include $(TOP)/Make.config
|
|
|
|
|
|
|
|
export MD_APPLE_SDK_ROOT=$(shell dirname `dirname $(XCODE_DEVELOPER_ROOT)`)
|
2018-05-10 00:00:38 +03:00
|
|
|
export TargetFrameworkFallbackSearchPaths=$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks
|
|
|
|
export MSBuildExtensionsPathFallbackPathsOverride=$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild
|
2016-05-26 16:06:52 +03:00
|
|
|
export XamarinMacFrameworkRoot=$(MAC_DESTDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current
|
|
|
|
export XAMMAC_FRAMEWORK_PATH=$(MAC_DESTDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current
|
|
|
|
|
2017-09-27 11:48:51 +03:00
|
|
|
# VSfM sets XCODE_DEVELOPER_DIR_PATH, which confuses the command-line tools if it doesn't match xcode-select, so just unset it.
|
|
|
|
unexport XCODE_DEVELOPER_DIR_PATH
|
|
|
|
|
2017-01-17 19:06:10 +03:00
|
|
|
bin:
|
|
|
|
$(Q) mkdir -p bin
|
2016-05-26 16:06:52 +03:00
|
|
|
|
2017-01-17 19:06:10 +03:00
|
|
|
bin/SimpleClassDylib.dylib: bin
|
|
|
|
$(Q) xcrun clang -shared ../common/mac/SimpleClass.m -o bin/SimpleClassDylib.dylib -std=gnu99 -mmacosx-version-min=10.9 -framework Cocoa -lSystem
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
bin/SimpleClass\ Dylib.dylib: bin/SimpleClassDylib.dylib
|
|
|
|
$(Q) cp bin/SimpleClassDylib.dylib bin/SimpleClass\ Dylib.dylib
|
|
|
|
|
2017-08-24 10:42:08 +03:00
|
|
|
bin/SimpleClass.%.a: ../common/mac/SimpleClass.m bin
|
|
|
|
$(Q) clang -c $< -o bin/SimpleClass.$*.o -std=gnu99 -mmacosx-version-min=10.9 -arch $*
|
|
|
|
$(Q) xcrun ar -rcs $@ bin/SimpleClass.$*.o
|
|
|
|
|
|
|
|
bin/SimpleClassStatic.a: bin bin/SimpleClass.i386.a bin/SimpleClass.x86_64.a
|
|
|
|
$(Q) lipo -create bin/SimpleClass.i386.a bin/SimpleClass.x86_64.a -output $@
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
bin/Mobile-dynamic/MobileBinding.dll: bin/SimpleClassDylib.dylib
|
2018-11-16 22:24:35 +03:00
|
|
|
$(Q) $(SYSTEM_XIBUILD) -- $(XBUILD_VERBOSITY) MobileBinding/MobileBinding_dynamic.csproj
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
bin/Mobile-dynamic-newstyle/MobileBinding.dll: bin/SimpleClassDylib.dylib
|
2018-11-16 22:24:35 +03:00
|
|
|
$(Q) $(SYSTEM_XIBUILD) -- $(XBUILD_VERBOSITY) MobileBinding/MobileBinding_dynamic_newstyle.csproj
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
bin/Mobile-dynamic-spaces/Mobile\ Binding.dll: bin/SimpleClass\ Dylib.dylib
|
2018-11-16 22:24:35 +03:00
|
|
|
$(Q) $(SYSTEM_XIBUILD) -- $(XBUILD_VERBOSITY) MobileBinding/MobileBinding_dynamic_spaces.csproj
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
bin/Mobile-static/MobileBinding.dll: bin/SimpleClassStatic.a
|
2018-11-16 22:24:35 +03:00
|
|
|
$(Q) $(SYSTEM_XIBUILD) -- $(XBUILD_VERBOSITY) MobileBinding/MobileBinding_static.csproj
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
bin/Mobile-static-newstyle/MobileBinding.dll: bin/SimpleClassStatic.a
|
2018-11-16 22:24:35 +03:00
|
|
|
$(Q) $(SYSTEM_XIBUILD) -- $(XBUILD_VERBOSITY) MobileBinding/MobileBinding_static_newstyle.csproj
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
|
|
|
|
bin/Mobile-framework/MobileBinding.dll:
|
2018-11-16 22:24:35 +03:00
|
|
|
$(Q) $(SYSTEM_XIBUILD) -- $(XBUILD_VERBOSITY) MobileBinding/MobileBinding_framework.csproj
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
|
2017-06-14 16:33:18 +03:00
|
|
|
bin/MobileTest-static/MobileTestApp.app/Contents/MacOS/MobileTestApp: bin/Mobile-static/MobileBinding.dll
|
2018-11-16 22:24:35 +03:00
|
|
|
$(Q) $(SYSTEM_XIBUILD) -- $(XBUILD_VERBOSITY) MobileTestApp/MobileTestApp_static.csproj
|
2016-05-26 16:06:52 +03:00
|
|
|
|
2017-06-14 16:33:18 +03:00
|
|
|
bin/MobileTest-static-newstyle/MobileTestApp.app/Contents/MacOS/MobileTestApp: bin/Mobile-static-newstyle/MobileBinding.dll
|
2018-11-16 22:24:35 +03:00
|
|
|
$(Q) $(SYSTEM_XIBUILD) -- $(XBUILD_VERBOSITY) MobileTestApp/MobileTestApp_static_newstyle.csproj
|
2016-05-26 16:06:52 +03:00
|
|
|
|
2017-06-14 16:33:18 +03:00
|
|
|
bin/MobileTest-withLinker/MobileTestApp.app/Contents/MacOS/MobileTestApp: bin/Mobile-static/MobileBinding.dll
|
2018-11-16 22:24:35 +03:00
|
|
|
$(Q) $(SYSTEM_XIBUILD) -- $(XBUILD_VERBOSITY) MobileTestApp/MobileTestApp_WithLinker.csproj
|
2016-05-26 16:06:52 +03:00
|
|
|
|
2017-06-14 16:33:18 +03:00
|
|
|
bin/MobileTest-dynamic/MobileTestApp.app/Contents/MacOS/MobileTestApp: bin/Mobile-dynamic/MobileBinding.dll
|
2018-11-16 22:24:35 +03:00
|
|
|
$(Q) $(SYSTEM_XIBUILD) -- $(XBUILD_VERBOSITY) MobileTestApp/MobileTestApp_dynamic.csproj
|
2016-05-26 16:06:52 +03:00
|
|
|
|
2017-06-14 16:33:18 +03:00
|
|
|
bin/MobileTest-dynamic-newstyle/MobileTestApp.app/Contents/MacOS/MobileTestApp: bin/Mobile-dynamic-newstyle/MobileBinding.dll
|
2018-11-16 22:24:35 +03:00
|
|
|
$(Q) $(SYSTEM_XIBUILD) -- $(XBUILD_VERBOSITY) MobileTestApp/MobileTestApp_dynamic_newstyle.csproj
|
2016-05-26 16:06:52 +03:00
|
|
|
|
2017-06-14 16:33:18 +03:00
|
|
|
bin/MobileTest-dynamic-spaces/MobileTestApp.app/Contents/MacOS/MobileTestApp: bin/Mobile-dynamic-spaces/Mobile\ Binding.dll
|
2018-11-16 22:24:35 +03:00
|
|
|
$(Q) $(SYSTEM_XIBUILD) -- $(XBUILD_VERBOSITY) MobileTestApp/MobileTestApp_dynamic_spaces.csproj
|
2016-05-26 16:06:52 +03:00
|
|
|
|
2017-06-14 16:33:18 +03:00
|
|
|
bin/MobileTest-framework/MobileTestApp.app/Contents/MacOS/MobileTestApp: bin/Mobile-framework/MobileBinding.dll
|
2018-11-16 22:24:35 +03:00
|
|
|
$(Q) $(SYSTEM_XIBUILD) -- $(XBUILD_VERBOSITY) MobileTestApp/MobileTestApp_framework.csproj
|
2016-05-26 16:06:52 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-14 16:33:18 +03:00
|
|
|
test-static:: bin/MobileTest-static/MobileTestApp.app/Contents/MacOS/MobileTestApp bin/MobileTest-static-newstyle/MobileTestApp.app/Contents/MacOS/MobileTestApp
|
2016-05-26 16:06:52 +03:00
|
|
|
$(Q) ./bin/MobileTest-static/MobileTestApp.app/Contents/MacOS/MobileTestApp 2>&1 | grep 42 > /dev/null
|
|
|
|
$(Q) ./bin/MobileTest-static-newstyle/MobileTestApp.app/Contents/MacOS/MobileTestApp 2>&1 | grep 42 > /dev/null
|
|
|
|
|
2017-06-14 16:33:18 +03:00
|
|
|
test-dynamic:: bin/MobileTest-dynamic/MobileTestApp.app/Contents/MacOS/MobileTestApp bin/MobileTest-dynamic-newstyle/MobileTestApp.app/Contents/MacOS/MobileTestApp bin/MobileTest-dynamic-spaces/MobileTestApp.app/Contents/MacOS/MobileTestApp
|
2016-05-26 16:06:52 +03:00
|
|
|
$(Q) ./bin/MobileTest-dynamic/MobileTestApp.app/Contents/MacOS/MobileTestApp 2>&1 | grep 42 > /dev/null
|
|
|
|
$(Q) test -e bin/MobileTest-dynamic/MobileTestApp.app/Contents/MonoBundle/SimpleClassDylib.dylib
|
|
|
|
$(Q) ./bin/MobileTest-dynamic-newstyle/MobileTestApp.app/Contents/MacOS/MobileTestApp 2>&1 | grep 42 > /dev/null
|
|
|
|
$(Q) test -e bin/MobileTest-dynamic-newstyle/MobileTestApp.app/Contents/MonoBundle/SimpleClassDylib.dylib
|
|
|
|
$(Q) ./bin/MobileTest-dynamic-spaces/MobileTestApp.app/Contents/MacOS/MobileTestApp 2>&1 | grep 42 > /dev/null
|
|
|
|
$(Q) test -e bin/MobileTest-dynamic-spaces/MobileTestApp.app/Contents/MonoBundle/SimpleClass\ Dylib.dylib
|
|
|
|
|
2017-06-14 16:33:18 +03:00
|
|
|
test-framework:: bin/MobileTest-framework/MobileTestApp.app/Contents/MacOS/MobileTestApp
|
2016-05-26 16:06:52 +03:00
|
|
|
$(Q) test -e bin/MobileTest-framework/MobileTestApp.app/Contents/Frameworks/iTunesLibrary.framework
|
|
|
|
|
2017-06-14 16:33:18 +03:00
|
|
|
test-withLinker:: bin/MobileTest-withLinker/MobileTestApp.app/Contents/MacOS/MobileTestApp
|
2016-05-26 16:06:52 +03:00
|
|
|
$(Q) ./bin/MobileTest-withLinker/MobileTestApp.app/Contents/MacOS/MobileTestApp 2>&1 | grep 42 > /dev/null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
all-local:: test-static test-dynamic test-framework test-withLinker
|
|
|
|
|
|
|
|
clean-local::
|
|
|
|
$(Q) rm -rf ./bin ./obj
|