all repos — hex @ 30c1f24efd37b0c39890cdb044701e0506ce4c1c

A tiny, minimalist, slightly-esoteric concatenative programming lannguage.

Makefile

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
CC = gcc
CFLAGS = -Wall -Wextra -g
LDFLAGS =

hex: hex.c
	$(CC) $(CFLAGS) $(LDFLAGS) $< -o hex

web/assets/hex.wasm: hex.c
	 emcc -O2 -sASYNCIFY -DBROWSER -sEXPORTED_RUNTIME_METHODS=stringToUTF8 hex.c -o web/assets/hex.js --pre-js web/assets/hex-playground.js

hex.wasm: hex.c
	 emcc -O2 -sASYNCIFY -sEXPORTED_RUNTIME_METHODS=stringToUTF8 hex.c -o hex.js --pre-js hex.node.js

ape: hex.c
	cosmocc $(CFLAGS) $(LDFLAGS) $< -o hex

.PHONY: wasm
wasm: hex.wasm

.PHONY: playground
playground: web/assets/hex.wasm

.PHONY: clean
clean:
	rm -f hex
	rm -f hex.exe
	rm -f hex.js
	rm -f hex.wasm

.PHONY: test
test:
	./hex test.hex

.PHONY: dtest
dtest:
	./hex -d test.hex

.PHONY: web
web: playground
	./hex web.hex

.PHONY: dweb
dweb: playground
	./hex -d web.hex