diff options
-rw-r--r-- | sdks/Make.config.sample | 8 | ||||
-rw-r--r-- | sdks/paths.mk | 36 |
2 files changed, 44 insertions, 0 deletions
diff --git a/sdks/Make.config.sample b/sdks/Make.config.sample new file mode 100644 index 00000000000..051d2c23da8 --- /dev/null +++ b/sdks/Make.config.sample @@ -0,0 +1,8 @@ +#This is a sample file of all options that can be used by a Make.config file. + + +#Disables building Android +#DISABLE_ANDROID = 1 + +#Disables building iOS +#DISABLE_IOS = 1 diff --git a/sdks/paths.mk b/sdks/paths.mk index ad8d5558d57..e00f9cb5581 100644 --- a/sdks/paths.mk +++ b/sdks/paths.mk @@ -1,4 +1,40 @@ +-include $(TOP)/sdks/Make.config + +#Default paths + SDK_DIR = $(abspath $(HOME)/Library/Developer/Xamarin/android-sdk-macosx/) NDK_DIR = $(abspath $(HOME)/Library/Developer/Xamarin/android-ndk/android-ndk-r14b) XCODE_DIR = /Applications/Xcode.app/Contents/Developer + +#Probe for alternative paths + +#On some systems the sdk is named mac_x86 +ifeq ($(wildcard $(SDK_DIR)/tools),) +SDK_DIR = $(abspath $(HOME)/Library/Developer/Xamarin/android-sdk-mac_x86/) +endif + +#Latest XS installs NDK in this PATH +ifeq ($(wildcard $(NDK_DIR)/tools),) +NDK_DIR = $(abspath $(HOME)/Library/Developer/Xamarin/android-sdk-mac_x86/ndk-bundle) +endif + +#Error if tools are not found + +ifndef DISABLE_ANDROID +ifeq ($(wildcard $(SDK_DIR)/tools),) +$(error Could not find Android SDK in $(SDK_DIR)) +endif + +ifeq ($(wildcard $(NDK_DIR)),) +$(error Could not find Android NDK in $(NDK_DIR)) +endif + +endif + +ifndef DISABLE_IOS +ifeq ($(wildcard $(XCODE_DIR)),) +$(error Could not find XCode in $(XCODE_DIR)) +endif + +endif
\ No newline at end of file |