By using lndir, the .ko files are kept separate from the src directory and building multiple architectures can be supported
Signed-off-by: Jon Ringle <[email protected]> --- rules/templates/template-src-linux-driver-in | 1 + rules/templates/template-src-linux-driver-make | 16 +++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/rules/templates/template-src-linux-driver-in b/rules/templates/template-src-linux-driver-in index 7cb61c8..6edb6bc 100644 --- a/rules/templates/template-src-linux-driver-in +++ b/rules/templates/template-src-linux-driver-in @@ -3,6 +3,7 @@ config @PACKAGE@ tristate select KERNEL + select HOST_LNDIR prompt "@package@" help FIXME diff --git a/rules/templates/template-src-linux-driver-make b/rules/templates/template-src-linux-driver-make index 6d6b385..3a776a4 100644 --- a/rules/templates/template-src-linux-driver-make +++ b/rules/templates/template-src-linux-driver-make @@ -18,7 +18,7 @@ PACKAGES-$(PTXCONF_@PACKAGE@) += @package@ # @PACKAGE@_VERSION := @VERSION@ @PACKAGE@ := @package@-$(@PACKAGE@_VERSION) -@PACKAGE@_SRCDIR := $(PTXDIST_WORKSPACE)/local_src/$(@PACKAGE@) +@PACKAGE@_URL := lndir://$(PTXDIST_WORKSPACE)/local_src/$(@PACKAGE@) @PACKAGE@_DIR := $(BUILDDIR)/$(@PACKAGE@) @PACKAGE@_LICENSE := unknown @@ -48,14 +48,7 @@ $(STATEDIR)/@[email protected]: $(STATEDIR)/@[email protected]: @$(call targetinfo) -# # The kernel cannot build an out-of-tree driver out-of-tree :-) -# # So we make a local copy. - rm -fr $(@PACKAGE@_DIR) - cp -a $(@PACKAGE@_SRCDIR) $(@PACKAGE@_DIR) - $(KERNEL_PATH) $(KERNEL_ENV) $(MAKE) $(KERNEL_MAKEVARS) \ - -C $(KERNEL_DIR) \ - M=$(@PACKAGE@_DIR) \ - modules + cd $(@PACKAGE@_DIR) && $(KERNEL_PATH) $(KERNEL_ENV) $(MAKE) $(KERNEL_MAKEVARS) @$(call touch) # ---------------------------------------------------------------------------- @@ -64,6 +57,11 @@ $(STATEDIR)/@[email protected]: $(STATEDIR)/@[email protected]: @$(call targetinfo) + @$(call clean, $(@PACKAGE@_PKGDIR)) + cd $(@PACKAGE@_DIR) && $(KERNEL_PATH) $(KERNEL_ENV) $(MAKE) \ + $(filter-out INSTALL_MOD_PATH=%,$(KERNEL_MAKEVARS)) \ + INSTALL_MOD_PATH=$(@PACKAGE@_PKGDIR) \ + modules_install @$(call touch) # ---------------------------------------------------------------------------- -- 1.7.0.4 -- ptxdist mailing list [email protected]
