陳韋任
2012-Apr-12 07:56 UTC
[LLVMdev] HELP: Clang options needed in command to compile device driver into linux module.
On Thu, Apr 12, 2012 at 03:48:29PM +0800, 15102925731 wrote:> BTW, the Makefile is as folllow, > > CC := gcc > obj-m := hellomodule.o > KERNELDIR := /lib/modules/`uname -r`/build > PWD := $(shell pwd) > modules: > $(MAKE) -C $(KERNELDIR) M=$(PWD) modules^^^^^^^^^^^^^^ Check the Makefile under KERNELDIR directory. Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj
15102925731
2012-Apr-12 09:08 UTC
[LLVMdev] HELP: Clang options needed in command to compile device driver into linux module.
Sorry, but I didn't find a Makefile under KERNELDIR.
Why is it necessary to check that makefile anyway???
As to the Makefile that I posted before, if I can changed that file to build the
.c into .bc rather then .o, that would also solve my problem!
Thank you!
--
祝好!
甄凯
------------------------------------------------------------------------------------------------------
2012-04-12
------------------------------------------------------------------------------------------------------
Name: 甄凯(ZhenKai)
Homepage:http://www.renren.com/262729393
Email: zhenkaixd at 126.com or 846227103 at qq.com
TEL: 15810729006(Beijing)
Address: Room I-406, Central Building, Tsinghua University, Beijing, China.
100084.
At 2012-04-12 15:56:50,"陳韋任" <chenwj at iis.sinica.edu.tw>
wrote:>On Thu, Apr 12, 2012 at 03:48:29PM +0800, 15102925731 wrote:
>> BTW, the Makefile is as folllow,
>>
>> CC := gcc
>> obj-m := hellomodule.o
>> KERNELDIR := /lib/modules/`uname -r`/build
>> PWD := $(shell pwd)
>> modules:
>> $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
> ^^^^^^^^^^^^^^
>
> Check the Makefile under KERNELDIR directory.
>
>Regards,
>chenwj
>
>--
>Wei-Ren Chen (陳韋任)
>Computer Systems Lab, Institute of Information Science,
>Academia Sinica, Taiwan (R.O.C.)
>Tel:886-2-2788-3799 #1667
>Homepage: http://people.cs.nctu.edu.tw/~chenwj
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20120412/e7ad90b5/attachment.html>
陳韋任
2012-Apr-12 09:51 UTC
[LLVMdev] HELP: Clang options needed in command to compile device driver into linux module.
> Sorry, but I didn't find a Makefile under KERNELDIR. > Why is it necessary to check that makefile anyway???Well, `make -C $DIR` means it will change to that directory and start to make. That's why I sugguest you looking for Makefile under KERNELDIR. Where do you download the kernel source? Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj
Seemingly Similar Threads
- [LLVMdev] HELP: Clang options needed in command to compile device driver into linux module.
- [LLVMdev] HELP: Clang options needed in command to compile device driver into linux module.
- [LLVMdev] HELP: Clang options needed in command to compile device driver into linux module.
- [LLVMdev] How to compile this linux-driver like programme into .bc file?
- [LLVMdev] How to compile a linux module into .bc file using clang or llvm command?