commit c2050450b9bffa4a903ae221748c5a78667d15ea
parent f36430e38a6714f7d563425bf4a9b280c4e40f52
Author: Drew DeVault <sir@cmpwn.com>
Date: Sat, 13 Mar 2021 16:30:49 -0500
Update build system for post-stdlib merge
Diffstat:
5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,4 +1,4 @@
cache
config.mk
-./hare
-./hare-tests
+./cmd/hare/hare
+./cmd/hare/hare-tests
diff --git a/Makefile b/Makefile
@@ -3,8 +3,9 @@
include config.mk
TESTCACHE=$(HARECACHE)/+test
TESTHAREFLAGS=$(HAREFLAGS) -T +test
+STDLIB=./
-hare:
+cmd/hare/hare:
.SUFFIXES: .ha .ssa .s .o
.ssa.s:
@@ -15,12 +16,12 @@ hare:
@printf 'AS\t$@\n'
@$(AS) -g -o $@ $<
-include mk/stdlib.mk
+include stdlib.mk
hare_srcs=\
- plan.ha \
- subcmds.ha \
- main.ha
+ ./cmd/hare/plan.ha \
+ ./cmd/hare/subcmds.ha \
+ ./cmd/hare/main.ha
$(HARECACHE)/hare.ssa: $(hare_srcs) $(hare_stdlib_deps)
@printf 'HAREC\t$@\n'
@@ -30,12 +31,12 @@ $(TESTCACHE)/hare.ssa: $(hare_srcs) $(hare_testlib_deps)
@printf 'HAREC\t$@\n'
@HARECACHE=$(TESTCACHE) $(HAREC) $(TESTHAREFLAGS) -o $@ $(hare_srcs)
-hare: $(HARECACHE)/hare.o
+cmd/hare/hare: $(HARECACHE)/hare.o
@printf 'LD\t$@\n'
@$(LD) -T $(rtscript) --gc-sections -o $@ \
$(HARECACHE)/hare.o $(hare_stdlib_deps)
-hare-tests: $(TESTCACHE)/hare.o
+cmd/hare/hare-tests: $(TESTCACHE)/hare.o
@printf 'LD\t$@\n'
@$(LD) -T $(rtscript) -o $@ \
$(TESTCACHE)/hare.o $(hare_testlib_deps)
@@ -44,9 +45,9 @@ clean:
@rm -rf cache
@rm -f hare hare-tests
-check: hare-tests
- @./hare-tests
+check: cmd/hare/hare-tests
+ @./cmd/hare/hare-tests
-all: hare
+all: cmd/hare/hare
.PHONY: all clean check
diff --git a/config.example.mk b/config.example.mk
@@ -1,5 +1,4 @@
HARECACHE=cache
-STDLIB=stdlib
PLATFORM=+linux
ARCH=+x86_64
diff --git a/mk/gen-stdlib.sh b/gen-stdlib.sh
diff --git a/mk/stdlib.mk b/stdlib.mk