source: trunk/libs/newlib/src/libgloss/config/ppc.mh @ 671

Last change on this file since 671 was 444, checked in by satin@…, 7 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 1.4 KB
Line 
1NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi`
2NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi`
3
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.
6CFLAGS_MRELOCATABLE = -mrelocatable-lib -mno-eabi
7
8INCLUDES = -I. -I$(srcdir)/..
9# Note that when building the library, ${MULTILIB} is not the way multilib
10# options are passed; they're passed in $(CFLAGS).
11CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
12LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS}
13AR_FLAGS = qc
14
15.c.o:
16        $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) -O2 $(INCLUDES) -c $(CFLAGS) $<
17
18.C.o:
19        $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) -O2 $(INCLUDES) -c $(CFLAGS) $<
20.s.o:
21        $(AS) $(ASFLAGS_FOR_TARGET) $(INCLUDES) $(ASFLAGS) -o $*.o $<
22
23#
24# GCC knows to run the preprocessor on .S files before it assembles them.
25#
26.S.o:
27        $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) $(INCLUDES) $(CFLAGS) -c $<
28
29#
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.
33#
34.c.s:
35        $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) -S $(INCLUDES) $(CFLAGS) $<
Note: See TracBrowser for help on using the repository browser.