4747# PHONY TARGETS - List every target that has a file/dir of the same name.
4848# ==============================================================================
4949
50- .PHONY : noir barretenberg noir-projects l1-contracts release-image boxes playground docs aztec-up spartan wsdb
50+ .PHONY : noir barretenberg noir-projects l1-contracts release-image boxes playground docs aztec-up spartan wsdb bb-avm-sim
5151
5252# ==============================================================================
5353# BOOTSTRAP TARGETS
@@ -69,7 +69,7 @@ full: fast bb-full-tests bb-cpp-full yarn-project-benches
6969bench : yarn-project-benches bb-sol bb-acir
7070
7171# Release. Everything plus copy bb cross compiles to ts projects.
72- release : fast bb-cpp-release-dir bb-ts-cross-copy ipc-runtime-cross
72+ release : fast bb-cpp-release-dir bb-ts-cross-copy bb-avm-sim-cross-copy ipc-runtime-cross
7373
7474# ==============================================================================
7575# Noir
@@ -104,7 +104,7 @@ avm-transpiler-cross: avm-transpiler-cross-amd64-macos avm-transpiler-cross-arm6
104104# ==============================================================================
105105
106106# Barretenberg - Aggregate target for all barretenberg sub-projects.
107- barretenberg : bb-cpp bb-ts bb-rs bb-acir bb-docs bb-sol bb-bbup bb-crs
107+ barretenberg : bb-cpp bb-ts bb-avm-sim bb- rs bb-acir bb-docs bb-sol bb-bbup bb-crs
108108
109109# BB C++ - Main aggregate target.
110110bb-cpp : bb-cpp-native bb-cpp-wasm bb-cpp-wasm-threads
@@ -156,19 +156,19 @@ bb-cpp-cross-arm64-macos-objects: bb-cpp-yarn
156156 $(call build,$@ ,barretenberg/cpp,build_cross_objects arm64-macos)
157157
158158# Cross-compile for ARM64 Linux (release only)
159- bb-cpp-cross-arm64-linux : bb-cpp-cross-arm64-linux-objects avm-transpiler-cross-arm64-linux bb-cpp-yarn
159+ bb-cpp-cross-arm64-linux : bb-cpp-native bb-cpp- cross-arm64-linux-objects avm-transpiler-cross-arm64-linux bb-cpp-yarn
160160 $(call build,$@ ,barretenberg/cpp,build_preset arm64-linux)
161161
162162# Cross-compile for AMD64 macOS (release only)
163- bb-cpp-cross-amd64-macos : bb-cpp-cross-amd64-macos-objects avm-transpiler-cross-amd64-macos bb-cpp-yarn
163+ bb-cpp-cross-amd64-macos : bb-cpp-cross-arm64-linux bb-cpp-cross- amd64-macos-objects avm-transpiler-cross-amd64-macos bb-cpp-yarn
164164 $(call build,$@ ,barretenberg/cpp,build_preset amd64-macos)
165165
166166# Cross-compile for ARM64 macOS (release or CI_FULL)
167- bb-cpp-cross-arm64-macos : bb-cpp-cross-arm64-macos-objects avm-transpiler-cross-arm64-macos bb-cpp-yarn
167+ bb-cpp-cross-arm64-macos : bb-cpp-cross-amd64-macos bb-cpp-cross- arm64-macos-objects avm-transpiler-cross-arm64-macos bb-cpp-yarn
168168 $(call build,$@ ,barretenberg/cpp,build_preset arm64-macos)
169169
170170# Cross-compile for AMD64 Windows (release only)
171- bb-cpp-cross-amd64-windows : avm-transpiler-cross-amd64-windows
171+ bb-cpp-cross-amd64-windows : bb-cpp-cross-arm64-macos avm-transpiler-cross-amd64-windows
172172 $(call build,$@ ,barretenberg/cpp,build_preset amd64-windows)
173173
174174# iOS SDK download (shared by all iOS cross-compile targets)
@@ -180,19 +180,19 @@ bb-cpp-android-sysroot:
180180 $(call run_command,$@ ,$(ROOT ) /barretenberg/cpp,bash scripts/download-android-sysroot.sh)
181181
182182# Cross-compile for ARM64 iOS (release only, static lib only)
183- bb-cpp-cross-arm64-ios : bb-cpp-ios-sdk
183+ bb-cpp-cross-arm64-ios : bb-cpp-cross-amd64-windows bb-cpp- ios-sdk
184184 $(call build,$@ ,barretenberg/cpp,build_preset arm64-ios)
185185
186186# Cross-compile for ARM64 iOS Simulator (release only, static lib only)
187- bb-cpp-cross-arm64-ios-sim : bb-cpp-ios-sdk
187+ bb-cpp-cross-arm64-ios-sim : bb-cpp-cross-arm64-ios bb-cpp- ios-sdk
188188 $(call build,$@ ,barretenberg/cpp,build_preset arm64-ios-sim)
189189
190190# Cross-compile for ARM64 Android (release only, static lib only)
191- bb-cpp-cross-arm64-android : bb-cpp-android-sysroot
191+ bb-cpp-cross-arm64-android : bb-cpp-cross-arm64-ios-sim bb-cpp- android-sysroot
192192 $(call build,$@ ,barretenberg/cpp,build_preset arm64-android)
193193
194194# Cross-compile for x86_64 Android (release only, static lib only)
195- bb-cpp-cross-x86_64-android : bb-cpp-android-sysroot
195+ bb-cpp-cross-x86_64-android : bb-cpp-cross-arm64-android bb-cpp- android-sysroot
196196 $(call build,$@ ,barretenberg/cpp,build_preset x86_64-android)
197197
198198bb-cpp-cross : bb-cpp-cross-arm64-linux bb-cpp-cross-amd64-macos bb-cpp-cross-arm64-macos bb-cpp-cross-amd64-windows bb-cpp-cross-arm64-ios bb-cpp-cross-arm64-ios-sim bb-cpp-cross-arm64-android bb-cpp-cross-x86_64-android
@@ -225,11 +225,17 @@ bb-cpp-full: bb-cpp bb-cpp-gcc bb-cpp-fuzzing bb-cpp-windows bb-cpp-asan bb-cpp-
225225
226226# BB TypeScript - TypeScript bindings
227227bb-ts : bb-cpp-wasm bb-cpp-wasm-threads bb-cpp-native ipc-runtime
228- $(call build,$@ ,barretenberg/ts)
228+ $(call build,$@ ,barretenberg/ts,build_bb_js )
229229
230230# Copies the cross-compiles into bb.js.
231231bb-ts-cross-copy : bb-ts bb-cpp-cross
232- $(call build,$@ ,barretenberg/ts,cross_copy)
232+ $(call build,$@ ,barretenberg/ts,cross_copy_bb_js)
233+
234+ bb-avm-sim : ipc-codegen ipc-runtime bb-cpp-native
235+ $(call build,$@ ,barretenberg/ts,build_bb_avm_sim)
236+
237+ bb-avm-sim-cross-copy : bb-avm-sim bb-cpp-cross
238+ $(call build,$@ ,barretenberg/ts,cross_copy_bb_avm_sim)
233239
234240# BB Rust - barretenberg-rs FFI crate
235241bb-rs : bb-ts bb-cpp-native
@@ -396,8 +402,17 @@ l1-contracts-src: l1-contracts-solc
396402l1-contracts-verifier : noir-protocol-circuits l1-contracts-src
397403 $(call build,$@ ,l1-contracts,build_verifier)
398404
405+ # l1-contracts-artifacts: Generate the @aztec/l1-artifacts TS package (ABIs/bytecode/storage) and the
406+ # self-contained foundry bundle used by the runtime forge deploy path. Must depend on the verifier, not
407+ # just build_src: the generated artifact list includes HonkVerifier, and its real implementation is only
408+ # produced by build_verifier (which compiles generated/HonkVerifier.sol, copied from noir-projects).
409+ # build_src only compiles the src/ coverage mock of the same name, which collides on the same out/ path
410+ # and would be published instead if the verifier had not run last.
411+ l1-contracts-artifacts : l1-contracts-verifier
412+ $(call build,$@ ,l1-contracts,build_artifacts)
413+
399414# l1-contracts: Complete build (aggregate target)
400- l1-contracts : l1-contracts-src l1-contracts-verifier
415+ l1-contracts : l1-contracts-src l1-contracts-verifier l1-contracts-artifacts
401416
402417l1-contracts-tests : l1-contracts-verifier
403418 $(call test,$@ ,l1-contracts)
@@ -406,7 +421,7 @@ l1-contracts-tests: l1-contracts-verifier
406421# Yarn Project - TypeScript monorepo with all TS packages
407422# ==============================================================================
408423
409- yarn-project : bb-ts noir-projects l1-contracts wsdb
424+ yarn-project : bb-ts noir-projects l1-contracts wsdb bb-avm-sim
410425 $(call build,$@ ,yarn-project)
411426
412427yarn-project-tests : yarn-project
0 commit comments