Wed Jun 26 01:56:50 1996 Ulrich Drepper <drepper@cygnus.com>
[glibc/history.git] / sysdeps / sparc / Makefile
blobd4124a6eb792c1bc6cf6d03d373947c9d79ae908
1 # Copyright (C) 1991, 1992, 1993, 1994, 1995 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 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.
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.
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.
19 ifeq ($(subdir),gnulib)
20 routines = dotmul umul $(divrem) alloca
21 endif # gnulib
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
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 $<' $@
51 sysdep-realclean := $(sysdep-realclean) $(divrem:%=sysdeps/sparc/%.S)
53 ifeq ($(subdir),crypt)
55 ifeq ($(crypt),crypt)
56 crypt := crypt.sparc # Use crypt/crypt.sparc.S.
57 endif
59 endif # crypt