diff options
Diffstat (limited to 'src/collectd/Makefile')
-rw-r--r-- | src/collectd/Makefile | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/src/collectd/Makefile b/src/collectd/Makefile index 1cff9364..6fdd4638 100644 --- a/src/collectd/Makefile +++ b/src/collectd/Makefile @@ -29,40 +29,51 @@ BUILD_CMD = ./build.sh CONFIG_CMD = CONFIG_CMD += ./configure -# DPDK_DIR is the directory where DPDK shared lib is installed -DPDK_DIR = $(shell echo $$DPDK_DIR) -ifeq ($(DPDK_DIR),) -DPDK_DIR = /usr +LIBPQOS_DIR = $(shell echo $$LIBPQOS_DIR) +ifeq ($(LIBPQOS_DIR),) +LIBPQOS_DIR = /usr endif + CONFIG_CMD += --enable-syslog CONFIG_CMD += --enable-logfile -CONFIG_CMD += --with-libdpdk=$(DPDK_DIR) +CONFIG_CMD += --with-libpqos=$(LIBPQOS_DIR) +CONFIG_CMD += --with-hugepages +CONFIG_CMD += --enable-exec +CONFIG_CMD += --enable-python +CONFIG_CMD += --enable-threshold .PHONY: install force_install config force_make # install depends on make -force_install: force_make +#force_install: force_make all: force_make - @echo "Finished making $(WORK_DIR) " + @echo "Finished making $(WORK_DIR)" config $(WORK_DIR)/Makefile: $(WORK_DIR)/configure $(AT)cd $(WORK_DIR); $(CONFIG_CMD) @echo "Configure done" -INSTALL_TARGET = force_install force_make - force_make: $(WORK_DIR)/Makefile $(AT)cd $(WORK_DIR) && git pull $(COLLECTD_URL) $(COLLECTD_TAG) @echo "git pull done" - $(AT)$(MAKE) -C $(WORK_DIR) $(MORE_MAKE_FLAGS) + $(AT) $(MAKE) -C $(WORK_DIR) $(MORE_MAKE_FLAGS) @echo "Make done" force_install: - $(AT)sudo $(MAKE) -C $(WORK_DIR) install + $(AT)$(MAKE) -C $(WORK_DIR) install + $(AT)cp $(WORK_DIR)/contrib/systemd.collectd.service /etc/systemd/system/ + $(AT)mv /etc/systemd/system/systemd.collectd.service /etc/systemd/system/collectd.service + $(AT)chmod +x /etc/systemd/system/collectd.service + $(AT)sed -i -e 's/ExecStart=\/usr\/sbin\/collectd/ExecStart=\/opt\/collectd\/sbin\/collectd/g' /etc/systemd/system/collectd.service + $(AT)sed -i -e 's/CapabilityBoundingSet=/CapabilityBoundingSet=CAP_SETUID CAP_SETGID/g' /etc/systemd/system/collectd.service + $(AT)systemctl daemon-reload + $(AT)sudo ./include_config.sh + @echo "Make install done" + +install: force_install -install: $(INSTALL_TARGET) # hard way to clean and clobber clean: @@ -94,7 +105,7 @@ $(WORK_DIR): $(AT)git clone $(COLLECTD_URL) $(TAG_DONE_FLAG): $(WORK_DIR) - $(AT)cd $(WORK_DIR); git checkout $(COLLECTD_TAG) + $(AT)cd collectd; git checkout $(COLLECTD_TAG) ifneq ($(PATCH_FILE),) $(AT)cd $(WORK_DIR); patch -p1 < ../$(PATCH_FILE) endif |