Merge branch 'kbuild_out_of_tree' into 'devel-1.6'

support out-of-tree build

See merge request etherlab.org/ethercat!79
This commit is contained in:
Florian Pose 2024-01-31 14:52:23 +00:00
commit 21b0b13703
15 changed files with 47 additions and 2 deletions

View File

@ -15,6 +15,12 @@ build:
- ./configure --with-linux-dir=/usr/src/linux-obj/$(uname -i)/default --enable-tty --with-devices=2 --enable-ccat
- make -j8 all modules
- make DISTCHECK_CONFIGURE_FLAGS="--with-linux-dir=/usr/src/linux-obj/$(uname -i)/default" distcheck
- make dist
- mkdir test_dist && cd test_dist && tar xzf ../ethercat-*.tar.gz && cd ethercat-*/
- mkdir build && cd build
- ../configure --with-linux-dir=/usr/src/linux-obj/$(uname -i)/default --disable-8139too --enable-tty --with-devices=2 --enable-ccat
- make -j8 all modules
# Build ethercat tool subcommand help output for documentation
commands:

View File

@ -3,7 +3,7 @@
# ```
# include $(top_srcdir)/Makefile.kbuild
# ```
KBUILD = $(MAKE) -C "$(LINUX_SOURCE_DIR)" M="$(abs_srcdir)" INSTALL_MOD_DIR="$(INSTALL_MOD_DIR)"
KBUILD = $(MAKE) -C "$(LINUX_SOURCE_DIR)" M="$(abs_builddir)" INSTALL_MOD_DIR="$(INSTALL_MOD_DIR)"
modules:

View File

@ -31,6 +31,9 @@
#
#------------------------------------------------------------------------------
src := @abs_srcdir@
ccflags-y := -I@abs_top_builddir@
REV := $(shell if test -s $(src)/../revision; then \
cat $(src)/../revision; \
else \

View File

@ -31,6 +31,9 @@
#
#------------------------------------------------------------------------------
src := @abs_srcdir@
ccflags-y := -I@abs_top_builddir@
TOPDIR := $(src)/../..
ifeq (@ENABLE_CCAT@,1)

View File

@ -29,8 +29,14 @@
include $(top_srcdir)/Makefile.kbuild
EXTRA_DIST = \
gpio.c \
module.c \
module.h \
netdev.c \
netdev.h \
update.h
sram.c \
update.h \
update.c
#------------------------------------------------------------------------------

View File

@ -31,6 +31,9 @@
#
#------------------------------------------------------------------------------
src := @abs_srcdir@
ccflags-y := -I@abs_top_builddir@
TOPDIR := $(src)/../..
REV := $(shell if test -s $(TOPDIR)/revision; then \

View File

@ -31,6 +31,9 @@
#
#------------------------------------------------------------------------------
src := @abs_srcdir@
ccflags-y := -I@abs_top_builddir@
TOPDIR := $(src)/../..
REV := $(shell if test -s $(TOPDIR)/revision; then \

View File

@ -31,6 +31,9 @@
#
#------------------------------------------------------------------------------
src := @abs_srcdir@
ccflags-y := -I@abs_top_builddir@
TOPDIR := $(src)/../..
REV := $(shell if test -s $(TOPDIR)/revision; then \

View File

@ -31,6 +31,9 @@
#
#------------------------------------------------------------------------------
src := @abs_srcdir@
ccflags-y := -I@abs_top_builddir@
obj-m := ec_dc_rtai_sample.o
ec_dc_rtai_sample-objs := dc_rtai_sample.o

View File

@ -31,6 +31,8 @@
#
#------------------------------------------------------------------------------
src := @abs_srcdir@
obj-m := ec_mini.o
ec_mini-objs := mini.o

View File

@ -31,6 +31,9 @@
#
#------------------------------------------------------------------------------
src := @abs_srcdir@
ccflags-y := -I@abs_top_builddir@
obj-m := ec_rtai_sample.o
ec_rtai_sample-objs := rtai_sample.o

View File

@ -31,6 +31,9 @@
#
#------------------------------------------------------------------------------
src := @abs_srcdir@
ccflags-y := -I@abs_top_builddir@
obj-m := ec_tty_example.o
ec_tty_example-objs := \

View File

@ -31,6 +31,9 @@
#
#------------------------------------------------------------------------------
src := @abs_srcdir@
ccflags-y := -I@abs_top_builddir@
obj-m := ec_master.o
ec_master-objs := \

View File

@ -39,6 +39,7 @@ noinst_HEADERS = \
domain.c domain.h \
doxygen.c \
ethernet.c ethernet.h \
flag.c flag.h \
fmmu_config.c fmmu_config.h \
foe.h \
foe_request.c foe_request.h \

View File

@ -31,6 +31,9 @@
#
#------------------------------------------------------------------------------
src := @abs_srcdir@
ccflags-y := -I@abs_top_builddir@
obj-m := ec_tty.o
ec_tty-objs := \