diff options
author | EuAndreh <eu@euandre.org> | 2024-08-11 08:28:05 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-08-11 08:29:11 -0300 |
commit | 2eb97310f4c6d7c9a2ed597b9f4058b8e54e8da9 (patch) | |
tree | 0e4d19c95b0885a9cb95931027773c4d3293fea5 /Makefile | |
parent | mv tests/gobang_main.go tests/main.go (diff) | |
download | gobang-2eb97310f4c6d7c9a2ed597b9f4058b8e54e8da9.tar.gz gobang-2eb97310f4c6d7c9a2ed597b9f4058b8e54e8da9.tar.xz |
Makefile: Normalize Go rules and simplify compile rules
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -55,13 +55,12 @@ all: $(derived-assets) $(objects): Makefile src/$(NAME).a: src/$(NAME).go - go tool compile $(GOCFLAGS) -o $@ -p $(*F) $*.go +tests/main.a: tests/main.go tests/$(NAME).a +src/$(NAME).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/$(NAME).go - -tests/main.a: tests/main.go tests/$(NAME).a - go tool compile $(GOCFLAGS) -o $@ -I $(@D) $*.go + go tool compile $(GOCFLAGS) -o $@ -p $(*F) $*.go src/$(*F).go tests/main.bin: tests/main.a go tool link $(GOLDFLAGS) -o $@ -L $(@D) $*.a @@ -69,10 +68,10 @@ tests/main.bin: tests/main.a tests.bin-check = \ - tests/main.bin/1 \ - tests/main.bin/2 \ - tests/main.bin/3 \ - tests/main.bin/4 \ + tests/main.bin/1 \ + tests/main.bin/2 \ + tests/main.bin/3 \ + tests/main.bin/4 \ $(tests.bin-check): tests/main.bin $(tests.bin-check): @@ -83,6 +82,11 @@ check-unit: $(tests.bin-check) integration-tests = \ +.PRECIOUS: $(integration-tests) +$(integration-tests): $(NAME).bin +$(integration-tests): ALWAYS + sh $@ + check-integration: $(integration-tests) |