LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-06-2008, 12:58 PM   #1
HarryBoy
Member
 
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.

Thanks

Harry
 
Old 05-06-2008, 02:00 PM   #2
weibullguy
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 -> http://gcc.gnu.org/onlinedocs/gcc-4....ugging-Options
-Wall -> http://gcc.gnu.org/onlinedocs/gcc-4....arning-Options
-O2 -> http://gcc.gnu.org/onlinedocs/gcc-4....timize-Options
-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.
-D_REENTRANT -> http://everything2.com/e2node/-D_REENTRANT
-I -> http://gcc.gnu.org/onlinedocs/gcc-4....ectory-Options
-L -> http://www.gnu.org/software/libtool/...html#Link-mode

${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.
 
  


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
Makefile issue: "Makefile.src: File not found" m3rkury Linux - Software 1 02-22-2007 10:15 PM
automake, makefile, makefile.in and makefile.am Fond_of_Opensource Linux - Newbie 1 09-12-2006 08:35 PM
what is the meaning of Makefile,Makefile.am,Makefile.in 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 Makefile.in without calling ./configure ? chris78 Programming 2 05-02-2004 12:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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