3 DSTROOT?=$(shell /bin/pwd)
10 ifeq "$(Embedded)" "YES"
17 ifeq "$(RC_TARGET_CONFIG)" "iPhone"
20 Embedded?=$(shell echo $(SDKROOT) | grep -iq iphoneos && echo YES || echo NO)
23 ifeq "$(Embedded)" "NO"
24 SDKROOT:=$(shell xcodebuild -sdk macosx.internal -version Path)
26 SDKROOT:=$(shell xcodebuild -sdk iphoneos.internal -version Path)
29 MY_ARCH := $(patsubst %, -arch %, $(ARCH)) # allows building multiple archs.
31 all: $(DSTROOT)/memorystatus
33 $(DSTROOT)/memorystatus: memorystatus.c
34 xcrun -sdk $(SDKROOT) $(CC) $(MY_ARCH) -framework CoreFoundation -framework ServiceManagement -F $(SDKROOT)/System/Library/PrivateFrameworks/ -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders -o $@ memorystatus.c $(CFLAGS)
38 rm -f $(DSTROOT)/memorystatus