[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: makefile to get iostream.h, etc



"Paul Scott,,," <waterhorse@ultrasw.com> writes:

> Paul Scott,,, wrote:
>
>> Colin Watson wrote:
>>
>>> On Fri, Jun 28, 2002 at 01:45:41AM -0700, Paul Scott,,, wrote:
>>>
>>> I would guess that naming C++ source files foo.c doesn't help. Try
>>> foo.cpp instead, and then make's default rules will be more useful to
>>> you.
>>>
>>
>>
>> Silly me.  That makes sense.  I'll let you know if it doesn't work.
>
>
> It didn't.  Here's what I have so far.  I didn't see anything in 'info
> make'.  I have programming with GNU Software as a reference but it
> doesn't say much about g++ with make.  I'm an incremental
> programmer. This looked like almost enough:
>
> LIBS = -lm
>
> OBJS = fixext2fs.o Ext2fs.o display.o
>
> DEBUGOBJS = fixext2fs.do Ext2fs.do display.do
>
> EXECNAME = fixext2fs
>
> fixext2fs: $(OBJS)
$(EXECNAME): $(OBJS)

>    g++ -o $(EXECNAME) $(OBJS) $(LIBS)
>
> debug: $(DEBUGOBJS)
>    g++ -o $(EXECNAME) $(DEBUGOBJS)
>
> fixext2fs.o: fixext2fs.cpp
This shouldn't be necessary...

> clean:
>    rm *.o *.do *~
>    rm fixext2fs
     -rm $(OBJS) $(DEBUGOBS) $(EXECNAME) *~

What output do you get when you run make, including the g++ statements?

-- 
Brian Nelson <nelson@bignachos.com>


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: