X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: X-Originating-IP: [70.50.143.121] X-Originating-Email: [april_white AT sympatico DOT ca] Message-ID: <42FE7EFF.6090200@sympatico.ca> Date: Sat, 13 Aug 2005 19:15:11 -0400 From: April White User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: djgpp Subject: help with a makefile Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 13 Aug 2005 23:15:12.0647 (UTC) FILETIME=[DB4AB970:01C5A05C] Reply-To: djgpp AT delorie DOT com Hello, I am trying to set up a Makefile so that I may compile my c++ code using DJGPP and MingW into sub-folders, using the environment variable ENV to hold the target name I first thought I could use the VPATH variable and use 'make -C $(ENV)' but, after changing into the sub-folder, it always reports: *** No targets specified and no makefile found. Stop I then remove VPATH and tried the vpath variable: vpath %.o $(ENV) and to specify $(ENV) as part of the -o for compiling and linking: .cxx.o: $(CC) $(CXXFLAGS) -c $< -o $(ENV)/$@ %.exe: %.o $(CC) $(LDFLAGS) -o $(ENV)/$@ $^ $(LOADLIBS) This compiles all the .o but does not link the .exe in the first invocation of make - none of the .o files have the $(ENV) path. A second invocation of make will call the linker Can someone give me assistance with this? April