aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-12-10 11:14:54 -0300
committerEuAndreh <eu@euandre.org>2024-12-10 11:14:54 -0300
commite4cb98c21f14f8b1f6d36fde56cb6c5c49b0db88 (patch)
tree3bd5592fa69d363c895135df80472ffc58a65d23 /Makefile
parentcmd/: Simplify flag usage (diff)
downloadurubu-e4cb98c21f14f8b1f6d36fde56cb6c5c49b0db88.tar.gz
urubu-e4cb98c21f14f8b1f6d36fde56cb6c5c49b0db88.tar.xz
Start building test files
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 23 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5fa873a..80aa205 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ GOLDFLAGS = -L $(GOLIBDIR)
.SUFFIXES:
-.SUFFIXES: .go .a .bin .bin-check
+.SUFFIXES: .go .a .ta .bin .bin-check
.go.a:
go tool compile -I $(@D) $(GOCFLAGS) -o $@ -p $(*F) \
@@ -64,6 +64,20 @@ existing = \
driver/parser \
tester \
+xtests = \
+ compressor \
+ grammar/symbol \
+ spec/test \
+ utf8 \
+ spec/grammar/parser \
+ grammar \
+ tester \
+ grammar/lexical/dfa \
+ grammar/lexical/parser \
+ grammar/lexical \
+ driver/lexer \
+ driver/parser \
+
xmains = \
cmd/ucdgen \
cmd/vartan \
@@ -71,7 +85,9 @@ xmains = \
existing.a = $(existing:=.a)
xmains.a = $(xmains:=.a)
+xtests.ta = $(xtests:=.ta)
xmains.bin = $(xmains:=.bin)
+_xtests.bin = $(xtests:=.bin)
sources = \
@@ -89,6 +105,8 @@ derived-assets = \
$(existing.a) \
$(xmains.a) \
$(xmains.bin) \
+ $(xtests.ta) \
+ $(xtest.bin) \
side-assets = \
tests/fuzz/corpus/ \
@@ -109,10 +127,13 @@ $(libs.a): src/$(NAME).go src/version.go
$(existing.a):
go tool compile -I . -o $@ -p $* `find $*/*.go | grep -v _test`
+$(xtests.ta):
+ go tool compile -I . -o $@ -p $* $*/*.go
+
$(xmains.a):
go tool compile -I . -o $@ -p main $*/*.go
-$(xmains.bin):
+$(xmains.bin) $(xtests.bin):
go tool link -L . -o $@ --extldflags '$(LDLIBS)' $*.a
$(fuzz-targets/lib.a):