LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-07-2012, 11:48 AM   #1
rpittala
LQ Newbie
 
Registered: Jan 2012
Location: BANGALORE
Posts: 27

Rep: Reputation: Disabled
Question need of makefile info ? how the linux make file is different from simple c makefile ?


Hi Folks,
I am in need of some Makefile information. Actually, I am in little bit confusion after looking at LINUX Makefile and the C application type Makefile. what is the difference between the above Make files and how many types of Makefiles are there?

Having knowledge on application side Makefile`s and looking for application side Makefiles documents as well.

Looking forward to know useful info and some useful URL`s to study

Last edited by rpittala; 05-07-2012 at 12:10 PM. Reason: added some more details
 
Old 05-07-2012, 04:37 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
Not quite clear what you mean with :
"LINUX Makefile and the C application type Makefile".

Linux is the kernel, and all kernel files are c programs.
There is a "standard" Makefile for a single kernel module :
Code:
obj-m    := hello.o

KDIR    := /lib/modules/$(shell uname -r)/build
PWD    := $(shell pwd)

default:
	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
... And then some links for all other Makefiles, etc.
http://www.gnu.org/software/autoconf/manual/index.html
http://www.gnu.org/software/autoconf/
http://www.gnu.org/software/automake/
http://sourceware.org/autobook/

http://www.freesoftwaremagazine.com/..._gnu_autotools
http://www.freesoftwaremagazine.com/...with_autotools
http://www.freesoftwaremagazine.com/..._with_autoconf

http://www.developingprogrammers.com...ools-tutorial/

http://www.wlug.org.nz/MakefileHowto
http://www.eng.hawaii.edu/Tutor/Make/
http://www.linuxplanet.com/linuxplan...orials/7093/1/
http://www.gnu.org/software/make/manual/make.html
http://www.student.cs.uwaterloo.ca/~isg/res/unix/make/
 
1 members found this post helpful.
Old 05-07-2012, 08:04 PM   #3
rpittala
LQ Newbie
 
Registered: Jan 2012
Location: BANGALORE
Posts: 27

Original Poster
Rep: Reputation: Disabled
Yes, I was talking about Linux makefile(kernel modules) as per the above MAkefile code and at the same time the below Makefile code
Code:
CC = gcc
CFLAGS = -Wall -g
OBJECTS = app.o
out.exe :$(OBJECTS)
       $(CC) $(CFLAGS) $(OBJECTS) -o out.exe
app.o : header.h app.c
       $(CC) $(CFLAGS) -c app.c
 
  


Reply


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
make: Warning: Both `makefile' and `Makefile' exist ? malli42108 Solaris / OpenSolaris 5 10-24-2009 09:09 AM
Is it mandatory to have the name of the makefile as 'Makefile' for kernal module comp narender.d Linux - Kernel 3 05-29-2009 06:26 AM
Makefile issue: "Makefile.src: File not found" m3rkury Linux - Software 1 02-22-2007 10:15 PM


All times are GMT -5. The time now is 05:01 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