Make Q's
    Kevin D. Clark 
    kevin_d_clark at comcast.net
       
    Thu Sep 17 12:03:20 EDT 2009
    
    
  
bruce.labitt at 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
# 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
Hope this helps,
--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