summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2015-12-01 23:37:52 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-12-06 15:41:04 +0100
commit3967af352aeb8bf171af7be8d71dd84e46e8d4be (patch)
treee1297ef2490ae054ab475ec1ec8a57cf6ad9a8b0 /mk
parent6efca1e9f87305b08ee1e26d817a5c770fa444fa (diff)
downloaddpdk-3967af352aeb8bf171af7be8d71dd84e46e8d4be.zip
dpdk-3967af352aeb8bf171af7be8d71dd84e46e8d4be.tar.gz
dpdk-3967af352aeb8bf171af7be8d71dd84e46e8d4be.tar.xz
mk: install kernel modules
Add kernel modules to "make install". Nothing is done if there is no kernel module compiled. When using "make install T=", the default path is the same as before. The Linux path is based on host kernel version. Suggested-by: Mario Carrillo <mario.alfredo.c.arevalo@intel.com> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Panu Matilainen <pmatilai@redhat.com>
Diffstat (limited to 'mk')
-rw-r--r--mk/rte.sdkinstall.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
index ec093d3..30dea0f 100644
--- a/mk/rte.sdkinstall.mk
+++ b/mk/rte.sdkinstall.mk
@@ -43,9 +43,19 @@ O ?= build
RTE_OUTPUT := $O
endif
+ifneq ($(MAKECMDGOALS),pre_install)
+include $(RTE_SDK)/mk/rte.vars.mk
+endif
+
ifdef T # defaults with T= will install an almost flat staging tree
export prefix ?=
+kerneldir ?= $(prefix)/kmod
+else
+ifeq ($(RTE_EXEC_ENV),linuxapp)
+kerneldir ?= /lib/modules/$(shell uname -r)/extra/dpdk
else
+kerneldir ?= /boot/modules
+endif
prefix ?= /usr/local
endif
exec_prefix ?= $(prefix)
@@ -94,6 +104,7 @@ ifeq ($(DESTDIR)$(if $T,,+),)
else
@echo ================== Installing $(DESTDIR)$(prefix)/
$(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-runtime
+ $(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-kmod
$(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-sdk
@echo Installation in $(DESTDIR)$(prefix)/ complete
endif
@@ -110,6 +121,12 @@ install-runtime:
$(Q)$(call rte_mkdir, $(DESTDIR)$(datadir))
$(Q)cp -a $(RTE_SDK)/tools $(DESTDIR)$(datadir)
+install-kmod:
+ifneq ($(wildcard $O/kmod/*),)
+ $(Q)$(call rte_mkdir, $(DESTDIR)$(kerneldir))
+ $(Q)cp -a $O/kmod/* $(DESTDIR)$(kerneldir)
+endif
+
install-sdk:
$(Q)$(call rte_mkdir, $(DESTDIR)$(includedir))
$(Q)tar -chf - -C $O include | \