🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #3709

make: making the binary name dependent on the source file name.

#3709
From: Ido Yehieli
Date: Thu, 03 Jan 2008 10:08
17 lines
1787 bytes
Hi,
    I have several source files in a directory (which are different
versions of the same program), and I want gnu make to compile each of
them and name the resulting binaries according to the source name.

for example, if i write:

====Begin Makefile====
somefile: somefile.*.o
	cc $? -o $@
====end of Makefile====

it will compile all my files but will of course only produce one
binary(somefile). I want it to produce a binary named somefile.* for
every somefile.*.c source file i have.

-Ido.
Technical Details
Message-ID: <c1b4736d-b971-4d80-9025-08b6c24d113f@e10g2000prf.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!e10g2000prf.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: fc89c,bf5d4a540fd6d2ce,start
X-Google-Thread: 109f73,bf5d4a540fd6d2ce,start
X-Google-Attributes: gidfc89c,gid109f73,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!e10g2000prf.googlegroups.com!not-for-mail
From: Ido Yehieli <Ido.Yehieli@gmail.com>
Newsgroups: comp.unix.programmer, gnu.utils.help
Subject: make: making the binary name dependent on the source file name.
Date: Thu, 3 Jan 2008 02:08:53 -0800 (PST)
Organization: http://groups.google.com
Lines: 17
Message-ID: <c1b4736d-b971-4d80-9025-08b6c24d113f@e10g2000prf.googlegroups.com>
NNTP-Posting-Host: 84.114.134.61
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1199354933 30479 127.0.0.1 (3 Jan 2008 10:08:53 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 3 Jan 2008 10:08:53 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: e10g2000prf.googlegroups.com; posting-host=84.114.134.61; 
 posting-account=_nTWogoAAAA7OLN1CthbK_jsuB6r9nhc
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) 
 Gecko/20071204 Ubuntu/7.10 (gutsy) Firefox/2.0.0.11,gzip(gfe),gzip(gfe)