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/; fi`
5 # Note that when building the library, ${MULTILIB} is not the way multilib
6 # options are passed; they're passed in $(CFLAGS).
7 CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
8 LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS}
9 ARFLAGS_FOR_TARGET = qc
11 # find the tools used to build libgloss. As this is a DOS build in a
12 # 3way cross, we have to specify the name as it lives prebuilt in Unix
13 # land. The freshly built tools are for the wrong architecture.
14 CC_FOR_TARGET = `t='$(program_transform_name)'; echo gcc | sed -e $$t`
16 AS_FOR_TARGET = `t='$(program_transform_name)'; echo as | sed -e $$t`
18 AR_FOR_TARGET = `t='$(program_transform_name)'; echo ar | sed -e $$t`
20 LD_FOR_TARGET = `t='$(program_transform_name)'; echo ld | sed -e $$t`
22 RANLIB_FOR_TARGET = `t='$(program_transform_name)'; echo ranlib | sed -e $$t`
24 OBJDUMP_FOR_TARGET = `t='$(program_transform_name)'; echo objdump | sed -e $$t`
26 OBJCOPY_FOR_TARGET = `t='$(program_transform_name)'; echo objcopy | sed -e $$t`
29 # Using CFLAGS here may be confusing if the user has given a special
30 # CFLAGS intended for use on the host, since we are passing it to the
31 # cross-compiler; I'm not sure what to do about this. INCLUDES is
32 # from the top level Makefile.
33 # FIXME: But isn't CFLAGS what is used to pass multilib options when
34 # building the library?
38 echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \
39 $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
43 echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \
44 $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) -S $(INCLUDES) $<
48 echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \
49 $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
53 echo AS_FOR_TARGET is ${AS_FOR_TARGET} ; \
54 $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) $(INCLUDES) -o $*.o $<