summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-08-05 16:51:41 -0300
committerEuAndreh <eu@euandre.org>2024-08-05 16:51:41 -0300
commit27f3f26e8ffa52aed694a0d6d17efcdd8278ba6f (patch)
tree89a881998c208e46bf0b81c95361b2e0b363b12e /Makefile
parentMakefile: Build with "go tool compile" and "go tool link" (diff)
downloadgobang-27f3f26e8ffa52aed694a0d6d17efcdd8278ba6f.tar.gz
gobang-27f3f26e8ffa52aed694a0d6d17efcdd8278ba6f.tar.xz
Start using TestStart() and Testing()
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 15 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index cba5d37..b6085d4 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@ LDLIBS =
.SUFFIXES:
-.SUFFIXES: .go .a .bin
+.SUFFIXES: .go .a .bin .bin-check
@@ -30,14 +30,14 @@ all:
include deps.mk
-sources = \
- src/$(NAME).go \
-
objects = \
src/$(NAME).a \
tests/$(NAME).a \
tests/$(NAME)_main.a \
+sources = \
+ src/$(NAME).go \
+
derived-assets = \
$(objects) \
@@ -69,8 +69,13 @@ $(objects): Makefile
-check-unit: tests/$(NAME)_main.bin
- ./tests/$(NAME)_main.bin
+tests.bin-check = \
+ tests/$(NAME)_main.bin-check \
+
+$(tests.bin-check): tests/$(NAME)_main.bin
+ $(EXEC)$*.bin
+
+check-unit: $(tests.bin-check)
integration-tests = \
@@ -95,8 +100,8 @@ clean:
## ensures that all installable artifacts are crafted beforehand.
install: all
mkdir -p \
- '$(DESTDIR)$(GOLIBDIR)' \
- '$(DESTDIR)$(SRCDIR)' \
+ '$(DESTDIR)$(GOLIBDIR)' \
+ '$(DESTDIR)$(SRCDIR)' \
cp src/$(NAME).a '$(DESTDIR)$(GOLIBDIR)'
cp $(sources) '$(DESTDIR)$(SRCDIR)'
@@ -106,8 +111,8 @@ install: all
## A dedicated test asserts that this is always true.
uninstall:
rm -rf \
- '$(DESTDIR)$(GOLIBDIR)'/$(NAME).a \
- '$(DESTDIR)$(SRCDIR)' \
+ '$(DESTDIR)$(GOLIBDIR)'/$(NAME).a \
+ '$(DESTDIR)$(SRCDIR)' \
ALWAYS: