]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/sparc/Makefile
initial import
[thirdparty/glibc.git] / sysdeps / sparc / Makefile
1 # Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
3
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Library General Public License
6 # as published by the Free Software Foundation; either version 2 of
7 # the License, or (at your option) any later version.
8
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 # Library General Public License for more details.
13
14 # You should have received a copy of the GNU Library General Public
15 # License along with the GNU C Library; see the file COPYING.LIB. If
16 # not, write to the Free Software Foundation, Inc., 675 Mass Ave,
17 # Cambridge, MA 02139, USA.
18
19 ifeq ($(subdir),gnulib)
20 routines = mul umul $(divrem) alloca
21 endif # gnulib
22
23 # We distribute these files, even though they are generated,
24 # so as to avoid the need for a functioning m4 to build the library.
25 divrem := sdiv udiv rem urem
26
27 +divrem-NAME-sdiv := div
28 +divrem-NAME-udiv := udiv
29 +divrem-NAME-rem := rem
30 +divrem-NAME-urem := urem
31 +divrem-NAME = $(+divrem-NAME-$(basename $(notdir $@)))
32 +divrem-OP-div := div
33 +divrem-OP-udiv := div
34 +divrem-OP-rem := rem
35 +divrem-OP-urem := rem
36 +divrem-S-div := true
37 +divrem-S-rem := true
38 +divrem-S-udiv := false
39 +divrem-S-urem := false
40 $(divrem:%=$(sysdep_dir)/sparc/%.S): $(sysdep_dir)/sparc/divrem.m4
41 (echo "define(NAME,\`.$(+divrem-NAME)')\
42 define(OP,\`$(+divrem-OP-$(+divrem-NAME))')\
43 define(S,\`$(+divrem-S-$(+divrem-NAME))')\
44 /* This file is generated from divrem.m4; DO NOT EDIT! */"; \
45 cat $<) | $(M4) > $@-tmp
46 # Make it unwritable so noone will edit it by mistake.
47 -chmod a-w $@-tmp
48 mv -f $@-tmp $@
49 test -d CVS && cvs commit -m'Regenerated from $<' $@
50
51 sysdep-realclean := $(sysdep-realclean) $(divrem:%=sysdeps/sparc/%.S)
52 \f
53 ifeq ($(subdir),crypt)
54
55 crypt := crypt.sparc # Use crypt/crypt.sparc.S.
56
57 endif # crypt