summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-08-11 08:17:40 -0300
committerEuAndreh <eu@euandre.org>2024-08-11 08:17:40 -0300
commiteb77ba72e08e367581f77388a7ffda147da1da56 (patch)
treebbb74d4790e39bb51f297a03847765d5563e5aee
parentMakefile: Add "bench" target (diff)
downloadwscat-eb77ba72e08e367581f77388a7ffda147da1da56.tar.gz
wscat-eb77ba72e08e367581f77388a7ffda147da1da56.tar.xz
Makefile: Simplify a bit compile rule
-rw-r--r--Makefile10
1 files changed, 4 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 44a54b7..996066e 100644
--- a/Makefile
+++ b/Makefile
@@ -60,16 +60,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: