UNAME = ${shell uname} ifeq (${UNAME},Linux) STEM_SHARED_DIR ?= /usr/local/stem STEM_DEFINES_PATH ?= ~/.stem.defines CC ?= /usr/bin/gcc WFLAGS ?= -Wno-type-limits else ifeq (${UNAME},Darwin) STEM_SHARED_DIR ?= /usr/local/stem STEM_DEFINES_PATH ?= ~/.stem.defines SDKROOT_macosx ?= ${shell xcrun --show-sdk-path} MACOSX_VERSION_MIN ?= 10.6 CC = ${shell xcrun --sdk ${SDKROOT_macosx} --find cc} -isysroot ${SDKROOT_macosx} -mmacosx-version-min=${MACOSX_VERSION_MIN} else STEM_SHARED_DIR ?= C:/stem STEM_DEFINES_PATH ?= ${STEM_SHARED_DIR}/stem.defines CC = C:/MinGW/bin/gcc.exe EXE_SUFFIX = .exe endif STEMCONFIG = stemconfig${EXE_SUFFIX} all: ${STEMCONFIG} clean: rm -f ${STEMCONFIG} jsonio_min.c: jsonio_min.h ${STEMCONFIG}: stemconfig.c jsonio_min.c ${CC} -std=gnu99 -O3 -Wall -Wextra -Wno-unused-parameter -Werror ${WFLAGS} -o $@ $^ TEMPLATE_FILES = \ EGLShell_activity_template.java \ EGLShell_manifest_template.xml INCLUDE_FILES = \ include/serialization_translator.h \ include/stem_core.h install: stemconfig${EXE_SUFFIX} mkdir -p ${STEM_SHARED_DIR} chmod 777 ${STEM_SHARED_DIR} cp Makefile.global stemconfig.rb embed.s embed_mingw.s embed_mingw_w64.s ${STEMCONFIG} ${STEM_SHARED_DIR} cp ${TEMPLATE_FILES} ${STEM_SHARED_DIR} cp -r icons ${STEM_SHARED_DIR} mkdir -p ${STEM_SHARED_DIR}/include cp ${INCLUDE_FILES} ${STEM_SHARED_DIR}/include