[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Preprocessing files with make
From: |
Colin S. Miller |
Subject: |
Re: Preprocessing files with make |
Date: |
Thu, 19 Aug 2004 11:11:56 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 |
Thanks for the reply but perhaps I was a little unclear. The problem I have is
to make the rule to preprocess the files.
E.i what i want is this
source/dir1/source.c -> preprocessed/source.d
The easy party is to construct a variable wich contain the source files
and preprocessed files but i dont know how to use them.
I hope my intent is clear now. I think this is a trivial task for someone
with a great knowledge of make then I have.
Thanks,
Erik
Make isn't concerned about what format
the source files are in, you
neeed to know how to make gcc (or compiler
of your choice) preprocess a C file,
but not compile it. For gcc it's the
'-E' option.
The following makefile should work ( '.i' is
gcc's prefered extension for preprocessed files,
not '.d' )
#Start example makefile
ALL: foo
foo.i: foo.c
gcc -E -o foo.i foo.c
foo.o: foo.i
gcc -c -o foo.o foo.i
foo: foo.o
gcc -o foo foo.o
#end example makefile
HTH,
Colin S. Miller
- Preprocessing files with make, Erik Cato, 2004/08/18
- Re: Preprocessing files with make, Gisle Vanem, 2004/08/18
- Re: Preprocessing files with make, Erik Cato, 2004/08/19
- Re: Preprocessing files with make, Gisle Vanem, 2004/08/19
- Re: Preprocessing files with make,
Colin S. Miller <=
- Re: Preprocessing files with make, Erik Cato, 2004/08/19
- Re: Preprocessing files with make, Michael Chastain, 2004/08/19
- Message not available
- Re: Preprocessing files with make, Erik Cato, 2004/08/28
- Re: Preprocessing files with make, Paul D. Smith, 2004/08/28
- Re: Preprocessing files with make, Michael Chastain, 2004/08/28
- Message not available
- Re: Preprocessing files with make, Paul D. Smith, 2004/08/29
- Re: Preprocessing files with make, Michael Chastain, 2004/08/29
- Message not available
- Re: Preprocessing files with make, Paul D. Smith, 2004/08/29
- Re: Preprocessing files with make, Michael Chastain, 2004/08/29
- Re: Preprocessing files with make, Paul D. Smith, 2004/08/31