From 03261851a10dd2d6900a0a00a7515a0a46fb5d76 Mon Sep 17 00:00:00 2001 From: Ranjith Kumaran Date: Fri, 17 Mar 2000 22:48:54 +0000 Subject: 20000317 sourceware import --- libgloss/config/dos.mh | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 libgloss/config/dos.mh (limited to 'libgloss/config/dos.mh') diff --git a/libgloss/config/dos.mh b/libgloss/config/dos.mh new file mode 100644 index 000000000..c5874cb42 --- /dev/null +++ b/libgloss/config/dos.mh @@ -0,0 +1,57 @@ +NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi` +NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/; fi` + +INCLUDES = -I. +# Note that when building the library, ${MULTILIB} is not the way multilib +# options are passed; they're passed in $(CFLAGS). +CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS} +LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS} +ARFLAGS_FOR_TARGET = qc + +# find the tools used to build libgloss. As this is a DOS build in a +# 3way cross, we have to specify the name as it lives prebuilt in Unix +# land. The freshly built tools are for the wrong architecture. +CC_FOR_TARGET = `t='$(program_transform_name)'; echo gcc | sed -e $$t` + +AS_FOR_TARGET = `t='$(program_transform_name)'; echo as | sed -e $$t` + +AR_FOR_TARGET = `t='$(program_transform_name)'; echo ar | sed -e $$t` + +LD_FOR_TARGET = `t='$(program_transform_name)'; echo ld | sed -e $$t` + +RANLIB_FOR_TARGET = `t='$(program_transform_name)'; echo ranlib | sed -e $$t` + +OBJDUMP_FOR_TARGET = `t='$(program_transform_name)'; echo objdump | sed -e $$t` + +OBJCOPY_FOR_TARGET = `t='$(program_transform_name)'; echo objcopy | sed -e $$t` + + +# Using CFLAGS here may be confusing if the user has given a special +# CFLAGS intended for use on the host, since we are passing it to the +# cross-compiler; I'm not sure what to do about this. INCLUDES is +# from the top level Makefile. +# FIXME: But isn't CFLAGS what is used to pass multilib options when +# building the library? + +.c.o: + rootme=`pwd` ; \ + echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \ + $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $< + +.c.s: + rootme=`pwd` ; \ + echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \ + $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) -S $(INCLUDES) $< + +.S.o: + rootme=`pwd` ; \ + echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \ + $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $< + +.s.o: + rootme=`pwd` ; \ + echo AS_FOR_TARGET is ${AS_FOR_TARGET} ; \ + $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) $(INCLUDES) -o $*.o $< + + + -- cgit v1.2.3