Add an install target

The kernel depmod script bails on pre-built distro kernels so silence
the sub-make output and run depmod anyway.
This commit is contained in:
Tom Marshall 2019-11-14 18:20:50 +01:00
parent bfecc33c54
commit 45676ae7d1
1 changed files with 7 additions and 0 deletions

View File

@ -173,6 +173,13 @@ all-targets: \
$(OUT_BIN)/$(BIN_NAME)$(EXE_EXT) \
$(OUT_KMOD)/$(KMOD_NAME)$(KMOD_EXT)
.PHONY: install
install: all-targets
mkdir -p $(BINDIR)
cp -f $(OUT_BIN)/$(BIN_NAME)$(EXE_EXT) $(BINDIR)
make -C $(KDIR) M=$(TOP)/$(KMOD_NAME) modules_install 2>/dev/null
depmod -a
.PHONY: clean
clean:
rm -rf $(OUT)