Merge from mainline
[official-gcc.git] / gcc / config / sh / t-sh
blobdb86ad18c1de5d141bd6f3fd6e18291ce5ebb2f8
1 sh-c.o: $(srcdir)/config/sh/sh-c.c \
2   $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_H) $(TM_P_H) coretypes.h
3         $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/sh/sh-c.c
5 LIB1ASMSRC = sh/lib1funcs.asm
6 LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movmem \
7   _movmem_i4 _mulsi3 _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
8   $(LIB1ASMFUNCS_CACHE)
10 # We want fine grained libraries, so use the new code to build the
11 # floating point emulation libraries.
12 FPBIT = fp-bit.c
13 DPBIT = dp-bit.c
15 dp-bit.c: $(srcdir)/config/fp-bit.c
16         echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
17         echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
18         echo '#endif'           >> dp-bit.c
19         cat $(srcdir)/config/fp-bit.c >> dp-bit.c
21 fp-bit.c: $(srcdir)/config/fp-bit.c
22         echo '#define FLOAT' > fp-bit.c
23         echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
24         echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
25         echo '#endif'           >> fp-bit.c
26         cat $(srcdir)/config/fp-bit.c >> fp-bit.c
28 MULTILIB_ENDIAN = ml/mb
29 MULTILIB_CPUS= $(ML_sh1)$(ML_sh2a)$(ML_sh2a_nofpu)$(ML_sh2a_single_only)$(ML_sh2a_single)$(ML_sh2e)$(ML_sh2)$(ML_sh3e)$(ML_sh3)$(ML_sh4_nofpu)$(ML_sh4_single_only)$(ML_sh4_single)$(ML_sh4)$(ML_sh4a_nofpu)$(ML_sh4a_single_only)$(ML_sh4a_single)$(ML_sh4a)$(ML_sh5_32media)$(ML_sh5_32media_nofpu)$(ML_sh5_compact)$(ML_sh5_compact_nofpu)$(ML_sh5_64media)$(ML_sh5_64media_nofpu)
31 MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) $(MULTILIB_CPUS:/=)
32 MULTILIB_DIRNAMES= 
34 # The separate entries for m2a-nofpu and m2a-single-only with
35 # duplicate base libraries are there to make sure we don't ever use an
36 # m4* multilib for m2a or vice-versa; they are not compatible.  This
37 # is why sh2a and sh2a-single need their own multilibs.
38 MULTILIB_MATCHES = $(shell \
39   multilibs="$(MULTILIB_OPTIONS)" ; \
40   for abi in m1,m2,m3,m4-nofpu,m4al,m4a-nofpu m1,m2,m2a-nofpu \
41              m2e,m3e,m4-single-only,m4a-single-only m2e,m2a-single-only \
42              m4-single,m4a-single m4,m4a \
43              m5-32media,m5-compact,m5-32media \
44              m5-32media-nofpu,m5-compact-nofpu,m5-32media-nofpu; do \
45     subst= ; \
46     for lib in `echo $$abi|tr , ' '` ; do \
47       if test "`echo $$multilibs|sed s/$$lib//`" != "$$multilibs"; then \
48         subst=$$lib ; \
49       elif test x$$subst != x ; then \
50         echo $$subst=$$lib ; \
51       fi \
52     done \
53   done)
55 # SH1 only supports big endian.
56 MULTILIB_EXCEPTIONS = ml/m1 ml/m2a*
58 LIBGCC = stmp-multilib
59 INSTALL_LIBGCC = install-multilib
61 $(T)crt1.o: $(srcdir)/config/sh/crt1.asm $(GCC_PASSES)
62         $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crt1.o -x assembler-with-cpp $(srcdir)/config/sh/crt1.asm
63 $(T)crti.o: $(srcdir)/config/sh/crti.asm $(GCC_PASSES)
64         $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/sh/crti.asm
65 $(T)crtn.o: $(srcdir)/config/sh/crtn.asm $(GCC_PASSES)
66         $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/sh/crtn.asm
68 $(out_object_file): gt-sh.h
69 gt-sh.h : s-gtype ; @true
71 # These are not suitable for COFF.
72 # EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o
74 # Local Variables:
75 # mode: Makefile
76 # End: