Skip to content

Commit

Permalink
new simplified build for apple osx
Browse files Browse the repository at this point in the history
ios and osx to use ccache and zenroom_cc var
  • Loading branch information
jaromil committed Sep 24, 2024
1 parent cd294c3 commit dec77d0
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,11 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hendrikmuhs/[email protected]
- run: |
make -f build/apple-ios.mk ios-arm64
# make clean
# make -f build/apple-ios.mk ios-sim
# make -f build/apple-ios.mk ios-fat
# make -f build/apple-ios.mk ios-armv7
# make clean
make -f build/apple-osx.mk CCACHE=1
make clean
make -f build/apple-ios.mk ios-arm64 CCACHE=1
go-build-check:
name: 🐹 go build & checks
Expand Down
4 changes: 4 additions & 0 deletions build/apple-ios.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ platform := ios
quantum_proof_cc := ${pfxcc} ${cc}
ed25519_cc := ${pfxcc} ${cc}
libcc_cc := ${pfxcc} ${cc}
luacc_cc := ${pfxcc} ${cc}
zenroom_cc := ${pfxcc} ${cc}

ios-armv7: cflags += -arch armv7 -isysroot $(shell xcrun --sdk iphoneos --show-sdk-path 2>/dev/null)
ios-armv7: ${BUILD_DEPS} ${ZEN_SOURCES}
Expand All @@ -39,6 +41,8 @@ ios-sim: cflags += -arch x86_64 -isysroot $(shell xcrun --sdk iphonesimulator --
ios-sim: quantum_proof_cc := ${cc}
ios-sim: ed25519_cc := ${cc}
ios-sim: libcc_cc := ${cc}
ios-sim: luacc_cc := ${cc}
ios-sim: zenroom_cc := ${cc}
ios-sim: ${BUILD_DEPS} ${ZEN_SOURCES}
TARGET=x86_64 libtool -static -o zenroom-ios-x86_64.a \
${ZEN_SOURCES} ${ldadd}
Expand Down
28 changes: 28 additions & 0 deletions build/apple-osx.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Initialize build defaults
include build/init.mk

ifdef CCACHE
milagro_cmake_flags += -DCMAKE_C_COMPILER_LAUNCHER=ccache
quantum_proof_cc := ccache ${cc}
ed25519_cc := ccache ${cc}
libcc_cc := ccache ${cc}
lua_cc := ccache ${cc}
zenroom_cc := ccache ${cc}
endif
ifdef DEBUG
cflags += ${cflags_debug}
else
cflags += ${cflags_protection}
endif

all: ${BUILD_DEPS} zenroom.command zencode-exec.command

zenroom.command: ${ZEN_SOURCES} src/cli-zenroom.o
$(info === Building the zenroom CLI)
${zenroom_cc} ${cflags} ${ZEN_SOURCES} src/cli-zenroom.o -o $@ ${ldflags} ${ldadd}

zencode-exec.command: ${ZEN_SOURCES} src/zencode-exec.o
$(info === Building the zencode-exec utility)
${zenroom_cc} ${cflags} ${ZEN_SOURCES} src/zencode-exec.o -o $@ ${ldflags} ${ldadd}

include build/deps.mk

0 comments on commit dec77d0

Please sign in to comment.