| delorie.com/archives/browse.cgi | search |
| Date: | Thu, 23 May 2002 15:54:21 +0300 (IDT) |
| From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
| X-Sender: | eliz AT is |
| To: | Manni Heumann <manni DOT heumann AT gmx DOT de> |
| cc: | djgpp AT delorie DOT com |
| Subject: | Re: Need a little help with make |
| In-Reply-To: | <acin20$q11rn$1@ID-54749.news.dfncis.de> |
| Message-ID: | <Pine.SUN.3.91.1020523155109.906B-100000@is> |
| MIME-Version: | 1.0 |
| 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 |
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);
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |