Mail Archives: djgpp/2003/08/16/12:43:10
Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> wrote:
: Martin Str|mberg <ams AT speedy DOT ludd DOT luth DOT se> wrote:
:> and in y.S:
:> #include "x.h"
: That makes sense only rather rarely ...
How should I use the same constants in C source and in assmebly
source then? E. g. DEBUG in my example.
:> 1. What should I do to make this work nicely with prototypes and
:> structs in header files?
: Enclose the C-only parts in some #ifdef, e.g. #ifdef __GNUC__ or
: whatever.
Which define makes a good C<->assembly discriminator? __GNUC__?
:> 2. Why is CFLAGS missing while compiling y.S
: Because, obviously, y.S is not a C source file! You wouldn't expect
: the C++, Fortran or lex flags to be applied to assembler either, would
: you?
No. But for those I'd expect gpp, g77 or flex be called not gcc. In
this case gcc _was_ called, hence I thought CFLAGS should apply.
If you make make compile C++, Fortran or lex code with gcc (weird,
but...) I'd expect CFLAGS to be used.
Right,
MartinS
- Raw text -