Skip to content

Commit

Permalink
use config.json in makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Oct 15, 2024
1 parent dc420d4 commit 49f0608
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,12 @@ build: submodules runtime
fast-build: submodules runtime
@${STACK} build --fast ${STACKFLAGS}

.PHONY: configure
configure:
config/configure.sh

.PHONY: runtime
runtime:
runtime: configure
cd runtime && make

# -- Install
Expand Down
14 changes: 11 additions & 3 deletions runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@ all: juvix_c juvix_rust
# 2024-09-20: `-j` cannot be used in the juvix_c make invocation because it causes
# an error in the 'Build Linux static binary workflow'.
.PHONY: juvix_c
juvix_c:
cd c && $(MAKE) -s
juvix_c: juvix_c_native juvix_c_wasm
cd c && $(MAKE) -s includes

.PHONY: juvix_c_native
juvix_c_native:
cd c && $(MAKE) -s native64 native64-debug

.PHONY: juvix_c_wasm
juvix_c_wasm:
if grep -q '"wasm": true' ../config/config.json; then cd c && $(MAKE) -s wasm32 wasm32-wasi-debug; fi

.PHONY: juvix_rust
juvix_rust:
cd rust/juvix && cargo build && cargo build --release
if grep -q '"rust": true' ../config/config.json; then cd rust/juvix && cargo build && cargo build --release; fi

.PHONY: clean
clean:
Expand Down

0 comments on commit 49f0608

Please sign in to comment.