[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make can not find .cpp file, any general comments or suggestions to
From: |
Paul D. Smith |
Subject: |
Re: make can not find .cpp file, any general comments or suggestions to debug? |
Date: |
Sun, 7 May 2006 15:08:33 -0400 |
%% Lin George <address@hidden> writes:
lg> Thank you Greg!
lg> A great answer!
>> If you only want to preprocess a file, you could use
>> CPP = gcc
>> $(CPP) $(CPPFLAGS) -E source.o -o source.i
I don't recommend this, actually: to be more correct you should use:
CPP = gcc -E
Then something like:
COMPILE.i = $(CPP) $(CPPFLAGS) -o $@
%.i : %.c
$(COMPILE.i) $<
%.i : %.cc
$(COMPILE.i) $<
The -E flag is what tells "gcc" to stop after the preprocessing stage,
and so it more correctly belongs directly in the CPP macro. If you were
using a different preprocessor, like "cpp" directly, you would want to
replace the entire thing and not have the extra "-E" lying around.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
- Re: make can not find .cpp file, any general comments or suggestions to debug?, (continued)
- Re: make can not find .cpp file, any general comments or suggestions to debug?, Dave Hylands, 2006/05/04
- Re: make can not find .cpp file, any general comments or suggestions to debug?, Paul D. Smith, 2006/05/04
- Re: make can not find .cpp file, any general comments or suggestions to debug?, Lin George, 2006/05/07
- Re: make can not find .cpp file, any general comments or suggestions to debug?, Paul D. Smith, 2006/05/07
- Re: make can not find .cpp file, any general comments or suggestions to debug?, Lin George, 2006/05/08
Re: make can not find .cpp file, any general comments or suggestions to debug?, Lin George, 2006/05/04
- Re: make can not find .cpp file, any general comments or suggestions to debug?, Dave Hylands, 2006/05/04
- Re: make can not find .cpp file, any general comments or suggestions to debug?, Greg Chicares, 2006/05/04
- Re: make can not find .cpp file, any general comments or suggestions to debug?, Lin George, 2006/05/07
- Re: make can not find .cpp file, any general comments or suggestions to debug?,
Paul D. Smith <=
- Re: make can not find .cpp file, any general comments or suggestions to debug?, Lin George, 2006/05/08
- Re: make can not find .cpp file, any general comments or suggestions to debug?, Paul D. Smith, 2006/05/08