1 NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi`
2 NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi`
4 # For the PowerPC, always add -mrelocatable-lib -mno-eabi. These are set for the
5 # multilibs, but are ignored when building the toplevel directory.
6 CFLAGS_MRELOCATABLE = -mrelocatable-lib -mno-eabi
8 INCLUDES = -I. -I$(srcdir)/.. -I$(objdir)/..
9 # Note that when building the library, ${MULTILIB} is not the way multilib
10 # options are passed; they're passed in $(CFLAGS).
11 CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
12 LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS}
16 $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) -O2 $(INCLUDES) -c $(CFLAGS) $<
19 $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) -O2 $(INCLUDES) -c $(CFLAGS) $<
21 $(AS) $(ASFLAGS_FOR_TARGET) $(ASFLAGS) -o $*.o $<
24 # GCC knows to run the preprocessor on .S files before it assembles them.
27 $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) $(INCLUDES) $(CFLAGS) -c $<
30 # this is a bogus target that'll produce an assembler from the
31 # C source with the right compiler options. this is so we can
32 # track down code generation or debug symbol bugs.
35 $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) -S $(INCLUDES) $(CFLAGS) $<