delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/05/24/07:22:33

Date: Fri, 24 May 2002 14:18:07 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-Id: <2110-Fri24May2002141807+0300-eliz@is.elta.co.il>
X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9
In-reply-to: <acj04h$q4192$1@ID-54749.news.dfncis.de> (message from Manni
Heumann on 23 May 2002 14:59:29 GMT)
Subject: Re: Need a little help with make
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1020523172135 DOT 1980A-100000 AT is> <acj04h$q4192$1 AT ID-54749 DOT news DOT dfncis DOT de>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Manni Heumann <manni DOT heumann AT gmx DOT de>
> Newsgroups: comp.os.msdos.djgpp
> Date: 23 May 2002 14:59:29 GMT
> 
> Sorry, this was not quite correct. The *.o files are only produced 
> when they are not up to date. But the error messge remains.
> 
> > Was that before or after you started to use VPATH?  If before,
> > try adding VPATH and see if it helps.  If after, please show
> > your Makefile after all the changes.
> 
> After! It happened after I added a VPATH statement. Here's my 
> makefile:
> 
> TARGET = rs.exe
> CC = gpp
> VPATH=objs
> OBJECTS = main.o cstring.o config.o data.o
> 
> $(TARGET) : $(OBJECTS)
> 	$(CC) $(OBJECTS) $(LDFLAGS) -o $(TARGET)
> 
> %.o : %.cpp
> 	$(CC) $< $(WARNINGS) $(CXXFLAGS) -c -o $(VPATH)\$@

Try using GPATH instead of VPATH.  If that doesn't help either, try
using a simpler Makefile:

TARGET = rs.exe
CC = gpp
OBJECTS = objs/main.o objs/cstring.o objs/config.o objs/data.o

$(TARGET) : $(OBJECTS)
	$(CC) $(OBJECTS) $(LDFLAGS) -o $(TARGET)

objs/%.o : %.cpp
	$(CC) $< $(WARNINGS) $(CXXFLAGS) -c -o objs/$@

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019