www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/05/23/08:30:12

From: Manni Heumann <manni DOT heumann AT gmx DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Need a little help with make
Date: 23 May 2002 12:24:32 GMT
Lines: 26
Message-ID: <acin20$q11rn$1@ID-54749.news.dfncis.de>
NNTP-Posting-Host: computer-name.uni-bielefeld.de (129.70.100.226)
Mime-Version: 1.0
X-Trace: fu-berlin.de 1022156672 27297655 129.70.100.226 (16 1428 [54749])
User-Agent: Xnews/5.04.25
X-Face: "c)Go+A65AgR*9'!B)BMLM$kYg6HDG!_g'DAsj*ALo%=kp{X&abs&t\G0F~*r?VRj#|4=6)M.RJPnD]Ql:B<-7A^EAYFpDpZRMoJy?80^3B3b AT DXb%MTyOD.*4wu&Xt6o*+6`r5E
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi all!

I've got a tiny little makefile that does what it is supposed to do: 
compile the object files if needed and then build a binary.
Now I wanted to store all the .o files into a subdirectory. E.g. 
sources and makefile are in c:\src and .o's should go to c:\src\objs.

My makefile currently looks like this (simplified):

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?


TIA,

Manni

- Raw text -


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