From 6cebb51747bfc8b0359c0a875cf2bf7ded58169f Mon Sep 17 00:00:00 2001 From: Dan Swick Date: Fri, 15 Nov 2019 11:00:15 -0800 Subject: [PATCH] add check for darwin systems to support local javadoc generation (#55) --- Makefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index bf1afa79c..b8369143d 100644 --- a/Makefile +++ b/Makefile @@ -15,10 +15,19 @@ endif buildtype := $(shell echo "$(BUILDTYPE)" | tr "[A-Z]" "[a-z]") -HOST_PLATFORM = linux -HOST_PLATFORM_VERSION = $(shell uname -m) -export NINJA = platform/linux/ninja -export JOBS ?= $(shell grep --count processor /proc/cpuinfo) +ifeq ($(shell uname -s), Darwin) + HOST_PLATFORM = macos + HOST_PLATFORM_VERSION = $(shell uname -m) + export NINJA = platform/macos/ninja + export JOBS ?= $(shell sysctl -n hw.ncpu) +else ifeq ($(shell uname -s), Linux) + HOST_PLATFORM = linux + HOST_PLATFORM_VERSION = $(shell uname -m) + export NINJA = platform/linux/ninja + export JOBS ?= $(shell grep --count processor /proc/cpuinfo) +else + $(error Cannot determine host platform) +endif #### Android targets ###########################################################