summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorStevenWdV <stevenwdv@gmail.com>2021-11-29 00:12:42 +0100
committerStevenWdV <stevenwdv@gmail.com>2021-11-29 00:12:42 +0100
commitf463d4c1a550c4b3dfc0be362f0b0a723a88122d (patch)
tree9b85337f1d9eda3d7070cd57d952712cfe2ae6cc /Makefile
parent60658378f68cc7c67cbea2758c6aef455c115c05 (diff)
Improve Java wrapper: add all tests, link correct libraries, use Maven, add Makefile & GitHub workflow. Fix make clean targets.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 16 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index ba9756d..a19af3e 100644
--- a/Makefile
+++ b/Makefile
@@ -8,16 +8,24 @@ test: test-go test-wrappers
test-go:
go test
+wrappers = $(wildcard wrappers/*/)
+
# Enable parallelism if -j is specified
test-wrappers: build
- $(MAKE) .test-csharp .test-python
-
-.test-csharp:
- $(MAKE) -C wrappers/csharp test
-
-.test-python:
- $(MAKE) -C wrappers/python test
+ $(MAKE) $(foreach wrapper,$(wrappers),.test_$(wrapper))
clean:
$(MAKE) -C exports clean
- $(MAKE) -C wrappers/csharp clean
+ $(MAKE) .clean_libs $(foreach wrapper,$(wrappers),.clean_$(wrapper) )
+
+.clean_libs:
+ $(MAKE) -C exports clean
+
+define wrapper_targets
+.test_$(1):
+ $(MAKE) -C $(1) test
+.clean_$(1):
+ $(MAKE) -C $(1) clean
+endef
+
+$(foreach wrapper,$(wrappers),$(eval $(call wrapper_targets,$(wrapper))))