Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
--- a/Makefile.am Mon Jun 30 12:37:06 2008 +0000
+++ b/Makefile.am Mon Jun 30 15:51:46 2008 +0000
@@ -53,6 +53,9 @@
Kbuild.in \
README.EoE
+BUILT_SOURCES = \
+ Kbuild
+
modules:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" modules
--- a/devices/Kbuild.in Mon Jun 30 12:37:06 2008 +0000
+++ b/devices/Kbuild.in Mon Jun 30 15:51:46 2008 +0000
@@ -61,7 +61,7 @@
endif
ifeq (@ENABLE_E1000@,1)
- obj-m += e1000/
+ obj-m += e1000/
endif
ifeq (@ENABLE_R8169@,1)
--- a/devices/Makefile.am Mon Jun 30 12:37:06 2008 +0000
+++ b/devices/Makefile.am Mon Jun 30 15:51:46 2008 +0000
@@ -59,6 +59,9 @@
forcedeth-2.6.19-ethercat.c \
forcedeth-2.6.19-orig.c
+BUILT_SOURCES = \
+ Kbuild
+
modules:
$(MAKE) -C "@abs_top_srcdir@" modules
--- a/devices/e1000/Kbuild.in Mon Jun 30 12:37:06 2008 +0000
+++ b/devices/e1000/Kbuild.in Mon Jun 30 15:51:46 2008 +0000
@@ -42,10 +42,11 @@
fi)
ifeq (@ENABLE_E1000@,1)
- EC_E1000_OBJ := e1000_main-@KERNEL_E1000@-ethercat.o \
- e1000_hw-@KERNEL_E1000@-ethercat.o \
- e1000_ethtool-@KERNEL_E1000@-ethercat.o \
- e1000_param-@KERNEL_E1000@-ethercat.o
+ EC_E1000_OBJ := \
+ e1000_main-@KERNEL_E1000@-ethercat.o \
+ e1000_hw-@KERNEL_E1000@-ethercat.o \
+ e1000_ethtool-@KERNEL_E1000@-ethercat.o \
+ e1000_param-@KERNEL_E1000@-ethercat.o
obj-m += ec_e1000.o
ec_e1000-objs := $(EC_E1000_OBJ)
CFLAGS_e1000_main-@KERNEL_E1000@-ethercat.o = -DSVNREV=$(REV)
--- a/devices/e1000/Makefile.am Mon Jun 30 12:37:06 2008 +0000
+++ b/devices/e1000/Makefile.am Mon Jun 30 15:51:46 2008 +0000
@@ -105,6 +105,9 @@
e1000_param-2.6.24-ethercat.c \
e1000_param-2.6.24-orig.c
+BUILT_SOURCES = \
+ Kbuild
+
modules:
$(MAKE) -C "@abs_top_srcdir@" modules
--- a/examples/mini/Makefile.am Mon Jun 30 12:37:06 2008 +0000
+++ b/examples/mini/Makefile.am Mon Jun 30 15:51:46 2008 +0000
@@ -39,15 +39,17 @@
Kbuild.in \
mini.c
-all:
+BUILT_SOURCES = \
+ Kbuild
+
+modules:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" modules
+modules_install:
+ mkdir -p $(DESTDIR)$(LINUX_MOD_PATH)
+ cp $(srcdir)/ec_mini.ko $(DESTDIR)$(LINUX_MOD_PATH)
+
clean-local:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" clean
-install-data-local: modules_install
-
-modules_install:
- cp $(srcdir)/ec_mini.ko $(DESTDIR)$(LINUX_MOD_PATH)
-
#------------------------------------------------------------------------------
--- a/examples/msr/Kbuild.in Mon Jun 30 12:37:06 2008 +0000
+++ b/examples/msr/Kbuild.in Mon Jun 30 15:51:46 2008 +0000
@@ -37,22 +37,25 @@
obj-m := $(MODULE).o
-$(MODULE)-objs := msr_sample.o \
- rt_lib/msr-core/msr_lists.o \
- rt_lib/msr-core/msr_main.o \
- rt_lib/msr-core/msr_charbuf.o \
- rt_lib/msr-core/msr_reg.o \
- rt_lib/msr-core/msr_interpreter.o \
- rt_lib/msr-core/msr_messages.o \
- rt_lib/msr-core/msr_proc.o \
- rt_lib/msr-core/msr_error_reg.o \
- rt_lib/msr-utils/msr_utils.o \
- rt_lib/msr-utils/msr_time.o \
- rt_lib/msr-math/msr_base64.o \
- rt_lib/msr-math/msr_hex_bin.o \
- libm.o
+$(MODULE)-objs := \
+ msr_sample.o \
+ rt_lib/msr-core/msr_lists.o \
+ rt_lib/msr-core/msr_main.o \
+ rt_lib/msr-core/msr_charbuf.o \
+ rt_lib/msr-core/msr_reg.o \
+ rt_lib/msr-core/msr_interpreter.o \
+ rt_lib/msr-core/msr_messages.o \
+ rt_lib/msr-core/msr_proc.o \
+ rt_lib/msr-core/msr_error_reg.o \
+ rt_lib/msr-utils/msr_utils.o \
+ rt_lib/msr-utils/msr_time.o \
+ rt_lib/msr-math/msr_base64.o \
+ rt_lib/msr-math/msr_hex_bin.o \
+ libm.o
-EXTRA_CFLAGS := -I@MSR_DIR@/include -I@RTAI_DIR@/include \
- -D_SIMULATION -mhard-float
+EXTRA_CFLAGS := \
+ -I@MSR_DIR@/include \
+ -I@RTAI_DIR@/include \
+ -D_SIMULATION -mhard-float
#------------------------------------------------------------------------------
--- a/examples/msr/Makefile.am Mon Jun 30 12:37:06 2008 +0000
+++ b/examples/msr/Makefile.am Mon Jun 30 15:51:46 2008 +0000
@@ -38,15 +38,17 @@
msrserv.pl \
init.sh
-all:
+BUILT_SOURCES = \
+ Kbuild
+
+modules:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" modules
+modules_install:
+ mkdir -p $(DESTDIR)$(LINUX_MOD_PATH)
+ cp $(srcdir)/ec_msr_sample.ko $(DESTDIR)$(LINUX_MOD_PATH)
+
clean-local:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" clean
-install-data-local: modules_install
-
-modules_install:
- cp $(srcdir)/ec_msr_sample.ko $(DESTDIR)$(LINUX_MOD_PATH)
-
#------------------------------------------------------------------------------
--- a/examples/rtai/Makefile.am Mon Jun 30 12:37:06 2008 +0000
+++ b/examples/rtai/Makefile.am Mon Jun 30 15:51:46 2008 +0000
@@ -37,15 +37,17 @@
Kbuild.in \
rtai_sample.c
-all:
+BUILT_SOURCES = \
+ Kbuild
+
+modules:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" modules
+modules_install:
+ mkdir -p $(DESTDIR)$(LINUX_MOD_PATH)
+ cp $(srcdir)/ec_rtai_sample.ko $(DESTDIR)$(LINUX_MOD_PATH)
+
clean-local:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" clean
-install-data-local: modules_install
-
-modules_install:
- cp $(srcdir)/ec_rtai_sample.ko $(DESTDIR)$(LINUX_MOD_PATH)
-
#------------------------------------------------------------------------------
--- a/master/Kbuild.in Mon Jun 30 12:37:06 2008 +0000
+++ b/master/Kbuild.in Mon Jun 30 15:51:46 2008 +0000
@@ -37,31 +37,31 @@
ec_master-objs := \
cdev.o \
- datagram.o \
- device.o \
- domain.o \
- fmmu_config.o \
- fsm_change.o \
- fsm_coe.o \
- fsm_coe_map.o \
- fsm_master.o \
- fsm_pdo_assign.o \
- fsm_pdo_mapping.o \
- fsm_sii.o \
- fsm_slave_config.o \
- fsm_slave_scan.o \
- mailbox.o \
- master.o \
- module.o \
- pdo.o \
- pdo_entry.o \
- pdo_list.o \
- sdo.o \
- sdo_entry.o \
- sdo_request.o \
- slave.o \
- slave_config.o \
- sync.o \
+ datagram.o \
+ device.o \
+ domain.o \
+ fmmu_config.o \
+ fsm_change.o \
+ fsm_coe.o \
+ fsm_coe_map.o \
+ fsm_master.o \
+ fsm_pdo_assign.o \
+ fsm_pdo_mapping.o \
+ fsm_sii.o \
+ fsm_slave_config.o \
+ fsm_slave_scan.o \
+ mailbox.o \
+ master.o \
+ module.o \
+ pdo.o \
+ pdo_entry.o \
+ pdo_list.o \
+ sdo.o \
+ sdo_entry.o \
+ sdo_request.o \
+ slave.o \
+ slave_config.o \
+ sync.o \
sync_config.o
ifeq (@ENABLE_EOE@,1)
--- a/master/Makefile.am Mon Jun 30 12:37:06 2008 +0000
+++ b/master/Makefile.am Mon Jun 30 15:51:46 2008 +0000
@@ -66,6 +66,9 @@
sync.c sync.h \
sync_config.c sync_config.h
+BUILT_SOURCES = \
+ Kbuild
+
modules:
$(MAKE) -C "@abs_top_srcdir@" modules