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