kevin_d_cl...@comcast.net (Kevin D. Clark) wrote on 09/17/2009 12:03:20 PM:
> > bruce.lab...@autoliv.com writes: > > > There are two files that need to be compiled with gcc, and five with g++. > > (completely un-tested) > > MYFLAGS=-g -Werror -Wall -Wcast-qual > CFLAGS=$(MYFLAGS) > CXXFLAGS=$(MYFLAGS) > > # 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? > > # file1 and file2 are C files, the rest are C++ files > OBJS=file1.o file2.o file3.o file4.o file5.o file6.o file7.o > > .PHONY: all clean war > > all: myproject > > clean: $(RM) $(OBJS) myproject.o > > myproject: myproject.o $(OBJS) > $(CXX) $(CXXFLAGS) $+ -o $@ $(LDFLAGS) > > war: > @echo make love not war > > How is CXX defined? Will this automagically select gcc for *.c and g++ for *.cpp? How can the dependencies (header files) be pulled in? > > Hope this helps, > > --kevin > -- > GnuPG ID: B280F24E God, I loved that Pontiac. > alumni.unh.edu!kdc -- Tom Waits > http://kdc-blog.blogspot.com/ ****************************** Neither the footer nor anything else in this E-mail is intended to or constitutes an <br>electronic signature and/or legally binding agreement in the absence of an <br>express statement or Autoliv policy and/or procedure to the contrary.<br>This E-mail and any attachments hereto are Autoliv property and may contain legally <br>privileged, confidential and/or proprietary information.<br>The recipient of this E-mail is prohibited from distributing, copying, forwarding or in any way <br>disseminating any material contained within this E-mail without prior written <br>permission from the author. If you receive this E-mail in error, please <br>immediately notify the author and delete this E-mail. Autoliv disclaims all <br>responsibility and liability for the consequences of any person who fails to <br>abide by the terms herein. <br> ****************************** _______________________________________________ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/