From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 13 Mar 2015 18:10:16 +0100 From: Gilles Chanteperdrix Message-ID: <20150313171016.GG1497@hermes.click-hack.org> References: <5502AEAF.3010003@xenomai.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Xenomai] rtdm/driver.h location - Xenomai 3.0 List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Helder Daniel Cc: Michael Smith <2michael.smith@gmail.com>, "Xenomai@xenomai.org" On Fri, Mar 13, 2015 at 05:06:06PM +0000, Helder Daniel wrote: > I was having the same problem. > What I did was (for a one source code file module only to keep it simple): > > In the source code: #include > > The makefile that I use is: > > obj-m += modulesource.o > > $(eval EXTRA_CFLAGS := $(shell xeno-config --kcflags)) > #or: > #$(eval ccflags-y = $(shell xeno-config --kcflags)) > > all: > make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules > clean: > make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean > > It assumes that: > > /lib/modules/3.16.0-ipipe/build -> /usr/src/linux-3.16.0-ipipe/ > > points the full source tree (not just a headers tree like the one created > by the debian kbuild) Once again, typing: make -C /usr/src/linux-3.16.0-ipipe/ M=$(PWD) modules is shorter and avoids the need for a symbolic link which requires root privileges. -- Gilles.