Add hierarchy-file support to the DPDK app files,
nic bind file and cpu layout file.
When invoking "make install-bin" app files will
be installed in: $(DESTDIR)/$(BIN_DIR)
where BIN_DIR=/usr/bin by default.
You can override BIN_DIR var.
This hierarchy is based on:
http://www.freedesktop.org/software/systemd/man/file-hierarchy.html
Signed-off-by: Mario Carrillo
---
mk/rte.sdkinstall.mk | 16
mk/rte.sdkroot.mk| 4 ++--
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
index f016171..cfcdb25 100644
--- a/mk/rte.sdkinstall.mk
+++ b/mk/rte.sdkinstall.mk
@@ -43,7 +43,11 @@ ifndef T
T=*
ifneq (,$(wildcard $(BUILD_DIR)/build/.config))
INCLUDE_DIR ?= /usr/include/dpdk
+BIN_DIR ?= /usr/bin
HSLINKS := $(wildcard $(RTE_OUTPUT)/include/*)
+BINARY_FILES := $(patsubst %.map,,$(wildcard $(RTE_OUTPUT)/app/*))
+NIC_FILES := $(wildcard $(BUILD_DIR)/tools/*.py)
+BINARY_FILES += $(NIC_FILES)
endif
endif
@@ -90,6 +94,18 @@ install-headers:
echo installing: $$HEADER; \
done
#
+# install app files in /usr/bin by default
+# BIN_DIR can be overridden.
+#
+.PHONY: install-bin
+install-bin:
+ @echo == Installing app files
+ @[ -d $(DESTDIR)/$(BIN_DIR) ] || mkdir -p $(DESTDIR)/$(BIN_DIR)
+ @for BIN_FILE in ${BINARY_FILES}; do \
+ cp -rf $$BIN_FILE ${DESTDIR}/${BIN_DIR}; \
+ echo installing: $$BIN_FILE; \
+ done
+#
# uninstall: remove all built sdk
#
UNINSTALL_TARGETS := $(addsuffix _uninstall,\
diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk
index 8477a2b..24eaa60 100644
--- a/mk/rte.sdkroot.mk
+++ b/mk/rte.sdkroot.mk
@@ -97,8 +97,8 @@ test fast_test ring_test mempool_test perf_test coverage:
testall:
$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdktestall.mk $@
-.PHONY: install install-headers uninstall
-install install-headers uninstall:
+.PHONY: install install-headers install-bin uninstall
+install install-headers install-bin uninstall:
$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk $@
.PHONY: doc help
--
2.1.0