Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


LinkBack Search this Thread
Old 05-07-2012, 11:48 AM   #1
LQ Newbie
Registered: Jan 2012
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
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,186

Rep: Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368
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 :
obj-m    := hello.o

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

	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
... And then some links for all other Makefiles, etc.
1 members found this post helpful.
Old 05-07-2012, 08:04 PM   #3
LQ Newbie
Registered: Jan 2012
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
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


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 08:14 AM.

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