summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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: