run copyright.sh for 2011.
[deliverable/binutils-gdb.git] / gdb / features / Makefile
CommitLineData
7b6bb8da 1# Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
fb1e4ffc
DJ
2
3# This file is part of GDB.
4
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
dcf7800b 7# the Free Software Foundation; either version 3 of the License, or
fb1e4ffc
DJ
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
dcf7800b 16# along with this program. If not, see <http://www.gnu.org/licenses/>.
fb1e4ffc
DJ
17
18
19# This file requires GNU make!
20
21# This Makefile updates files in ../regformats from their XML master
22# copies. Because this relies on xsltproc, it is not normally run
23# during the build process; it should be run by hand when one of the
24# affected XML files is changed, and the results should be kept in the
25# GDB repository.
26
81adfced
DJ
27# It can also update the C files in the features directory from their
28# XML master copies. This relies on a GDB linked with expat and
29# configured for the correct architecture, so the files are again kept
30# in the GDB repository. To generate C files:
31# make GDB=/path/to/gdb XMLTOC="xml files" cfiles
32
58d6951d 33WHICH = arm-with-iwmmxt arm-with-vfpv2 arm-with-vfpv3 arm-with-neon \
46763423 34 i386/i386 i386/i386-linux \
3a13a53b 35 i386/i386-mmx i386/i386-mmx-linux \
46763423 36 i386/amd64 i386/amd64-linux \
98adf0f3
L
37 i386/i386-avx i386/i386-avx-linux \
38 i386/amd64-avx i386/amd64-avx-linux \
58d6951d 39 mips-linux mips64-linux \
0482b03b 40 rs6000/powerpc-32 \
7284e1be 41 rs6000/powerpc-32l rs6000/powerpc-altivec32l rs6000/powerpc-e500l \
604c2f83 42 rs6000/powerpc-64l rs6000/powerpc-altivec64l rs6000/powerpc-vsx32l \
7803799a
UW
43 rs6000/powerpc-vsx64l rs6000/powerpc-cell32l rs6000/powerpc-cell64l \
44 s390-linux32 s390-linux64 s390x-linux64
fb1e4ffc
DJ
45
46# Record which registers should be sent to GDB by default after stop.
58d6951d 47arm-expedite = r11,sp,pc
46763423
L
48i386/i386-expedite = ebp,esp,eip
49i386/i386-linux-expedite = ebp,esp,eip
50i386/amd64-expedite = rbp,rsp,rip
51i386/amd64-linux-expedite = rbp,rsp,rip
98adf0f3
L
52i386/i386-avx-expedite = ebp,esp,eip
53i386/i386-avx-linux-expedite = ebp,esp,eip
3a13a53b
L
54i386/i386-mmx-expedite = ebp,esp,eip
55i386/i386-mmx-linux-expedite = ebp,esp,eip
98adf0f3
L
56i386/amd64-avx-expedite = rbp,rsp,rip
57i386/amd64-avx-linux-expedite = rbp,rsp,rip
58d6951d
DJ
58mips-expedite = r29,pc
59mips64-expedite = r29,pc
60powerpc-expedite = r1,pc
f4d9bade
UW
61rs6000/powerpc-cell32l-expedite = r1,pc,r0,orig_r3,r4
62rs6000/powerpc-cell64l-expedite = r1,pc,r0,orig_r3,r4
7803799a
UW
63s390-linux32-expedite = r14,r15,pswa
64s390-linux64-expedite = r14l,r15l,pswa
65s390x-linux64-expedite = r14,r15,pswa
604c2f83 66
fb1e4ffc
DJ
67
68XSLTPROC = xsltproc
69outdir = ../regformats
70OUTPUTS = $(patsubst %,$(outdir)/%.dat,$(WHICH))
71
81adfced
DJ
72XMLTOC =
73CFILES = $(patsubst %.xml,%.c,$(XMLTOC))
74GDB = false
75
fb1e4ffc
DJ
76all: $(OUTPUTS)
77
78$(outdir)/%.dat: %.xml number-regs.xsl sort-regs.xsl gdbserver-regs.xsl
79 echo "# DO NOT EDIT: generated from $<" > $(outdir)/$*.tmp
30ed0a8f 80 echo "name:`echo $(notdir $*) | sed 's/-/_/g'`" >> $(outdir)/$*.tmp
221c031f 81 echo "xmltarget:$(<F)" >> $(outdir)/$*.tmp
f4d9bade
UW
82 echo "expedite:$(if $($*-expedite),$($*-expedite),$($(firstword $(subst -, ,$(notdir $*)))-expedite))" \
83 >> $(outdir)/$*.tmp
30ed0a8f 84 $(XSLTPROC) --path "$(PWD)" --xinclude number-regs.xsl $< | \
fb1e4ffc
DJ
85 $(XSLTPROC) sort-regs.xsl - | \
86 $(XSLTPROC) gdbserver-regs.xsl - >> $(outdir)/$*.tmp
87 sh ../../move-if-change $(outdir)/$*.tmp $(outdir)/$*.dat
88
81adfced
DJ
89cfiles: $(CFILES)
90%.c: %.xml
91 $(GDB) -nx -q -batch \
92 -ex "set tdesc filename $<" -ex 'maint print c-tdesc' > $@.tmp
93 sh ../../move-if-change $@.tmp $@
94
fb1e4ffc
DJ
95# Other dependencies.
96$(outdir)/arm-with-iwmmxt.dat: arm-core.xml xscale-iwmmxt.xml
46763423
L
97$(outdir)/i386/i386.dat: i386/32bit-core.xml i386/32bit-sse.xml
98$(outdir)/i386/i386-linux.dat: i386/32bit-core.xml i386/32bit-sse.xml \
99 i386/32bit-linux.xml
100$(outdir)/i386/amd64.dat: i386/64bit-core.xml i386/64bit-sse.xml
101$(outdir)/i386/amd64-linux.dat: i386/64bit-core.xml i386/64bit-sse.xml \
102 i386/64bit-linux.xml
98adf0f3
L
103$(outdir)/i386/i386-avx.dat: i386/32bit-core.xml i386/32bit-avx.xml
104$(outdir)/i386/i386-avx-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
105 i386/32bit-linux.xml
3a13a53b
L
106$(outdir)/i386/i386-mmx.dat: i386/32bit-core.xml
107$(outdir)/i386/i386-mmx-linux.dat: i386/32bit-core.xml i386/32bit-linux.xml
98adf0f3
L
108$(outdir)/i386/amd64-avx.dat: i386/64bit-core.xml i386/64bit-avx.xml
109$(outdir)/i386/amd64-avx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
110 i386/64bit-linux.xml
This page took 0.28941 seconds and 4 git commands to generate.