Module: xenomai-3
Branch: master
Commit: a3a30499b7ffd9a36c18d909909b4f45bf3f710a
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=a3a30499b7ffd9a36c18d909909b4f45bf3f710a

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Apr 23 12:37:17 2015 +0200

scripts/prepare-kernel.sh: add Xenomai-specific include directives

Xenomai headers belonging to the public kernel interface are (and
shall be) referred to unambiguously, either as:

- <cobalt/*>
- <rtdm/*>
- <asm/xenomai/*>

Therefore we may patch the include directives referring to those
hierarchies into the general kernel CFLAGS, so that out-of-tree RTDM
drivers and any Xenomai kernel code in general need no further -I
switches.

i.e.
KBUILD_CFLAGS += -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai

---

 kernel/cobalt/Makefile                                  |    2 --
 kernel/cobalt/posix/Makefile                            |    5 +++--
 kernel/cobalt/rtdm/Makefile                             |    2 +-
 kernel/drivers/analogy/Makefile                         |    3 +--
 kernel/drivers/analogy/intel/Makefile                   |    3 +--
 kernel/drivers/analogy/national_instruments/Makefile    |    3 +--
 kernel/drivers/analogy/sensoray/Makefile                |    3 +--
 kernel/drivers/analogy/testing/Makefile                 |    3 +--
 kernel/drivers/autotune/Makefile                        |    2 --
 kernel/drivers/can/Makefile                             |    3 +--
 kernel/drivers/can/mscan/Makefile                       |    3 +--
 kernel/drivers/can/sja1000/Makefile                     |    3 +--
 kernel/drivers/ipc/Makefile                             |    2 --
 kernel/drivers/net/addons/Makefile                      |    3 +--
 kernel/drivers/net/drivers/Makefile                     |    3 +--
 kernel/drivers/net/drivers/e1000/Makefile               |    3 +--
 kernel/drivers/net/drivers/e1000e/Makefile              |    3 +--
 kernel/drivers/net/drivers/experimental/Makefile        |    3 +--
 kernel/drivers/net/drivers/experimental/e1000/Makefile  |    3 +--
 kernel/drivers/net/drivers/experimental/rt2500/Makefile |    3 +--
 kernel/drivers/net/drivers/igb/Makefile                 |    3 +--
 kernel/drivers/net/drivers/mpc52xx_fec/Makefile         |    3 +--
 kernel/drivers/net/drivers/tulip/Makefile               |    3 +--
 kernel/drivers/net/stack/Makefile                       |    3 +--
 kernel/drivers/net/stack/ipv4/Makefile                  |    3 +--
 kernel/drivers/net/stack/ipv4/tcp/Makefile              |    3 +--
 kernel/drivers/net/stack/ipv4/udp/Makefile              |    3 +--
 kernel/drivers/net/stack/packet/Makefile                |    3 +--
 kernel/drivers/net/stack/rtcfg/Makefile                 |    3 +--
 kernel/drivers/net/stack/rtmac/Makefile                 |    3 +--
 kernel/drivers/net/stack/rtmac/nomac/Makefile           |    3 +--
 kernel/drivers/net/stack/rtmac/tdma/Makefile            |    3 +--
 kernel/drivers/serial/Makefile                          |    2 --
 kernel/drivers/testing/Makefile                         |    2 --
 kernel/drivers/udd/Makefile                             |    3 +--
 scripts/prepare-kernel.sh                               |    2 ++
 36 files changed, 34 insertions(+), 69 deletions(-)

diff --git a/kernel/cobalt/Makefile b/kernel/cobalt/Makefile
index a8c799b..6e1cebe 100644
--- a/kernel/cobalt/Makefile
+++ b/kernel/cobalt/Makefile
@@ -26,5 +26,3 @@ xenomai-$(CONFIG_XENO_OPT_DEBUG) += debug.o
 xenomai-$(CONFIG_XENO_OPT_PIPE) += pipe.o
 xenomai-$(CONFIG_XENO_OPT_MAP) += map.o
 xenomai-$(CONFIG_PROC_FS) += vfile.o procfs.o
-
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai
diff --git a/kernel/cobalt/posix/Makefile b/kernel/cobalt/posix/Makefile
index 278e833..3049be4 100644
--- a/kernel/cobalt/posix/Makefile
+++ b/kernel/cobalt/posix/Makefile
@@ -1,3 +1,6 @@
+
+ccflags-y += -Ikernel
+
 obj-$(CONFIG_XENOMAI) += xenomai.o
 
 xenomai-y :=           \
@@ -20,5 +23,3 @@ xenomai-y :=          \
        timerfd.o
 
 xenomai-$(CONFIG_XENO_ARCH_SYS3264) += compat.o syscall32.o
-
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai -Ikernel
diff --git a/kernel/cobalt/rtdm/Makefile b/kernel/cobalt/rtdm/Makefile
index 0f06261..9ca7bac 100644
--- a/kernel/cobalt/rtdm/Makefile
+++ b/kernel/cobalt/rtdm/Makefile
@@ -6,4 +6,4 @@ xenomai-y :=    core.o          \
                drvlib.o        \
                fd.o
 
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai -I$(src)/..
+ccflags-y += -I$(src)/..
diff --git a/kernel/drivers/analogy/Makefile b/kernel/drivers/analogy/Makefile
index 055c6a2..a4ca8c1 100644
--- a/kernel/drivers/analogy/Makefile
+++ b/kernel/drivers/analogy/Makefile
@@ -1,6 +1,5 @@
 
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/analogy
+ccflags-y += -Idrivers/xenomai/analogy
 
 obj-$(CONFIG_XENO_DRIVERS_ANALOGY) += xeno_analogy.o testing/ intel/ 
national_instruments/ sensoray/
 
diff --git a/kernel/drivers/analogy/intel/Makefile 
b/kernel/drivers/analogy/intel/Makefile
index a65cd11..9b15d33 100644
--- a/kernel/drivers/analogy/intel/Makefile
+++ b/kernel/drivers/analogy/intel/Makefile
@@ -1,6 +1,5 @@
 
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/analogy
+ccflags-y += -Idrivers/xenomai/analogy
 
 obj-$(CONFIG_XENO_DRIVERS_ANALOGY_8255) += analogy_8255.o
 
diff --git a/kernel/drivers/analogy/national_instruments/Makefile 
b/kernel/drivers/analogy/national_instruments/Makefile
index eb627a0..d638269 100644
--- a/kernel/drivers/analogy/national_instruments/Makefile
+++ b/kernel/drivers/analogy/national_instruments/Makefile
@@ -1,6 +1,5 @@
 
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/analogy
+ccflags-y += -Idrivers/xenomai/analogy
 
 obj-$(CONFIG_XENO_DRIVERS_ANALOGY_NI_MITE) += analogy_ni_mite.o
 obj-$(CONFIG_XENO_DRIVERS_ANALOGY_NI_TIO) += analogy_ni_tio.o
diff --git a/kernel/drivers/analogy/sensoray/Makefile 
b/kernel/drivers/analogy/sensoray/Makefile
index 6e37d1b..1bf7aba 100644
--- a/kernel/drivers/analogy/sensoray/Makefile
+++ b/kernel/drivers/analogy/sensoray/Makefile
@@ -1,6 +1,5 @@
 
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/analogy
+ccflags-y += -Idrivers/xenomai/analogy
 
 obj-$(CONFIG_XENO_DRIVERS_ANALOGY_S526) += analogy_s526.o
 
diff --git a/kernel/drivers/analogy/testing/Makefile 
b/kernel/drivers/analogy/testing/Makefile
index 60c8e78..53b75c4 100644
--- a/kernel/drivers/analogy/testing/Makefile
+++ b/kernel/drivers/analogy/testing/Makefile
@@ -1,6 +1,5 @@
 
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/analogy
+ccflags-y += -Idrivers/xenomai/analogy
 
 obj-$(CONFIG_XENO_DRIVERS_ANALOGY_FAKE) += analogy_fake.o
 
diff --git a/kernel/drivers/autotune/Makefile b/kernel/drivers/autotune/Makefile
index 02da96e..12ba6cf 100644
--- a/kernel/drivers/autotune/Makefile
+++ b/kernel/drivers/autotune/Makefile
@@ -1,6 +1,4 @@
 
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai
-
 obj-$(CONFIG_XENO_DRIVERS_AUTOTUNE) += xeno_autotune.o
 
 xeno_autotune-y := autotune.o
diff --git a/kernel/drivers/can/Makefile b/kernel/drivers/can/Makefile
index ab680e4..36d125f 100644
--- a/kernel/drivers/can/Makefile
+++ b/kernel/drivers/can/Makefile
@@ -1,6 +1,5 @@
 
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/can
+ccflags-y += -Idrivers/xenomai/can
 
 obj-$(CONFIG_XENO_DRIVERS_CAN) += xeno_can.o mscan/ sja1000/
 obj-$(CONFIG_XENO_DRIVERS_CAN_FLEXCAN) += xeno_can_flexcan.o
diff --git a/kernel/drivers/can/mscan/Makefile 
b/kernel/drivers/can/mscan/Makefile
index b97b9f5..7b9b5e6 100644
--- a/kernel/drivers/can/mscan/Makefile
+++ b/kernel/drivers/can/mscan/Makefile
@@ -1,6 +1,5 @@
 
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/can -Idrivers/xenomai/can/mscan
+ccflags-y += -Idrivers/xenomai/can -Idrivers/xenomai/can/mscan
 
 obj-$(CONFIG_XENO_DRIVERS_CAN_MSCAN) += xeno_can_mscan.o
 
diff --git a/kernel/drivers/can/sja1000/Makefile 
b/kernel/drivers/can/sja1000/Makefile
index 575d80b..dfb96b8 100644
--- a/kernel/drivers/can/sja1000/Makefile
+++ b/kernel/drivers/can/sja1000/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/can -Idrivers/xenomai/can/sja1000
+ccflags-y += -Idrivers/xenomai/can -Idrivers/xenomai/can/sja1000
 
 obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000) += xeno_can_sja1000.o
 obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_PEAK_PCI) += xeno_can_peak_pci.o
diff --git a/kernel/drivers/ipc/Makefile b/kernel/drivers/ipc/Makefile
index 3e0161f..75fb27c 100644
--- a/kernel/drivers/ipc/Makefile
+++ b/kernel/drivers/ipc/Makefile
@@ -1,6 +1,4 @@
 
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai
-
 obj-$(CONFIG_XENO_DRIVERS_RTIPC) += xeno_rtipc.o
 
 xeno_rtipc-y := rtipc.o
diff --git a/kernel/drivers/net/addons/Makefile 
b/kernel/drivers/net/addons/Makefile
index fb5fb10..2b3f111 100644
--- a/kernel/drivers/net/addons/Makefile
+++ b/kernel/drivers/net/addons/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_ADDON_RTCAP) += rtcap.o
 
diff --git a/kernel/drivers/net/drivers/Makefile 
b/kernel/drivers/net/drivers/Makefile
index 1ab746a..d95c5a8 100644
--- a/kernel/drivers/net/drivers/Makefile
+++ b/kernel/drivers/net/drivers/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_EXP_DRIVERS) += experimental/
 
diff --git a/kernel/drivers/net/drivers/e1000/Makefile 
b/kernel/drivers/net/drivers/e1000/Makefile
index f78c25e..f8875a2 100644
--- a/kernel/drivers/net/drivers/e1000/Makefile
+++ b/kernel/drivers/net/drivers/e1000/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_DRV_E1000) += rt_e1000.o
 
diff --git a/kernel/drivers/net/drivers/e1000e/Makefile 
b/kernel/drivers/net/drivers/e1000e/Makefile
index c2936a6..f75bba1 100644
--- a/kernel/drivers/net/drivers/e1000e/Makefile
+++ b/kernel/drivers/net/drivers/e1000e/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_DRV_E1000E) += rt_e1000e.o
 
diff --git a/kernel/drivers/net/drivers/experimental/Makefile 
b/kernel/drivers/net/drivers/experimental/Makefile
index b50cda7..ad23177 100644
--- a/kernel/drivers/net/drivers/experimental/Makefile
+++ b/kernel/drivers/net/drivers/experimental/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_DRV_RT2500) += rt2500/
 
diff --git a/kernel/drivers/net/drivers/experimental/e1000/Makefile 
b/kernel/drivers/net/drivers/experimental/e1000/Makefile
index cab2ead..e1f9986 100644
--- a/kernel/drivers/net/drivers/experimental/e1000/Makefile
+++ b/kernel/drivers/net/drivers/experimental/e1000/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_DRV_E1000_NEW) += rt_e1000_new.o
 
diff --git a/kernel/drivers/net/drivers/experimental/rt2500/Makefile 
b/kernel/drivers/net/drivers/experimental/rt2500/Makefile
index 21fd7ac..eff55cc 100644
--- a/kernel/drivers/net/drivers/experimental/rt2500/Makefile
+++ b/kernel/drivers/net/drivers/experimental/rt2500/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_DRV_RT2500) += rt_rt2x00core.o rt_rt2500pci.o
 
diff --git a/kernel/drivers/net/drivers/igb/Makefile 
b/kernel/drivers/net/drivers/igb/Makefile
index 63f2d0a..654eac8 100644
--- a/kernel/drivers/net/drivers/igb/Makefile
+++ b/kernel/drivers/net/drivers/igb/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_DRV_IGB) += rt_igb.o
 
diff --git a/kernel/drivers/net/drivers/mpc52xx_fec/Makefile 
b/kernel/drivers/net/drivers/mpc52xx_fec/Makefile
index 45f05cf..336676d 100644
--- a/kernel/drivers/net/drivers/mpc52xx_fec/Makefile
+++ b/kernel/drivers/net/drivers/mpc52xx_fec/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_DRV_MPC52XX_FEC) += rt_mpc52xx_fec.o
 
diff --git a/kernel/drivers/net/drivers/tulip/Makefile 
b/kernel/drivers/net/drivers/tulip/Makefile
index 125b02b..9a5e620 100644
--- a/kernel/drivers/net/drivers/tulip/Makefile
+++ b/kernel/drivers/net/drivers/tulip/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_DRV_TULIP) += rt_tulip.o
 
diff --git a/kernel/drivers/net/stack/Makefile 
b/kernel/drivers/net/stack/Makefile
index 9246142..b55ac15 100644
--- a/kernel/drivers/net/stack/Makefile
+++ b/kernel/drivers/net/stack/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_RTIPV4) += ipv4/
 
diff --git a/kernel/drivers/net/stack/ipv4/Makefile 
b/kernel/drivers/net/stack/ipv4/Makefile
index 79378bf..f0fcd36 100644
--- a/kernel/drivers/net/stack/ipv4/Makefile
+++ b/kernel/drivers/net/stack/ipv4/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_RTIPV4_UDP) += udp/
 
diff --git a/kernel/drivers/net/stack/ipv4/tcp/Makefile 
b/kernel/drivers/net/stack/ipv4/tcp/Makefile
index fb30873..8a2d049 100644
--- a/kernel/drivers/net/stack/ipv4/tcp/Makefile
+++ b/kernel/drivers/net/stack/ipv4/tcp/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_RTIPV4_TCP) += rttcp.o
 
diff --git a/kernel/drivers/net/stack/ipv4/udp/Makefile 
b/kernel/drivers/net/stack/ipv4/udp/Makefile
index 001e6de..5f74b83 100644
--- a/kernel/drivers/net/stack/ipv4/udp/Makefile
+++ b/kernel/drivers/net/stack/ipv4/udp/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_RTIPV4_UDP) += rtudp.o
 
diff --git a/kernel/drivers/net/stack/packet/Makefile 
b/kernel/drivers/net/stack/packet/Makefile
index 50e9eba..ebbbd21 100644
--- a/kernel/drivers/net/stack/packet/Makefile
+++ b/kernel/drivers/net/stack/packet/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_RTPACKET) += rtpacket.o
 
diff --git a/kernel/drivers/net/stack/rtcfg/Makefile 
b/kernel/drivers/net/stack/rtcfg/Makefile
index 4b85bfc..e69ead4 100644
--- a/kernel/drivers/net/stack/rtcfg/Makefile
+++ b/kernel/drivers/net/stack/rtcfg/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_RTCFG) += rtcfg.o
 
diff --git a/kernel/drivers/net/stack/rtmac/Makefile 
b/kernel/drivers/net/stack/rtmac/Makefile
index cf4783a..dc72b18 100644
--- a/kernel/drivers/net/stack/rtmac/Makefile
+++ b/kernel/drivers/net/stack/rtmac/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_NOMAC) += nomac/
 
diff --git a/kernel/drivers/net/stack/rtmac/nomac/Makefile 
b/kernel/drivers/net/stack/rtmac/nomac/Makefile
index 8d35b36..3ad7bc6 100644
--- a/kernel/drivers/net/stack/rtmac/nomac/Makefile
+++ b/kernel/drivers/net/stack/rtmac/nomac/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_NOMAC) += nomac.o
 
diff --git a/kernel/drivers/net/stack/rtmac/tdma/Makefile 
b/kernel/drivers/net/stack/rtmac/tdma/Makefile
index c5ba15e..5fc4eb6 100644
--- a/kernel/drivers/net/stack/rtmac/tdma/Makefile
+++ b/kernel/drivers/net/stack/rtmac/tdma/Makefile
@@ -1,5 +1,4 @@
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai \
-       -Idrivers/xenomai/net/stack/include
+ccflags-y += -Idrivers/xenomai/net/stack/include
 
 obj-$(CONFIG_XENO_DRIVERS_NET_TDMA) += tdma.o
 
diff --git a/kernel/drivers/serial/Makefile b/kernel/drivers/serial/Makefile
index a6acd08..2705d83 100644
--- a/kernel/drivers/serial/Makefile
+++ b/kernel/drivers/serial/Makefile
@@ -1,6 +1,4 @@
 
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai
-
 obj-$(CONFIG_XENO_DRIVERS_16550A) += xeno_16550A.o
 obj-$(CONFIG_XENO_DRIVERS_MPC52XX_UART) += xeno_mpc52xx_uart.o
 obj-$(CONFIG_XENO_DRIVERS_IMX_UART) += xeno_imx_uart.o
diff --git a/kernel/drivers/testing/Makefile b/kernel/drivers/testing/Makefile
index e4c98d6..367a22e 100644
--- a/kernel/drivers/testing/Makefile
+++ b/kernel/drivers/testing/Makefile
@@ -8,5 +8,3 @@ xeno_timerbench-y := timerbench.o
 xeno_switchtest-y := switchtest.o
 
 xeno_rtdmtest-y := rtdmtest.o
-
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai
diff --git a/kernel/drivers/udd/Makefile b/kernel/drivers/udd/Makefile
index f5fe4c4..17ca1ea 100644
--- a/kernel/drivers/udd/Makefile
+++ b/kernel/drivers/udd/Makefile
@@ -1,5 +1,4 @@
-
-ccflags-y := -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai -Ikernel
+ccflags-y += -Ikernel
 
 obj-$(CONFIG_XENO_DRIVERS_UDD) += xeno_udd.o
 
diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
index b7c2f0b..2d4fb99 100755
--- a/scripts/prepare-kernel.sh
+++ b/scripts/prepare-kernel.sh
@@ -405,6 +405,8 @@ case $linux_VERSION.$linux_PATCHLEVEL in
 test "x$CONFIG_XENO_REVISION_LEVEL" = "x" && CONFIG_XENO_REVISION_LEVEL=0
 
     if ! grep -q CONFIG_XENOMAI $linux_tree/arch/$linux_arch/Makefile; then
+       p="KBUILD_CFLAGS += -Iarch/\$(SRCARCH)/xenomai/include 
-Iinclude/xenomai"
+       (echo; echo $p) | patch_append arch/$linux_arch/Makefile
        p="core-\$(CONFIG_XENOMAI)      += arch/$linux_arch/xenomai/"
        echo $p | patch_append arch/$linux_arch/Makefile
     fi


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to