Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Richard Heathfield Newsgroups: comp.lang.c Subject: Re: How to compile several C files Date: Tue, 7 Feb 2017 15:42:10 +0000 Organization: Fix this later Lines: 29 Message-ID: References: <87a89yca76.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 7 Feb 2017 15:40:25 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="3e997681e36c87f077536d8573f890ef"; logging-data="24661"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19v2OqZDS+5MbgKodb97uNsAfhrBBmxKS7ZVVXH6y+gng==" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 In-Reply-To: <87a89yca76.fsf@bsb.me.uk> Cancel-Lock: sha1:s0ioh05uZu4dTX00ZfjKTktukuM= Xref: csiph.com comp.lang.c:103369 On 07/02/17 15:06, Ben Bacarisse wrote: > Once I have two files, I write a makefile. I'm slightly lazier than that. Once I have /one/ file, I write a makefile. To be more precise, I'm even lazier than /that/ - I run a program to write the makefile on my behalf: makegen foo > Makefile which generates a simple makefile for turning foo.c into foo (the executable file). (If I were lazier still, I would rewrite makegen to write everything to Makefile by default.) And before anyone asks, yes, I can feed multiple files to it (the first is taken as the executable output filename); yes, I can feed extra flags to it via -e=whatever; and yes, I can tell it about libraries using -lwhatever. I'm not saying it generates a /great/ makefile. But it does all that I require of it. -- Richard Heathfield Email: rjh at cpax dot org dot uk "Usenet is a strange place" - dmr 29 July 1999 Sig line 4 vacant - apply within