Skip to content

Commit

Permalink
fix ios avoid double inclusion of static libs
Browse files Browse the repository at this point in the history
also use system malloc
  • Loading branch information
jaromil committed Sep 24, 2024
1 parent 1886691 commit 620ee1a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build/apple-ios.mk
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## Initialize build defaults
include build/init.mk

BUILD_DEPS += mimalloc

OS := iphoneos
cc := $(shell xcrun --sdk iphoneos -f gcc 2>/dev/null)
ar := $(shell xcrun --sdk iphoneos -f ar 2>/dev/null)
ld := $(shell xcrun --sdk iphoneos -f ld 2>/dev/null)
ranlib := $(shell xcrun --sdk iphoneos -f ranlib 2>/dev/null)
cflags += -O2 -fPIC ${cflags_protection} -D'ARCH="OSX"' -DNO_SYSTEM -DARCH_OS
cflags += -O2 -fPIC ${cflags_protection}
cflags += -D'ARCH="OSX"' -DNO_SYSTEM -DARCH_OSX
cflags += -DLIBCMALLOC
lua_cflags += -DLUA_USE_IOS
ldflags := -lm
platform := ios
Expand All @@ -19,15 +19,15 @@ ios-armv7: ed25519_cc := ${cc}
ios-armv7: libcc_cc := ${cc}
ios-armv7: ${BUILD_DEPS} ${ZEN_SOURCES}
TARGET=armv7 libtool -static -o zenroom-ios-armv7.a \
${ZEN_SOURCES} $(shell find lib -name \*.a) ${ldadd}
${ZEN_SOURCES} ${ldadd}

ios-arm64: cflags += -arch arm64 -isysroot $(shell xcrun --sdk iphoneos --show-sdk-path 2>/dev/null)
ios-arm64: quantum_proof_cc := ${cc}
ios-arm64: ed25519_cc := ${cc}
ios-arm64: libcc_cc := ${cc}
ios-arm64: ${BUILD_DEPS} ${ZEN_SOURCES}
TARGET=arm64 libtool -static -o zenroom-ios-arm64.a \
${ZEN_SOURCES} $(shell find lib -name \*.a) ${ldadd}
${ZEN_SOURCES} ${ldadd}

ios-sim: cc := $(shell xcrun --sdk iphonesimulator -f gcc 2>/dev/null)
ios-sim: ar := $(shell xcrun --sdk iphonesimulator -f ar 2>/dev/null)
Expand All @@ -39,7 +39,7 @@ ios-sim: ed25519_cc := ${cc}
ios-sim: libcc_cc := ${cc}
ios-sim: ${BUILD_DEPS} ${ZEN_SOURCES}
TARGET=arm64 libtool -static -o zenroom-ios-x86_64.a \
${ZEN_SOURCES} $(shell find lib -name \*.a) ${ldadd}
${ZEN_SOURCES} ${ldadd}

ios-fat:
lipo -create \
Expand Down

0 comments on commit 620ee1a

Please sign in to comment.