Browse Source
Added build target osx-lib to build a Zenroom static library. (#94)
master
fdeantoni
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
9 additions and
1 deletions
-
Makefile
-
build/osx.mk
|
|
@ -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" |
|
|
|
|
|
@ -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 |
|
|
|