source: trunk/libs/newlib/src/libgloss/config/dos.mh @ 444

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

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

File size: 2.0 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/; fi`
3
4INCLUDES = -I.
5# Note that when building the library, ${MULTILIB} is not the way multilib
6# options are passed; they're passed in $(CFLAGS).
7CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
8LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS}
9ARFLAGS_FOR_TARGET = qc
10
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.
14CC_FOR_TARGET = `t='$(program_transform_name)'; echo gcc | sed -e $$t`
15
16AS_FOR_TARGET = `t='$(program_transform_name)'; echo as | sed -e $$t`
17
18AR_FOR_TARGET = `t='$(program_transform_name)'; echo ar | sed -e $$t`
19
20LD_FOR_TARGET = `t='$(program_transform_name)'; echo ld | sed -e $$t`
21
22RANLIB_FOR_TARGET = `t='$(program_transform_name)'; echo ranlib | sed -e $$t`
23
24OBJDUMP_FOR_TARGET = `t='$(program_transform_name)'; echo objdump | sed -e $$t`
25
26OBJCOPY_FOR_TARGET = `t='$(program_transform_name)'; echo objcopy | sed -e $$t`
27
28
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?
35
36.c.o:
37        rootme=`pwd` ; \
38        echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \
39        $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
40
41.c.s:
42        rootme=`pwd` ; \
43        echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \
44        $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) -S $(INCLUDES) $<
45
46.S.o:
47        rootme=`pwd` ; \
48        echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \
49        $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
50
51.s.o:
52        rootme=`pwd` ; \
53        echo AS_FOR_TARGET is ${AS_FOR_TARGET} ; \
54        $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) $(INCLUDES) -o $*.o $<
55
56
57
Note: See TracBrowser for help on using the repository browser.