Date: Thu, 23 May 2002 15:54:21 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Manni Heumann cc: djgpp AT delorie DOT com Subject: Re: Need a little help with make In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk On 23 May 2002, Manni Heumann wrote: > TARGET = rs.exe > CC = gpp > OBJECTS = main.o cstring.o config.o data.o > > $(TARGET) : $(OBJECTS) Makefile > $(CC) $(OBJECTS) -o $(TARGET) > > %.o : %.cpp Makefile > $(CC) $< -c -o $@ > > What would I have to change to get those object files into their own > directory? Two things come to mind: - add VPATH or vpath to tell Make to look into the special directory for object files; - change the %.o: %.cpp rule to produce *.o files in the special directory (tweak the "-o $@" part of the rule's command);