1 # Copyright (C) 1991-1998, 2000, 2011 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, see
16 # <http://www.gnu.org/licenses/>.
18 ifeq ($(subdir
),gnulib
)
19 sysdep_routines
= dotmul umul
$(divrem
) alloca
23 CFLAGS-initfini.s
+= -mcpu
=v7
26 # We distribute these files, even though they are generated,
27 # so as to avoid the need for a functioning m4 to build the library.
28 divrem
:= sdiv udiv rem urem
30 +divrem-NAME-sdiv
:= div
31 +divrem-NAME-udiv
:= udiv
32 +divrem-NAME-rem
:= rem
33 +divrem-NAME-urem
:= urem
34 +divrem-NAME
= $(+divrem-NAME-
$(basename $(notdir $@
)))
36 +divrem-OP-udiv
:= div
38 +divrem-OP-urem
:= rem
41 +divrem-S-udiv
:= false
42 +divrem-S-urem
:= false
43 $(divrem
:%=$(sysdep_dir
)/sparc
/sparc32
/%.S
): $(sysdep_dir
)/sparc
/sparc32
/divrem.m4
44 (echo
"define(NAME,\`.$(+divrem-NAME)')\
45 define(OP,\`$(+divrem-OP-$(+divrem-NAME))')\
46 define(S,\`$(+divrem-S-$(+divrem-NAME))')\
47 /* This file is generated from divrem.m4; DO NOT EDIT! */"; \
48 cat
$<) |
$(M4
) > $@
-tmp
49 # Make it unwritable so noone will edit it by mistake.
53 sysdep-realclean
:= $(sysdep-realclean
) $(divrem
:%=sysdeps
/sparc
/sparc32
/%.S
)