Browse Source

Added build target osx-lib to build a Zenroom static library. (#94)

master
fdeantoni GitHub 1 year ago
parent
commit
e695abcc6e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions
  1. +1
    -1
      Makefile
  2. +8
    -0
      build/osx.mk

+ 1
- 1
Makefile View File

@@ -32,7 +32,7 @@ all:
@echo "- linux, linux-lib, linux-clang, linux-debug"
@echo "- javascript-web, javascript-wasm, javascript-demo, javascript-rn (need EMSDK)"
@echo "- linux-python3, linux-go, osx-python3, osx-go (language bindings)"
@echo "- osx, ios-lib, ios-armv7, ios-arm64, ios-sim (need Apple/OSX)"
@echo "- osx, osx-lib, ios-lib, ios-armv7, ios-arm64, ios-sim (need Apple/OSX)"
@echo "- win, win-dll (cross-compile using MINGW on Linux)"
@echo "- musl, musl-local, musl-system (full static build)"
@echo "- android-arm android-x86 android-aarch64"


+ 8
- 0
build/osx.mk View File

@@ -61,5 +61,13 @@ ios-sim: ldflags := -lm
ios-sim: platform := ios
ios-sim: apply-patches milagro lua53 embed-lua ios-lib

osx-lib: ARCH := x86_64
osx-lib: cflags := -O2 -fPIC ${cflags_protection} -D'ARCH=\"OSX\"' -DARCH_OSX
osx-lib: ldflags := -lm
osx-lib: apply-patches milagro lua53 embed-lua ios-lib
osx-lib:
TARGET=${ARCH} AR=${ar} CC=${gcc} CFLAGS="${cflags}" make -C src ios-lib
cp -v src/zenroom-ios-${ARCH}.a build/libzenroom.a

ios-fat:
lipo -create build/zenroom-ios-x86_64.a build/zenroom-ios-arm64.a build/zenroom-ios-armv7.a -output build/zenroom-ios.a

Loading…
Cancel
Save