aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/alpha/Makefile
blob: 8573ca811cf50a03dec86a9d941572d4f3519039 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
# Contributed by Brendan Kehoe (brendan@zen.org).

# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public License
# as published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.

# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.

# You should have received a copy of the GNU Library General Public
# License along with the GNU C Library; see the file COPYING.LIB.  If
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
# Cambridge, MA 02139, USA.

ifeq ($(subdir),setjmp)
sysdep_routines := $(sysdep_routines) setjmp_aux
endif

ifeq ($(subdir),gnulib)
routines = $(divrem) 
endif	# gnulib

# We distribute these files, even though they are generated,
# so as to avoid the need for a functioning m4 to build the library.
divrem := divl divlu divq divqu reml remlu remq remqu

+divrem-NAME-divl := divl
+divrem-NAME-divlu := divlu
+divrem-NAME-divq := divq
+divrem-NAME-divqu := divqu
+divrem-NAME-reml := reml
+divrem-NAME-remlu := remlu
+divrem-NAME-remq := remq
+divrem-NAME-remqu := remqu
+divrem-NAME = $(+divrem-NAME-$(basename $(notdir $@)))

+divrem-OP-divl := divl
+divrem-OP-divlu := divlu
+divrem-OP-divq := divq
+divrem-OP-divqu := divqu
+divrem-OP-reml := reml
+divrem-OP-remlu := remlu
+divrem-OP-remq := remq
+divrem-OP-remqu := remqu
+divrem-BASEOP-divl := div
+divrem-BASEOP-divlu := div
+divrem-BASEOP-divq := div
+divrem-BASEOP-divqu := div
+divrem-BASEOP-reml := rem
+divrem-BASEOP-remlu := rem
+divrem-BASEOP-remq := rem
+divrem-BASEOP-remqu := rem
+divrem-S-divl := true
+divrem-S-divlu := false
+divrem-S-divq := true
+divrem-S-divqu := false
+divrem-S-reml := true
+divrem-S-remlu := false
+divrem-S-remq := true
+divrem-S-remqu := false
+divrem-SIZE-divl := l
+divrem-SIZE-divlu := l
+divrem-SIZE-divq := q
+divrem-SIZE-divqu := q
+divrem-SIZE-reml := l
+divrem-SIZE-remlu := l
+divrem-SIZE-remq := q
+divrem-SIZE-remqu := q
+divrem-MODE-divl := l
+divrem-MODE-divlu := lu
+divrem-MODE-divq := q
+divrem-MODE-divqu := qu
+divrem-MODE-reml := l
+divrem-MODE-remlu := lu
+divrem-MODE-remq := q
+divrem-MODE-remqu := qu

$(divrem:%=$(sysdep_dir)/alpha/%.S): $(sysdep_dir)/alpha/divrem.m4 $(sysdep_dir)/alpha/DEFS.h $(sysdep_dir)/alpha/macros.m4
	(echo "define(OP,\`$(+divrem-NAME)')\
	       define(BASEOP,\`$(+divrem-BASEOP-$(+divrem-NAME))')\
	       define(MODE,\`$(+divrem-MODE-$(+divrem-NAME))')\
	       define(SIZE,\`$(+divrem-SIZE-$(+divrem-NAME))')\
	       define(SIGNED,\`$(+divrem-S-$(+divrem-NAME))')\
	       define(SYSDEP_DIR, \`$(sysdep_dir)/alpha')\
	       /* This file is generated from divrem.m4; DO NOT EDIT! */"; \
	 cat $<) | $(M4) > $@-tmp
# Make it unwritable so noone will edit it by mistake.
	-chmod a-w $@-tmp
	mv -f $@-tmp $@
	test ! -d CVS || cvs commit -m'Regenerated from $<' $@