2.9
[glibc/nacl-glibc.git] / sysdeps / sparc / sparc32 / Makefile
blob6529ad897bf0660a12677420a04c7eb3d3dc6573
1 # Copyright (C) 1991,92,93,94,95,96,97,98,2000 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, write to the Free
16 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 # 02111-1307 USA.
19 ifeq ($(subdir),gnulib)
20 sysdep_routines = dotmul umul $(divrem) alloca
21 endif # gnulib
23 ifeq ($(subdir),csu)
24 CFLAGS-initfini.s += -mcpu=v7
25 endif
27 # We distribute these files, even though they are generated,
28 # so as to avoid the need for a functioning m4 to build the library.
29 divrem := sdiv udiv rem urem
31 +divrem-NAME-sdiv := div
32 +divrem-NAME-udiv := udiv
33 +divrem-NAME-rem := rem
34 +divrem-NAME-urem := urem
35 +divrem-NAME = $(+divrem-NAME-$(basename $(notdir $@)))
36 +divrem-OP-div := div
37 +divrem-OP-udiv := div
38 +divrem-OP-rem := rem
39 +divrem-OP-urem := rem
40 +divrem-S-div := true
41 +divrem-S-rem := true
42 +divrem-S-udiv := false
43 +divrem-S-urem := false
44 $(divrem:%=$(sysdep_dir)/sparc/sparc32/%.S): $(sysdep_dir)/sparc/sparc32/divrem.m4
45 (echo "define(NAME,\`.$(+divrem-NAME)')\
46 define(OP,\`$(+divrem-OP-$(+divrem-NAME))')\
47 define(S,\`$(+divrem-S-$(+divrem-NAME))')\
48 /* This file is generated from divrem.m4; DO NOT EDIT! */"; \
49 cat $<) | $(M4) > $@-tmp
50 # Make it unwritable so noone will edit it by mistake.
51 -chmod a-w $@-tmp
52 mv -f $@-tmp $@
53 ifeq ($(with-cvs),yes)
54 test ! -d CVS || cvs commit -m'Regenerated from $<' $@
55 endif
57 sysdep-realclean := $(sysdep-realclean) $(divrem:%=sysdeps/sparc/sparc32/%.S)