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