81 lines
2.4 KiB
Makefile
Executable File
81 lines
2.4 KiB
Makefile
Executable File
###################################
|
|
# License: Modified MIT (NON-AI)
|
|
# Copyright 2025 Timothy Prepscius
|
|
# See the LICENSE file in the root directory for license information.
|
|
###################################
|
|
|
|
ifeq (iOS,$(SYS_NAME))
|
|
DEVELOPER := /Applications/Xcode.app/Contents/Developer
|
|
CPPFLAGS += -stdlib=libc++
|
|
MMFLAGS += -stdlib=libc++
|
|
|
|
_FLAGS += -Wno-null-conversion -Wno-extra-tokens -Wno-int-to-void-pointer-cast -Wno-deprecated-register
|
|
|
|
###########################################################
|
|
# IOS SIMULATOR
|
|
ifeq ($(SYS_PLATFORM),simulate)
|
|
|
|
DEVDIR := $(DEVELOPER)/Toolchains/XcodeDefault.xctoolchain/
|
|
CC := $(DEVDIR)/usr/bin/clang -x c
|
|
CPP := $(DEVDIR)/usr/bin/clang -x c++
|
|
MM := $(DEVDIR)/usr/bin/clang -x objective-c++
|
|
M := $(DEVDIR)/usr/bin/clang -x objective-c
|
|
LINK := echo
|
|
|
|
# arm64 architecture for newer macs
|
|
_FLAGS += -DSYS_IPHONE -DSYS_ARM64
|
|
# _FLAGS += -arch arm64
|
|
|
|
# x86_64 for older macs
|
|
# _FLAGS += -arch x86_64
|
|
# _FLAGS += -DSYS_IPHONE -DSYS_X86
|
|
|
|
# i386 for a long time ago
|
|
# _FLAGS += -arch i386
|
|
|
|
_FLAGS += -DSYS_IPHONE_SIMULATE
|
|
_FLAGS += -Wno-import
|
|
_FLAGS += -fobjc-abi-version=2
|
|
_FLAGS += -fobjc-legacy-dispatch
|
|
_FLAGS += -isysroot $(DEVELOPER)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
|
|
_FLAGS += -mios-simulator-version-min=12.0
|
|
|
|
CFLAGS += -Wno-implicit-function-declaration
|
|
|
|
AR := libtool
|
|
ARFLAGS := -c -o
|
|
|
|
LDFLAGS += -Xlinker -objc_abi_version -Xlinker 2
|
|
LDFLAGS += -lobjc
|
|
LDFLAGS += -framework Foundation -framework UIKit -framework CoreGraphics
|
|
|
|
###########################################################
|
|
# IOS PHONE
|
|
else
|
|
|
|
DEVDIR := $(DEVELOPER)/Toolchains/XcodeDefault.xctoolchain/
|
|
CC := $(DEVDIR)/usr/bin/clang -x c
|
|
CPP := $(DEVDIR)/usr/bin/clang -x c++
|
|
MM := $(DEVDIR)/usr/bin/clang -x objective-c++
|
|
M := $(DEVDIR)/usr/bin/clang -x objective-c
|
|
LINK := $(DEVDIR)/usr/bin/clang
|
|
LINK := echo
|
|
|
|
AR := libtool
|
|
ARFLAGS := -c -o
|
|
|
|
_FLAGS += -DSYS_IPHONE -DSYS_ARM64
|
|
_FLAGS += -fembed-bitcode
|
|
SECTIONS_FLAGS_C :=
|
|
|
|
CFLAGS += -Wno-implicit-function-declaration
|
|
|
|
# _FLAGS += -fembed-bitcode-marker
|
|
_FLAGS += -Wno-import
|
|
_FLAGS += -arch arm64
|
|
_FLAGS += -isysroot $(DEVELOPER)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
|
|
_FLAGS += -miphoneos-version-min=12.0
|
|
endif
|
|
|
|
endif
|