Description:
Standardize the build process across all applications in the repository. Please ensure the following requirements are met for each app being added or updated:
1. Unified Makefile Targets:
The main Makefile must include a specific target for the app that invokes all necessary build scripts.
Example: Running make bash should trigger the complete build pipeline for Bash.
2. Standardized Build Output Directory:
Upon completion, all build artifacts (binaries, config files, logs, etc.) must be staged in a dedicated folder preserving the original directory structure: lind-wasm-apps/build/$appname/. In many cases, make install DESTDIR=$(PWD)/build/$appname within the app build script can handle this automatically.
Examples:
Nginx:
lind-wasm-apps/build/nginx/usr/local/nginx/sbin/nginx
lind-wasm-apps/build/nginx/usr/local/nginx/conf/nginx.conf
lind-wasm-apps/build/nginx/usr/local/nginx/logs/nginx.pid
lind-wasm-apps/build/nginx/usr/local/nginx/logs/error.log
Bash:
lind-wasm-apps/build/bash/bin/bash
3. Wasm Binary Handling & Naming:
When copying compiled WebAssembly binaries or shared libraries to the staging area: If a .cwasm file is produced, use it. If .cwasm file is not produced, the build should exit printing the error.
Strip Extensions: Remove the .cwasm extension from the final filename. The staged executable or shared library should have no Wasm-related extensions (e.g., stage it purely as bash or nginx).
This is also referred to in #58
Description:
Standardize the build process across all applications in the repository. Please ensure the following requirements are met for each app being added or updated:
1. Unified Makefile Targets:
The main Makefile must include a specific target for the app that invokes all necessary build scripts.
Example: Running
make bashshould trigger the complete build pipeline for Bash.2. Standardized Build Output Directory:
Upon completion, all build artifacts (binaries, config files, logs, etc.) must be staged in a dedicated folder preserving the original directory structure:
lind-wasm-apps/build/$appname/. In many cases,make install DESTDIR=$(PWD)/build/$appnamewithin the app build script can handle this automatically.Examples:
Nginx:
lind-wasm-apps/build/nginx/usr/local/nginx/sbin/nginxlind-wasm-apps/build/nginx/usr/local/nginx/conf/nginx.conflind-wasm-apps/build/nginx/usr/local/nginx/logs/nginx.pidlind-wasm-apps/build/nginx/usr/local/nginx/logs/error.logBash:
lind-wasm-apps/build/bash/bin/bash3. Wasm Binary Handling & Naming:
When copying compiled WebAssembly binaries or shared libraries to the staging area: If a .cwasm file is produced, use it. If .cwasm file is not produced, the build should exit printing the error.
Strip Extensions: Remove the .cwasm extension from the final filename. The staged executable or shared library should have no Wasm-related extensions (e.g., stage it purely as bash or nginx).
This is also referred to in #58