Files
forge/Makefile
T
Will Anderson e5d9986c11
Forge Release / build-and-release (push) Failing after 4s
point Makefile at foundation/el rather than /usr/local/lib/el
elc is not installed system-wide; resolve ELC and EL_LIB from
the monorepo at $(HOME)/Development/neuron-technologies/foundation/el
so plain `make build` works without extra env vars.
2026-05-03 02:07:27 -05:00

25 lines
559 B
Makefile

EL_ROOT ?= $(HOME)/Development/neuron-technologies/foundation/el
EL_LIB ?= $(EL_ROOT)/el-compiler/runtime
ELC ?= $(EL_ROOT)/dist/platform/elc
CC ?= cc
CFLAGS := -std=c11 -O2 -I$(EL_LIB)
.PHONY: build clean install
dist/:
mkdir -p dist
dist/forge.c: src/forge.el | dist/
$(ELC) src/forge.el > dist/forge.c
dist/forge: dist/forge.c
$(CC) $(CFLAGS) -o dist/forge dist/forge.c $(EL_LIB)/el_runtime.c -lcurl -lpthread
build: dist/forge
install: dist/forge
install -m 755 dist/forge /usr/local/bin/forge
clean:
rm -rf dist/forge dist/forge.c