LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-07-2009, 08:26 PM   #1
raghu2383
LQ Newbie
 
Registered: Jun 2008
Posts: 20

Rep: Reputation: 0
Device Driver Make file include .s and .c file


Hello,

I have the following make file in Fedora 11, X86_64, 2.6.29 kernel:

Code:
ifneq ($(KERNELRELEASE),)
        obj-m   := Driver_V.o 
        module-objs     :=Driver_V.o 

else
        KDIR    := /usr/src/kernels/$(shell uname -r)/
        PWD     :=$(shell pwd)
default:
        $ make -C $(KDIR) M=$(PWD) modules 
endif

clean:
        $ rm *.o *.ko Module.symvers modules.order Module.markers *.mod.c
        $ rm -r .tmp*
        $ rm .*.cmd
Essentially I have a Driver_V.c file and an exitH.s file (asm)
I want to be able to call the routines defined in exitH.s from Driver_V.c and vice-versa. I tried to add "exitH.o" to the obj-m line and the module-objs line. Neither work. So I guess I have to define source files for the driver. Can someone tell me how to do this?
I am using the following line to compile the .s file to .o in the command line. I dont know what its equivalent should be in the driver makefile

Code:
gcc -c exitH.s
thanks for the help
RS

Last edited by raghu2383; 12-07-2009 at 08:39 PM. Reason: code for gcc -.s
 
  


Reply

Tags
asm, devicedrivers, makefile


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to supply libraries and include to make file malibec2005 Linux - Desktop 2 10-24-2008 10:15 AM
How do you make a device from a file (+ related) estaltz Linux - General 2 05-25-2007 04:26 AM
make file to include libxml into your project alix123 Programming 3 12-10-2004 05:17 AM
Can't compile wireless driver - missing include file?! soultaco Linux - Laptop and Netbook 1 05-12-2004 11:14 PM


All times are GMT -5. The time now is 05:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration