Download your favorite Linux distribution at LQ ISO.
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!


  Search this Thread
Old 05-06-2008, 12:58 PM   #1
Registered: Apr 2008
Distribution: MontaVista Linux Version 4.0.1, Professional Edition
Posts: 215

Rep: Reputation: 16
Explain makefile please

Can someone please explain the followig two lines for me in plain English please.

CFLAGS = -g -Wall -O2 -MD -D_REENTRANT -I. -I${DFBINC}/directfb
LDFLAGS = -g -Wall -O2 -L${DFBLIB} -ldirectfb -lfusion -ldirect -lpthread

They are from a makefile which I am trying to understand.


Old 05-06-2008, 02:00 PM   #2
ReliaFree Maintainer
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
They provide directions for gcc (CFLAGS) and libtool (LDFLAGS). Google's a great tool....

-g ->
-Wall ->
-O2 ->
-MD -> Can't find a link but it means generate dependency information. This option generates a .d file in the current directory for each .c or .cc source file processed. These files are post-processed (replacing the incorrectly named target with the real target specified with -o, and adding the .d file), concatenated into one .d file that is named based on the target name, and put in the correct directory.
-I ->
-L ->

${DFBINC} is a variable defined earlier in the Makefile, probably /usr/include or /usr/local/include, and is the base path to C header files.
${DFBLIB} is a variable defined earlier in the Makefile, probably /usr/lib or /usr/local/lib, and is the path to the directory containing the libraries directfb, fusion, direct, and pthread.


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
Makefile issue: "Makefile.src: File not found" m3rkury Linux - Software 1 02-22-2007 10:15 PM
automake, makefile, and Fond_of_Opensource Linux - Newbie 1 09-12-2006 08:35 PM
what is the meaning of Makefile,, cynthia_thomas Linux - General 3 12-08-2005 05:00 AM
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 03:57 AM
generate Makefile from without calling ./configure ? chris78 Programming 2 05-02-2004 12:23 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:48 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration