Home | History | Annotate | Line # | Download | only in cris
t-cris revision 1.1
      1  1.1  mrg #
      2  1.1  mrg # t-cris
      3  1.1  mrg #
      4  1.1  mrg # The Makefile fragment to include when compiling gcc et al for CRIS.
      5  1.1  mrg #
      6  1.1  mrg # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
      7  1.1  mrg #
      8  1.1  mrg # This file is part of GCC.
      9  1.1  mrg #
     10  1.1  mrg # GCC is free software; you can redistribute it and/or modify
     11  1.1  mrg # it under the terms of the GNU General Public License as published by
     12  1.1  mrg # the Free Software Foundation; either version 3, or (at your option)
     13  1.1  mrg # any later version.
     14  1.1  mrg #
     15  1.1  mrg # GCC is distributed in the hope that it will be useful,
     16  1.1  mrg # but WITHOUT ANY WARRANTY; without even the implied warranty of
     17  1.1  mrg # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     18  1.1  mrg # GNU General Public License for more details.
     19  1.1  mrg #
     20  1.1  mrg # You should have received a copy of the GNU General Public License
     21  1.1  mrg # along with GCC; see the file COPYING3.  If not see
     22  1.1  mrg # <http://www.gnu.org/licenses/>.
     23  1.1  mrg #
     24  1.1  mrg # The makefile macros etc. are included in the order found in the
     25  1.1  mrg # section "Target Fragment" in the gcc info-files (or the paper copy) of
     26  1.1  mrg # "Using and Porting GCC"
     27  1.1  mrg 
     28  1.1  mrg LIB2FUNCS_EXTRA = _udivsi3.c _divsi3.c _umodsi3.c _modsi3.c
     29  1.1  mrg CRIS_LIB1CSRC = $(srcdir)/config/cris/arit.c
     30  1.1  mrg 
     31  1.1  mrg FPBIT = tmplibgcc_fp_bit.c
     32  1.1  mrg DPBIT = dp-bit.c
     33  1.1  mrg 
     34  1.1  mrg dp-bit.c: $(srcdir)/config/fp-bit.c
     35  1.1  mrg 	echo '#define FLOAT_BIT_ORDER_MISMATCH' > dp-bit.c
     36  1.1  mrg 	cat $(srcdir)/config/fp-bit.c           >> dp-bit.c
     37  1.1  mrg 
     38  1.1  mrg # Use another name to avoid confusing SUN make, if support for
     39  1.1  mrg # it is reinstated elsewhere.  Prefixed with "tmplibgcc" means
     40  1.1  mrg # "make clean" will wipe it.  We define a few L_ thingies
     41  1.1  mrg # because we can't select them individually through FPBIT_FUNCS;
     42  1.1  mrg # see above.
     43  1.1  mrg tmplibgcc_fp_bit.c: $(srcdir)/config/fp-bit.c
     44  1.1  mrg 	echo '#define FLOAT_BIT_ORDER_MISMATCH' >  $@
     45  1.1  mrg 	echo '#define FLOAT'			>> $@
     46  1.1  mrg 	cat $(srcdir)/config/fp-bit.c		>> $@
     47  1.1  mrg 
     48  1.1  mrg # The fixed-point arithmetic code is in one file, arit.c,
     49  1.1  mrg # similar to libgcc2.c (or the old libgcc1.c).  We need to
     50  1.1  mrg # "split it up" with one file per define.
     51  1.1  mrg $(LIB2FUNCS_EXTRA): $(CRIS_LIB1CSRC)
     52  1.1  mrg 	name=`echo $@ | sed -e 's,.*/,,' | sed -e 's,.c$$,,'`; \
     53  1.1  mrg 	echo "#define L$$name" > tmp-$@ \
     54  1.1  mrg 	&& echo '#include "$<"' >> tmp-$@ \
     55  1.1  mrg 	&& mv -f tmp-$@ $@
     56  1.1  mrg 
     57  1.1  mrg $(out_object_file): gt-cris.h
     58  1.1  mrg gt-cris.h : s-gtype ; @true
     59