From 2f531c582990ac991db9abbcacfa53db23febc1d Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 11 Aug 2024 08:19:39 -0300 Subject: Makefile: Simplify a bit compile rule --- Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6ef381b..ce05075 100644 --- a/Makefile +++ b/Makefile @@ -61,16 +61,14 @@ all: $(derived-assets) $(objects): Makefile src/$(NAME).a: src/$(NAME).go - go tool compile $(GOCFLAGS) -o $@ -p $(*F) $*.go +src/main.a: src/main.go src/$(NAME).a +tests/main.a: tests/main.go tests/$(NAME).a +src/$(NAME).a src/main.a tests/main.a: + go tool compile $(GOCFLAGS) -o $@ -p $(*F) -I $(@D) $*.go tests/$(NAME).a: tests/$(NAME).go src/$(NAME).go go tool compile $(GOCFLAGS) -o $@ -p $(*F) $*.go src/$(*F).go -src/main.a: src/main.go src/$(NAME).a -tests/main.a: tests/main.go tests/$(NAME).a -src/main.a tests/main.a: - go tool compile $(GOCFLAGS) -o $@ -I $(@D) $*.go - src/main.bin: src/main.a tests/main.bin: tests/main.a src/main.bin tests/main.bin: -- cgit v1.2.3