Files
creaturedex/src/simulation/chips/main-display/Makefile
T

20 lines
491 B
Makefile

SOURCES = src/main.c
TARGET = dist/chip.wasm
.PHONY: all clean
all: $(TARGET) dist/chip.json
clean:
rm -rf dist
dist:
mkdir -p dist
$(TARGET): dist $(SOURCES) wokwi-api.h
podman run --rm -u root -v "$(CURDIR)":/src:Z -w /src docker.io/wokwi/builder-clang-wasm:latest \
clang --target=wasm32-unknown-wasi --sysroot /opt/wasi-libc -nostartfiles -Wl,--import-memory -Wl,--export-table -Wl,--no-entry -Werror -o $(TARGET) $(SOURCES)
dist/chip.json: dist chip.json
cp chip.json dist