Article View: be.comp.programming
Article #6854GNU Make
From: Rudy Gevaert
Date: Tue, 19 Nov 2002 22:48
Date: Tue, 19 Nov 2002 22:48
41 lines
1892 bytes
1892 bytes
Hallo,
Ik probeer een Makefile ineen te steken waarbij alle sources in de dir
./src/ staan en waarbij alle gecompileerde bestanden in ./build/
zouden moeten komen.
Het volgende heb ik al:
srcdir = .
CC := g++
CFLAGS := -g -Wall
LFLAGS :=
VPATH := $(srcdir)/src
objects = Item.o Lid.o Geleend.o Databank.o
all: $(objects)
$(CC) -o main $(objects)
Item.o: Item.cpp Item.h
Lid.o: Lid.cpp Lid.h
Geleend.o: Geleend.cpp Geleend.h
Databank.o: Databank.cpp Databank.h
.PHONY : clean
clean:
rm build/*
Maar als ik het goed door heb worden hier de gecompileerde bestanden
in de . dir gezet. Hoe kan ik maken dat ze in ./build komen?
Bedankt op voorhand,
--
Rudy Gevaert - info@webworm.org - http://www.webworm.org
http://savannah.gnu.org/projects/glms [glms admin]
http://savannah.gnu.org/ [savannah developer] GNU/Linux advocate -
http://www.gnu.org/
To sit alone with my conscience will be judgment enough for me.
- Charles William Stubbs
Technical Details
Message-ID:
<aref41$ijh$1@gaudi2.rug.ac.be>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.online.be!syros.belnet.be!news.belnet.be!news.rug.ac.be!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: fcea4,9ccfd14ff8e7cc93,start
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2002-11-19 16:42:39 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.online.be!syros.belnet.be!news.belnet.be!news.rug.ac.be!not-for-mail
From: Rudy Gevaert <rudy@zeus.rug.ac.be>
Newsgroups: be.comp.programming
Subject: GNU Make
Date: Tue, 19 Nov 2002 22:48:33 +0000 (UTC)
Organization: Ghent University
Lines: 41
Message-ID: <aref41$ijh$1@gaudi2.rug.ac.be>
NNTP-Posting-Host: zeus.rug.ac.be
X-Trace: gaudi2.rug.ac.be 1037746113 19057 157.193.41.38 (19 Nov 2002 22:48:33 GMT)
X-Complaints-To: helpdesk@arc.rug.ac.be
NNTP-Posting-Date: Tue, 19 Nov 2002 22:48:33 +0000 (UTC)
User-Agent: tin/1.5.12-20020311 ("Toxicity") (UNIX) (Linux/2.4.19 (i586))