Make Q's

Kevin D. Clark kevin_d_clark at comcast.net
Thu Sep 17 16:54:18 EDT 2009


bruce.labitt writes:

> Kevin D. Clark wrote on 09/17/2009 12:03:20 PM:

> > # we define _XOPEN_SOURCE because....
> > # we define _GNU_SOURCE because ....
> > # modify to suit to your situation
> > CPPFLAGS=-D_XOPEN_SOURCE=500 -D_GNU_SOURCE
> 
> where are CPPFLAGS used below?

They're not ; my example relies upon GNU Make's well known implicit
rules, documented here:

http://www.gnu.org/software/make/manual/make.html#Catalogue-of-Rules

> How is CXX defined?  Will this automagically select gcc for *.c and g++ 
> for *.cpp?

  $ cat ~/Makefile.test 
  
  all:
          @echo CC is $(CC) and CXX is $(CXX)
  $ make -f ~/Makefile.test
  CC is cc and CXX is g++
  $ cc -v ...


> How can the dependencies (header files) be pulled in?

That is harder to do.  "gcc -M" might do a large part of what you are
looking for.  You'll need to get very adept at these things in order to
make this aspect work.

--kevin
-- 
GnuPG ID: B280F24E                God, I loved that Pontiac.
alumni.unh.edu!kdc                -- Tom Waits
http://kdc-blog.blogspot.com/     


More information about the gnhlug-discuss mailing list