Re: need some help with a makefile

From: Eric (BorgMotherShip_at_AliensR_US.org)
Date: 06/11/05


Date: Fri, 10 Jun 2005 21:50:14 -0700

Jeroen Geilman wrote:

> Eric wrote:
>> I'm trying to come up with a makefile that will do the following:
>> for each .c or .cpp file in the current dir compile it to an
>> executable with the output file "<source file>.cgi"
>> assume each program is one source file
>>
>> I was doing it by listing each file as a source and specifying its target
>> but i dont like it, its to clumsy, i'd rather have a rule to compile .c
>> another rule to compile .cpp and then gather a list of .c and .cpp files
>> compiling each one to a cgi as we go
>>
>> Can someone help on this?
>
> Check the GNU make manual:
> http://www.gnu.org/software/make/manual/html_chapter/make_4.html#SEC33
>
>
>
Thats half of what I'm after i think, but that is referring to making ONE
program from a lot of files, i want to make MANY programs - each from one c
file.
Thanks for the file pointer tho, I'm going to bookmark it
Eric



Relevant Pages

  • Re: SH4 bootloader
    ... BUILD: Will Compile ... Maybe something is wrong in source file, but I had compared it with other source files and I could not see any difference. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: .class file source dependency
    ... I change one .java source file. ... In others, the other class is still okay, but the bytecode generated for it will change - the old bytecode won't work, the source code will compile, and the new source code will work. ... public static void main(String... ...
    (comp.lang.java.programmer)
  • Re: Looking for a free basic compiler for DOS
    ... mother of an ide file - and created separate source files for each SUB ... big to compile in one bc step. ... the source for all the SUBS in the same source file. ...
    (comp.lang.basic.misc)
  • Re: disabling parse error in gcc
    ... typedef struct MYSTRUCT{ ... it will compile correctly. ... A header file shall permit multiple inclusion of itself. ... so that a source file containing only TWO #includes of it will compile, ...
    (comp.unix.programmer)
  • Re: A funny yet crazy extreme test on Delphi 7 compiler
    ... The RAM is 1G. ... A project with a major source file names TestCase.pas. ... Delphi can compile crazy functions with 999 parameters. ...
    (borland.public.delphi.non-technical)