Add "make pdf" and "make install-pdf", from Brooks Moses
[deliverable/binutils-gdb.git] / gdb / gdbserver / Makefile.in
CommitLineData
6f0f660e 1# Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
6aba47ca 2# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
dd24457d 3# Free Software Foundation, Inc.
c906108c
SS
4
5# This file is part of GDB.
6
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
6f0f660e 19# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
c906108c 20
d6e9fb05
JK
21prefix = @prefix@
22exec_prefix = @exec_prefix@
c906108c 23
d6e9fb05
JK
24host_alias = @host_alias@
25target_alias = @target_alias@
26program_transform_name = @program_transform_name@
27bindir = @bindir@
28libdir = @libdir@
c906108c
SS
29tooldir = $(libdir)/$(target_alias)
30
d6e9fb05
JK
31datadir = @datadir@
32mandir = @mandir@
c906108c
SS
33man1dir = $(mandir)/man1
34man2dir = $(mandir)/man2
35man3dir = $(mandir)/man3
36man4dir = $(mandir)/man4
37man5dir = $(mandir)/man5
38man6dir = $(mandir)/man6
39man7dir = $(mandir)/man7
40man8dir = $(mandir)/man8
41man9dir = $(mandir)/man9
d6e9fb05 42infodir = @infodir@
085dd6e6 43htmldir = $(prefix)/html
d6e9fb05 44includedir = @includedir@
c906108c
SS
45
46SHELL = /bin/sh
de7c3b4a 47EXEEXT = @EXEEXT@
c906108c 48
d6e9fb05
JK
49INSTALL = @INSTALL@
50INSTALL_PROGRAM = @INSTALL_PROGRAM@
51INSTALL_DATA = @INSTALL_DATA@
c906108c 52
84563040 53CC = @CC@
c906108c
SS
54
55# Directory containing source files. Don't clean up the spacing,
56# this exact string is matched for by the "configure" script.
d6e9fb05
JK
57srcdir = @srcdir@
58VPATH = @srcdir@
c906108c
SS
59
60# It is also possible that you will need to add -I/usr/include/sys to the
61# CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
62# is where it should be according to Posix).
63
64# Set this up with gcc if you have gnu ld and the loader will print out
65# line numbers for undefinded refs.
66#CC-LD=gcc -static
67CC-LD=${CC}
68
69# Where is the "include" directory? Traditionally ../include or ./include
70INCLUDE_DIR = ${srcdir}/../../include
71INCLUDE_DEP = $$(INCLUDE_DIR)
72
73# Where are the BFD library?
74BFD_DIR = ../../bfd
75BFD = $(BFD_DIR)/libbfd.a
76BFD_SRC = $(srcdir)/$(BFD_DIR)
77BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
78
79# Where is the source dir for the READLINE library? Traditionally in .. or .
80# (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
81READLINE_DIR = ${srcdir}/../readline
82READLINE_DEP = $$(READLINE_DIR)
83
84# All the includes used for CFLAGS and for lint.
85# -I. for config files.
7ea81414
DJ
86# -I${srcdir} for our headers.
87# -I$(srcdir)/../regformats for regdef.h.
0e98d0a7 88INCLUDE_CFLAGS = -I. -I${srcdir} -I$(srcdir)/../regformats -I$(INCLUDE_DIR)
c906108c
SS
89
90# M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
91# from the config/ directory.
92GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
93#PROFILE_CFLAGS = -pg
94
0729219d
DJ
95WARN_CFLAGS = -Wall
96
c906108c
SS
97# CFLAGS is specifically reserved for setting from the command line
98# when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
84563040
DJ
99CFLAGS = @CFLAGS@
100
c906108c 101# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
0729219d
DJ
102INTERNAL_CFLAGS = $(WARN_CFLAGS) ${CFLAGS} ${GLOBAL_CFLAGS} \
103 ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${BFD_CFLAGS}
c906108c
SS
104
105# LDFLAGS is specifically reserved for setting from the command line
106# when running make.
697f7479 107LDFLAGS = @LDFLAGS@
f6de3c42 108INTERNAL_LDFLAGS = $(LDFLAGS) @RDYNAMIC@
c906108c
SS
109
110# Perhaps should come from parent Makefile
111VERSION = gdbserver-4.12.3
112DIST=gdb
113
114LINT=/usr/5bin/lint
115LINTFLAGS= $(BFD_CFLAGS)
116
c906108c
SS
117# All source files that go into linking GDB remote server.
118
73d37363
DJ
119SFILES= $(srcdir)/gdbreplay.c $(srcdir)/inferiors.c \
120 $(srcdir)/mem-break.c $(srcdir)/proc-service.c $(srcdir)/regcache.c \
121 $(srcdir)/remote-utils.c $(srcdir)/server.c $(srcdir)/target.c \
122 $(srcdir)/thread-db.c $(srcdir)/utils.c \
45b134e5
OF
123 $(srcdir)/linux-arm-low.c $(srcdir)/linux-cris-low.c \
124 $(srcdir)/linux-crisv32-low.c $(srcdir)/linux-i386-low.c \
73d37363
DJ
125 $(srcdir)/i387-fp.c \
126 $(srcdir)/linux-ia64-low.c $(srcdir)/linux-low.c \
7cfbc4a0 127 $(srcdir)/linux-m32r-low.c \
73d37363 128 $(srcdir)/linux-m68k-low.c $(srcdir)/linux-mips-low.c \
eee84df1
DJ
129 $(srcdir)/linux-ppc-low.c $(srcdir)/linux-ppc64-low.c \
130 $(srcdir)/linux-s390-low.c \
73d37363 131 $(srcdir)/linux-sh-low.c $(srcdir)/linux-x86-64-low.c
c906108c 132
7ea81414 133DEPFILES = @GDBSERVER_DEPFILES@
c906108c 134
7ea81414 135SOURCES = $(SFILES)
c906108c
SS
136TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
137
ce3a066d 138OBS = inferiors.o regcache.o remote-utils.o server.o signals.o target.o \
dd24457d 139 utils.o version.o \
611cb4a5 140 mem-break.o \
fb1e4ffc 141 $(XML_BUILTIN) \
ce3a066d 142 $(DEPFILES)
0d62e5e8 143GDBSERVER_LIBS = @GDBSERVER_LIBS@
b80864fb 144XM_CLIBS = @LIBS@
c906108c 145
fb1e4ffc
DJ
146# XML files to compile in to gdbserver, if any.
147XML_DIR = $(srcdir)/../features
148XML_TARGET = @srv_xmltarget@
149XML_FILES = @srv_xmlfiles@
150XML_BUILTIN = @srv_xmlbuiltin@
151
c906108c
SS
152# Prevent Sun make from putting in the machine type. Setting
153# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
154.c.o:
155 ${CC} -c ${INTERNAL_CFLAGS} $<
156
157all: gdbserver gdbreplay
158
159# Traditionally "install" depends on "all". But it may be useful
160# not to; for example, if the user has made some trivial change to a
161# source file and doesn't care about rebuilding or just wants to save the
162# time it takes for make to check that all is up to date.
163# install-only is intended to address that need.
164install: all install-only
165install-only:
166 n=`echo gdbserver | sed '$(program_transform_name)'`; \
167 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
c938e9b0
L
168 $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \
169 $(INSTALL_PROGRAM) gdbserver $(DESTDIR)$(bindir)/$$n; \
170 $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(man1dir); \
171 $(INSTALL_DATA) $(srcdir)/gdbserver.1 $(DESTDIR)$(man1dir)/$$n.1
c906108c
SS
172
173uninstall: force
174 n=`echo gdbserver | sed '$(program_transform_name)'`; \
175 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
c938e9b0 176 rm -f $(bindir)/$$n $(DESTDIR)$(man1dir)/$$n.1
c906108c
SS
177
178installcheck:
179check:
9453113a 180info dvi pdf:
c906108c 181install-info:
9453113a 182install-pdf:
085dd6e6
JM
183html:
184install-html:
c906108c
SS
185clean-info:
186
187gdbserver: $(OBS) ${ADD_DEPS} ${CDEPS}
188 rm -f gdbserver
b80864fb 189 ${CC-LD} $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbserver $(OBS) \
c906108c
SS
190 $(GDBSERVER_LIBS) $(XM_CLIBS)
191
192gdbreplay: gdbreplay.o
193 rm -f gdbreplay
b80864fb 194 ${CC-LD} $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbreplay gdbreplay.o \
c906108c
SS
195 $(XM_CLIBS)
196
c906108c
SS
197# Put the proper machine-specific files first, so M-. on a machine
198# specific routine gets the one for the correct machine.
199# The xyzzy stuff below deals with empty DEPFILES
200TAGS: ${TAGFILES}
2c0fc042 201 etags `find ${srcdir}/../config -name $(DEPRECATED_TM_FILE) -print` \
c906108c
SS
202 `find ${srcdir}/../config -name ${XM_FILE} -print` \
203 `find ${srcdir}/../config -name ${NAT_FILE} -print` \
204 `for i in yzzy ${DEPFILES}; do \
205 if [ x$$i != xyzzy ]; then \
206 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
207 fi; \
208 done` \
209 ${TAGFILES}
210tags: TAGS
211
212clean:
213 rm -f *.o ${ADD_FILES} *~
dd24457d 214 rm -f version.c
de7c3b4a 215 rm -f gdbserver$(EXEEXT) gdbreplay$(EXEEXT) core make.log
7cfbc4a0 216 rm -f reg-arm.c reg-i386.c reg-ia64.c reg-m32r.c reg-m68k.c reg-mips.c
a13e2c95 217 rm -f reg-ppc.c reg-sh.c reg-spu.c reg-x86-64.c reg-i386-linux.c
186947f7 218 rm -f reg-cris.c reg-crisv32.c reg-x86-64-linux.c reg-mips64.c
fb1e4ffc
DJ
219 rm -f arm-with-iwmmxt.c
220 rm -f xml-builtin.c stamp-xml target.xml
c906108c 221
a59d1c82
DJ
222maintainer-clean realclean distclean: clean
223 rm -f nm.h tm.h xm.h config.status config.h stamp-h config.log
c906108c
SS
224 rm -f Makefile
225
c3a3ccc7
DJ
226config.h: stamp-h ; @true
227stamp-h: config.in config.status
e0e76420 228 CONFIG_FILES="" CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
0729219d 229
7ea81414 230Makefile: Makefile.in config.status
0729219d 231 CONFIG_HEADERS="" $(SHELL) ./config.status
c906108c 232
93652174 233config.status: configure configure.srv
d6e9fb05
JK
234 $(SHELL) ./config.status --recheck
235
c906108c
SS
236force:
237
dd24457d
DJ
238version.c: Makefile $(srcdir)/../version.in
239 rm -f version.c-tmp version.c
240 echo '#include "server.h"' >> version.c-tmp
241 echo 'const char version[] = "'"`sed q ${srcdir}/../version.in`"'";' >> version.c-tmp
242 echo 'const char host_name[] = "$(host_alias)";' >> version.c-tmp
243 mv version.c-tmp version.c
244version.o: version.c $(server_h)
c906108c 245
fb1e4ffc
DJ
246target.xml: $(XML_TARGET)
247 rm -f target.xml
248 cp $(XML_TARGET) target.xml
249
250xml-builtin.c: stamp-xml; @true
251stamp-xml: $(XML_DIR)/feature_to_c.sh Makefile $(XML_FILES)
252 rm -f xml-builtin.tmp
253 $(SHELL) $(XML_DIR)/feature_to_c.sh xml-builtin.tmp $(XML_FILES)
254 $(SHELL) $(srcdir)/../../move-if-change xml-builtin.tmp xml-builtin.c
255 echo stamp > stamp-xml
256
257.PRECIOUS: target.xml xml-builtin.c
258
c906108c
SS
259# GNU Make has an annoying habit of putting *all* the Makefile variables
260# into the environment, unless you include this target as a circumvention.
261# Rumor is that this will be fixed (and this target can be removed)
262# in GNU Make 4.0.
263.NOEXPORT:
264
265# GNU Make 3.63 has a different problem: it keeps tacking command line
266# overrides onto the definition of $(MAKE). This variable setting
267# will remove them.
268MAKEOVERRIDES=
269
0050a760 270gdb_proc_service_h = $(srcdir)/gdb_proc_service.h
0c74b2a7 271regdat_sh = $(srcdir)/../regformats/regdat.sh
0a30fbc4
DJ
272regdef_h = $(srcdir)/../regformats/regdef.h
273regcache_h = $(srcdir)/regcache.h
611cb4a5
DJ
274server_h = $(srcdir)/server.h $(regcache_h) config.h $(srcdir)/target.h \
275 $(srcdir)/mem-break.h
0a30fbc4 276
ce3a066d 277inferiors.o: inferiors.c $(server_h)
611cb4a5 278mem-break.o: mem-break.c $(server_h)
0d62e5e8 279proc-service.o: proc-service.c $(server_h) $(gdb_proc_service_h)
ce3a066d 280regcache.o: regcache.c $(server_h) $(regdef_h)
7ea81414 281remote-utils.o: remote-utils.c terminal.h $(server_h)
ce3a066d
DJ
282server.o: server.c $(server_h)
283target.o: target.c $(server_h)
0d62e5e8 284thread-db.o: thread-db.c $(server_h) $(gdb_proc_service_h)
0a30fbc4 285utils.o: utils.c $(server_h)
0a30fbc4 286
0e98d0a7
DJ
287signals.o: ../signals/signals.c $(server_h)
288 $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
289
58caa3dc
DJ
290i387-fp.o: i387-fp.c $(server_h)
291
292linux_low_h = $(srcdir)/linux-low.h
293
294linux-low.o: linux-low.c $(linux_low_h) $(server_h)
0d62e5e8
DJ
295 $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< @USE_THREAD_DB@
296
9308fc88
DJ
297linux-arm-low.o: linux-arm-low.c $(linux_low_h) $(server_h) \
298 $(gdb_proc_service_h)
45b134e5
OF
299linux-cris-low.o: linux-cris-low.c $(linux_low_h) $(server_h)
300linux-crisv32-low.o: linux-crisv32-low.c $(linux_low_h) $(server_h)
21b0f40c
DJ
301linux-i386-low.o: linux-i386-low.c $(linux_low_h) $(server_h) \
302 $(gdb_proc_service_h)
58caa3dc 303linux-ia64-low.o: linux-ia64-low.c $(linux_low_h) $(server_h)
7cfbc4a0 304linux-m32r-low.o: linux-m32r-low.c $(linux_low_h) $(server_h)
21b0f40c
DJ
305linux-mips-low.o: linux-mips-low.c $(linux_low_h) $(server_h) \
306 $(gdb_proc_service_h)
58caa3dc 307linux-ppc-low.o: linux-ppc-low.c $(linux_low_h) $(server_h)
eee84df1 308linux-ppc64-low.o: linux-ppc64-low.c $(linux_low_h) $(server_h)
265f716b 309linux-s390-low.o: linux-s390-low.c $(linux_low_h) $(server_h)
58caa3dc 310linux-sh-low.o: linux-sh-low.c $(linux_low_h) $(server_h)
21b0f40c
DJ
311linux-x86-64-low.o: linux-x86-64-low.c $(linux_low_h) $(server_h) \
312 $(gdb_proc_service_h)
0a30fbc4 313
b80864fb
DJ
314win32-i386-low.o: win32-i386-low.c $(server_h) $(regdef_h) $(regcache_h)
315
a13e2c95
UW
316spu-low.o: spu-low.c $(server_h)
317
0c74b2a7
DJ
318reg-arm.o : reg-arm.c $(regdef_h)
319reg-arm.c : $(srcdir)/../regformats/reg-arm.dat $(regdat_sh)
320 sh $(regdat_sh) $(srcdir)/../regformats/reg-arm.dat reg-arm.c
fb1e4ffc
DJ
321arm-with-iwmmxt.o : arm-with-iwmmxt.c $(regdef_h)
322arm-with-iwmmxt.c : $(srcdir)/../regformats/arm-with-iwmmxt.dat $(regdat_sh)
323 sh $(regdat_sh) $(srcdir)/../regformats/arm-with-iwmmxt.dat arm-with-iwmmxt.c
45b134e5
OF
324reg-cris.o : reg-cris.c $(regdef_h)
325reg-cris.c : $(srcdir)/../regformats/reg-cris.dat $(regdat_sh)
326 sh $(regdat_sh) $(srcdir)/../regformats/reg-cris.dat reg-cris.c
327reg-crisv32.o : reg-crisv32.c $(regdef_h)
328reg-crisv32.c : $(srcdir)/../regformats/reg-crisv32.dat $(regdat_sh)
329 sh $(regdat_sh) $(srcdir)/../regformats/reg-crisv32.dat reg-crisv32.c
0c74b2a7
DJ
330reg-i386.o : reg-i386.c $(regdef_h)
331reg-i386.c : $(srcdir)/../regformats/reg-i386.dat $(regdat_sh)
332 sh $(regdat_sh) $(srcdir)/../regformats/reg-i386.dat reg-i386.c
a02e4a61
DJ
333reg-i386-linux.o : reg-i386-linux.c $(regdef_h)
334reg-i386-linux.c : $(srcdir)/../regformats/reg-i386-linux.dat $(regdat_sh)
335 sh $(regdat_sh) $(srcdir)/../regformats/reg-i386-linux.dat reg-i386-linux.c
0c74b2a7
DJ
336reg-ia64.o : reg-ia64.c $(regdef_h)
337reg-ia64.c : $(srcdir)/../regformats/reg-ia64.dat $(regdat_sh)
338 sh $(regdat_sh) $(srcdir)/../regformats/reg-ia64.dat reg-ia64.c
7cfbc4a0
KI
339reg-m32r.o : reg-m32r.c $(regdef_h)
340reg-m32r.c : $(srcdir)/../regformats/reg-m32r.dat $(regdat_sh)
341 sh $(regdat_sh) $(srcdir)/../regformats/reg-m32r.dat reg-m32r.c
0c74b2a7
DJ
342reg-m68k.o : reg-m68k.c $(regdef_h)
343reg-m68k.c : $(srcdir)/../regformats/reg-m68k.dat $(regdat_sh)
344 sh $(regdat_sh) $(srcdir)/../regformats/reg-m68k.dat reg-m68k.c
345reg-mips.o : reg-mips.c $(regdef_h)
346reg-mips.c : $(srcdir)/../regformats/reg-mips.dat $(regdat_sh)
347 sh $(regdat_sh) $(srcdir)/../regformats/reg-mips.dat reg-mips.c
186947f7
DJ
348reg-mips64.o : reg-mips64.c $(regdef_h)
349reg-mips64.c : $(srcdir)/../regformats/reg-mips64.dat $(regdat_sh)
350 sh $(regdat_sh) $(srcdir)/../regformats/reg-mips64.dat reg-mips64.c
0c74b2a7
DJ
351reg-ppc.o : reg-ppc.c $(regdef_h)
352reg-ppc.c : $(srcdir)/../regformats/reg-ppc.dat $(regdat_sh)
353 sh $(regdat_sh) $(srcdir)/../regformats/reg-ppc.dat reg-ppc.c
eee84df1
DJ
354reg-ppc64.o : reg-ppc64.c $(regdef_h)
355reg-ppc64.c : $(srcdir)/../regformats/reg-ppc64.dat $(regdat_sh)
356 sh $(regdat_sh) $(srcdir)/../regformats/reg-ppc64.dat reg-ppc64.c
265f716b
DJ
357reg-s390.o : reg-s390.c $(regdef_h)
358reg-s390.c : $(srcdir)/../regformats/reg-s390.dat $(regdat_sh)
359 sh $(regdat_sh) $(srcdir)/../regformats/reg-s390.dat reg-s390.c
360reg-s390x.o : reg-s390x.c $(regdef_h)
361reg-s390x.c : $(srcdir)/../regformats/reg-s390x.dat $(regdat_sh)
362 sh $(regdat_sh) $(srcdir)/../regformats/reg-s390x.dat reg-s390x.c
0c74b2a7
DJ
363reg-sh.o : reg-sh.c $(regdef_h)
364reg-sh.c : $(srcdir)/../regformats/reg-sh.dat $(regdat_sh)
365 sh $(regdat_sh) $(srcdir)/../regformats/reg-sh.dat reg-sh.c
a13e2c95
UW
366reg-spu.o : reg-spu.c $(regdef_h)
367reg-spu.c : $(srcdir)/../regformats/reg-spu.dat $(regdat_sh)
368 sh $(regdat_sh) $(srcdir)/../regformats/reg-spu.dat reg-spu.c
58caa3dc
DJ
369reg-x86-64.o : reg-x86-64.c $(regdef_h)
370reg-x86-64.c : $(srcdir)/../regformats/reg-x86-64.dat $(regdat_sh)
371 sh $(regdat_sh) $(srcdir)/../regformats/reg-x86-64.dat reg-x86-64.c
8695c747
DJ
372reg-x86-64-linux.o : reg-x86-64-linux.c $(regdef_h)
373reg-x86-64-linux.c : $(srcdir)/../regformats/reg-x86-64-linux.dat $(regdat_sh)
374 sh $(regdat_sh) $(srcdir)/../regformats/reg-x86-64-linux.dat reg-x86-64-linux.c
0c74b2a7 375
c906108c 376# This is the end of "Makefile.in".
This page took 0.734184 seconds and 4 git commands to generate.