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>
This commit is contained in:
parent
6efca1e9f8
commit
3967af352a
@ -43,9 +43,19 @@ O ?= build
|
|||||||
RTE_OUTPUT := $O
|
RTE_OUTPUT := $O
|
||||||
endif
|
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
|
ifdef T # defaults with T= will install an almost flat staging tree
|
||||||
export prefix ?=
|
export prefix ?=
|
||||||
|
kerneldir ?= $(prefix)/kmod
|
||||||
else
|
else
|
||||||
|
ifeq ($(RTE_EXEC_ENV),linuxapp)
|
||||||
|
kerneldir ?= /lib/modules/$(shell uname -r)/extra/dpdk
|
||||||
|
else
|
||||||
|
kerneldir ?= /boot/modules
|
||||||
|
endif
|
||||||
prefix ?= /usr/local
|
prefix ?= /usr/local
|
||||||
endif
|
endif
|
||||||
exec_prefix ?= $(prefix)
|
exec_prefix ?= $(prefix)
|
||||||
@ -94,6 +104,7 @@ ifeq ($(DESTDIR)$(if $T,,+),)
|
|||||||
else
|
else
|
||||||
@echo ================== Installing $(DESTDIR)$(prefix)/
|
@echo ================== Installing $(DESTDIR)$(prefix)/
|
||||||
$(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-runtime
|
$(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-runtime
|
||||||
|
$(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-kmod
|
||||||
$(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-sdk
|
$(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-sdk
|
||||||
@echo Installation in $(DESTDIR)$(prefix)/ complete
|
@echo Installation in $(DESTDIR)$(prefix)/ complete
|
||||||
endif
|
endif
|
||||||
@ -110,6 +121,12 @@ install-runtime:
|
|||||||
$(Q)$(call rte_mkdir, $(DESTDIR)$(datadir))
|
$(Q)$(call rte_mkdir, $(DESTDIR)$(datadir))
|
||||||
$(Q)cp -a $(RTE_SDK)/tools $(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:
|
install-sdk:
|
||||||
$(Q)$(call rte_mkdir, $(DESTDIR)$(includedir))
|
$(Q)$(call rte_mkdir, $(DESTDIR)$(includedir))
|
||||||
$(Q)tar -chf - -C $O include | \
|
$(Q)tar -chf - -C $O include | \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user