[READ-ONLY] Mirror of https://github.com/bombshell-dev/tty. Platform independent 2D layout engine for terminal applications based on Clay bomb.sh/docs/tty
Something went wrong. Try again.
tty Makefile
1.5 kB · 58 lines
Makefile
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859CC = clangTARGET = clayterm.wasmSRC = src/module.c
CFLAGS = --target=wasm32 -nostdlib -O2 \ -ffunction-sections -fdata-sections \ -mbulk-memory \ -DCLAY_IMPLEMENTATION -DCLAY_WASM \ -Isrc -I.
EXPORTS = \ -Wl,--export=__heap_base \ -Wl,--export=clayterm_size \ -Wl,--export=init \ -Wl,--export=reduce \ -Wl,--export=output \ -Wl,--export=length \ -Wl,--export=measure \ -Wl,--export=Clay_SetPointerState \ -Wl,--export=pointer_over_count \ -Wl,--export=pointer_over_id_string_length \ -Wl,--export=pointer_over_id_string_ptr \ -Wl,--export=get_element_bounds \ -Wl,--export=error_count \ -Wl,--export=error_type \ -Wl,--export=error_message_length \ -Wl,--export=error_message_ptr \ -Wl,--export=input_size \ -Wl,--export=input_init \ -Wl,--export=input_scan \ -Wl,--export=input_count \ -Wl,--export=input_event \ -Wl,--export=input_delay
LDFLAGS = -Wl,--no-entry \ -Wl,--import-memory \ -Wl,--stack-first \ -Wl,--strip-all \ -Wl,--gc-sections \ -Wl,--undefined=Clay__MeasureText \ -Wl,--undefined=Clay__QueryScrollOffset \ $(EXPORTS)
all: $(TARGET) wasm.ts @echo "Built $(TARGET) ($$(wc -c < $(TARGET)) bytes raw, $$(gzip -c $(TARGET) | wc -c) bytes gzip)"
DEPS = $(wildcard src/*.c src/*.h)
$(TARGET): $(DEPS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC)
wasm.ts: $(TARGET) deno run --allow-read --allow-write tasks/bundle-wasm.ts
clean: rm -f $(TARGET) wasm.ts
.PHONY: all clean