Refactoring directory structure.
h3rald h3rald@h3rald.com
Sun, 08 Dec 2024 16:27:19 +0100
6 files changed,
9 insertions(+),
17 deletions(-)
M
Makefile
→
Makefile
@@ -2,16 +2,16 @@ CC = gcc
CFLAGS = -Wall -Wextra -g LDFLAGS = -hex: hex.c +hex: src/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 +web/assets/hex.wasm: src/hex.c + emcc -O2 -sASYNCIFY -DBROWSER -sEXPORTED_RUNTIME_METHODS=stringToUTF8 src/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 +hex.wasm: src/hex.c + emcc -O2 -sASYNCIFY -sEXPORTED_RUNTIME_METHODS=stringToUTF8 src/hex.c -o hex.js --pre-js src/hex.node.js -ape: hex.c +ape: src/hex.c cosmocc $(CFLAGS) $(LDFLAGS) $< -o hex .PHONY: wasm@@ -29,16 +29,8 @@ rm -f hex.wasm
.PHONY: test test: - ./hex test.hex - -.PHONY: dtest -dtest: - ./hex -d test.hex + ./hex scripts/test.hex .PHONY: web web: playground - ./hex web.hex - -.PHONY: dweb -dweb: playground - ./hex -d web.hex + ./hex scripts/web.hex
M
test.hex
→
scripts/test.hex
@@ -117,7 +117,7 @@
("rm test.txt" exec 0x0 ==) ("rm test.txt" run 0x0 get 0x1 ==) ("ls web/contents" run 0x1 get "\n" split len 0x7 ==) - (args 0x1 get "test.hex" ==) + (args 0x1 get "scripts/test.hex" ==) ;56 ((args len 0x2 ==) ("two") ("no") if "two" ==)