1 |
148 |
jeremybenn |
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`
|
3 |
|
|
|
4 |
|
|
INCLUDES = -I.
|
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
|
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.
|
14 |
|
|
CC_FOR_TARGET = `t='$(program_transform_name)'; echo gcc | sed -e $$t`
|
15 |
|
|
|
16 |
|
|
AS_FOR_TARGET = `t='$(program_transform_name)'; echo as | sed -e $$t`
|
17 |
|
|
|
18 |
|
|
AR_FOR_TARGET = `t='$(program_transform_name)'; echo ar | sed -e $$t`
|
19 |
|
|
|
20 |
|
|
LD_FOR_TARGET = `t='$(program_transform_name)'; echo ld | sed -e $$t`
|
21 |
|
|
|
22 |
|
|
RANLIB_FOR_TARGET = `t='$(program_transform_name)'; echo ranlib | sed -e $$t`
|
23 |
|
|
|
24 |
|
|
OBJDUMP_FOR_TARGET = `t='$(program_transform_name)'; echo objdump | sed -e $$t`
|
25 |
|
|
|
26 |
|
|
OBJCOPY_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 |
|
|
|