Update copyright dates with scripts/update-copyrights.
[glibc.git] / sysdeps / sparc / sparc32 / Makefile
blob308fc318b319751bffa396c517da65b1a41578d9
1 # Copyright (C) 1991-2015 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
20 endif # gnulib
22 # We distribute these files, even though they are generated,
23 # so as to avoid the need for a functioning m4 to build the library.
24 divrem := sdiv udiv rem urem
26 +divrem-NAME-sdiv := div
27 +divrem-NAME-udiv := udiv
28 +divrem-NAME-rem := rem
29 +divrem-NAME-urem := urem
30 +divrem-NAME = $(+divrem-NAME-$(basename $(notdir $@)))
31 +divrem-OP-div := div
32 +divrem-OP-udiv := div
33 +divrem-OP-rem := rem
34 +divrem-OP-urem := rem
35 +divrem-S-div := true
36 +divrem-S-rem := true
37 +divrem-S-udiv := false
38 +divrem-S-urem := false
39 $(divrem:%=$(sysdep_dir)/sparc/sparc32/%.S): $(sysdep_dir)/sparc/sparc32/divrem.m4
40 (echo "define(NAME,\`.$(+divrem-NAME)')\
41 define(OP,\`$(+divrem-OP-$(+divrem-NAME))')\
42 define(S,\`$(+divrem-S-$(+divrem-NAME))')\
43 /* This file is generated from divrem.m4; DO NOT EDIT! */"; \
44 cat $<) | $(M4) > $@-tmp
45 # Make it unwritable so noone will edit it by mistake.
46 -chmod a-w $@-tmp
47 mv -f $@-tmp $@
49 sysdep-realclean := $(sysdep-realclean) $(divrem:%=sysdeps/sparc/sparc32/%.S)