From 412b708bcedc1a80e2860a526622b4ee48e18cfa Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Wed, 16 Feb 2022 03:09:21 +0100 Subject: [PATCH] Extend make buildsystem with find&symlink helper for libgangliaSink --- Makefile | 12 +++++++++++- sinks/Makefile | 6 ++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c9805eb..33fd515 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,15 @@ GOSRC_SINKS := $(wildcard sinks/*.go) GOSRC_RECEIVERS := $(wildcard receivers/*.go) GOSRC_INTERNAL := $(wildcard internal/*/*.go) GOSRC := $(GOSRC_APP) $(GOSRC_COLLECTORS) $(GOSRC_SINKS) $(GOSRC_RECEIVERS) $(GOSRC_INTERNAL) +COMPONENT_DIRS := collectors \ + sinks \ + receivers \ + internal/metricRouter \ + internal/ccMetric \ + internal/metricAggregator \ + internal/ccLogger \ + internal/ccTopology \ + internal/multiChanTicker .PHONY: all @@ -12,12 +21,13 @@ all: $(APP) $(APP): $(GOSRC) make -C collectors + make -C sinks go get go build -o $(APP) $(GOSRC_APP) .PHONY: clean clean: - make -C collectors clean + @for COMP in $(COMPONENT_DIRS); do if [ -e $$COMP/Makefile ]; then make -C $$COMP clean; fi; done rm -f $(APP) .PHONY: fmt diff --git a/sinks/Makefile b/sinks/Makefile index 6defb77..bc0c09d 100644 --- a/sinks/Makefile +++ b/sinks/Makefile @@ -3,3 +3,9 @@ all: libganglia.so libganglia.so: @find /usr -name "libganglia.so*" -exec ln -s {} libganglia.so \; + + +clean: + rm -f libganglia.so + +.PHONY: clean