2003-01-02 Andrew Cagney <ac131313@redhat.com>
[deliverable/binutils-gdb.git] / gdb / gdbserver / Makefile.in
CommitLineData
0a30fbc4
DJ
1# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
2# 1999, 2000, 2001, 2002 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
18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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@
c906108c
SS
106
107# Perhaps should come from parent Makefile
108VERSION = gdbserver-4.12.3
109DIST=gdb
110
111LINT=/usr/5bin/lint
112LINTFLAGS= $(BFD_CFLAGS)
113
c906108c
SS
114# All source files that go into linking GDB remote server.
115
d6e9fb05
JK
116SFILES = $(srcdir)/low-hppabsd.c $(srcdir)/low-linux.c $(srcdir)/low-lynx.c \
117 $(srcdir)/low-nbsd.c $(srcdir)/low-sim.c $(srcdir)/low-sparc.c \
118 $(srcdir)/low-sun3.c $(srcdir)/utils.c $(srcdir)/server.c \
119 $(srcdir)/remote-utils.c
c906108c 120
7ea81414 121DEPFILES = @GDBSERVER_DEPFILES@
c906108c 122
7ea81414 123SOURCES = $(SFILES)
c906108c
SS
124TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
125
ce3a066d
DJ
126OBS = inferiors.o regcache.o remote-utils.o server.o signals.o target.o \
127 utils.o \
611cb4a5 128 mem-break.o \
ce3a066d 129 $(DEPFILES)
0d62e5e8 130GDBSERVER_LIBS = @GDBSERVER_LIBS@
c906108c
SS
131
132# Prevent Sun make from putting in the machine type. Setting
133# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
134.c.o:
135 ${CC} -c ${INTERNAL_CFLAGS} $<
136
137all: gdbserver gdbreplay
138
139# Traditionally "install" depends on "all". But it may be useful
140# not to; for example, if the user has made some trivial change to a
141# source file and doesn't care about rebuilding or just wants to save the
142# time it takes for make to check that all is up to date.
143# install-only is intended to address that need.
144install: all install-only
145install-only:
146 n=`echo gdbserver | sed '$(program_transform_name)'`; \
147 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
148 $(INSTALL_PROGRAM) gdbserver $(bindir)/$$n; \
149 $(INSTALL_DATA) $(srcdir)/gdbserver.1 $(man1dir)/$$n.1
150
151uninstall: force
152 n=`echo gdbserver | sed '$(program_transform_name)'`; \
153 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
154 rm -f $(bindir)/$$n $(man1dir)/$$n.1
155
156installcheck:
157check:
158info dvi:
159install-info:
085dd6e6
JM
160html:
161install-html:
c906108c
SS
162clean-info:
163
164gdbserver: $(OBS) ${ADD_DEPS} ${CDEPS}
165 rm -f gdbserver
166 ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbserver $(OBS) \
167 $(GDBSERVER_LIBS) $(XM_CLIBS)
168
169gdbreplay: gdbreplay.o
170 rm -f gdbreplay
171 ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbreplay gdbreplay.o \
172 $(XM_CLIBS)
173
c906108c
SS
174# Put the proper machine-specific files first, so M-. on a machine
175# specific routine gets the one for the correct machine.
176# The xyzzy stuff below deals with empty DEPFILES
177TAGS: ${TAGFILES}
178 etags `find ${srcdir}/../config -name $(TM_FILE) -print` \
179 `find ${srcdir}/../config -name ${XM_FILE} -print` \
180 `find ${srcdir}/../config -name ${NAT_FILE} -print` \
181 `for i in yzzy ${DEPFILES}; do \
182 if [ x$$i != xyzzy ]; then \
183 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
184 fi; \
185 done` \
186 ${TAGFILES}
187tags: TAGS
188
189clean:
190 rm -f *.o ${ADD_FILES} *~
d6e9fb05 191 rm -f gdbserver gdbreplay core make.log
0a30fbc4 192 rm -f reg-arm.c reg-i386.c reg-ia64.c reg-m68k.c reg-mips.c
58caa3dc 193 rm -f reg-ppc.c reg-sh.c reg-x86-64.c reg-i386-linux.c
c906108c
SS
194
195distclean: clean
196 rm -f nm.h tm.h xm.h config.status
197 rm -f Makefile
198
199maintainer-clean realclean: clean
200 rm -f nm.h tm.h xm.h config.status
201 rm -f Makefile
202
203STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
204
c3a3ccc7
DJ
205config.h: stamp-h ; @true
206stamp-h: config.in config.status
0729219d
DJ
207 CONFIG_FILES="" $(SHELL) ./config.status
208
7ea81414 209Makefile: Makefile.in config.status
0729219d 210 CONFIG_HEADERS="" $(SHELL) ./config.status
c906108c 211
93652174 212config.status: configure configure.srv
d6e9fb05
JK
213 $(SHELL) ./config.status --recheck
214
c906108c
SS
215force:
216
217version.c: Makefile
218 echo 'char *version = "$(VERSION)";' >version.c
219
220# GNU Make has an annoying habit of putting *all* the Makefile variables
221# into the environment, unless you include this target as a circumvention.
222# Rumor is that this will be fixed (and this target can be removed)
223# in GNU Make 4.0.
224.NOEXPORT:
225
226# GNU Make 3.63 has a different problem: it keeps tacking command line
227# overrides onto the definition of $(MAKE). This variable setting
228# will remove them.
229MAKEOVERRIDES=
230
0d62e5e8 231gdb_proc_service_h = $(srcdir)/../gdb_proc_service.h $(srcdir)/../gregset.h
0c74b2a7 232regdat_sh = $(srcdir)/../regformats/regdat.sh
0a30fbc4
DJ
233regdef_h = $(srcdir)/../regformats/regdef.h
234regcache_h = $(srcdir)/regcache.h
611cb4a5
DJ
235server_h = $(srcdir)/server.h $(regcache_h) config.h $(srcdir)/target.h \
236 $(srcdir)/mem-break.h
0a30fbc4 237
ce3a066d 238inferiors.o: inferiors.c $(server_h)
611cb4a5 239mem-break.o: mem-break.c $(server_h)
0d62e5e8 240proc-service.o: proc-service.c $(server_h) $(gdb_proc_service_h)
ce3a066d 241regcache.o: regcache.c $(server_h) $(regdef_h)
7ea81414 242remote-utils.o: remote-utils.c terminal.h $(server_h)
ce3a066d
DJ
243server.o: server.c $(server_h)
244target.o: target.c $(server_h)
0d62e5e8 245thread-db.o: thread-db.c $(server_h) $(gdb_proc_service_h)
0a30fbc4 246utils.o: utils.c $(server_h)
0a30fbc4 247
0e98d0a7
DJ
248signals.o: ../signals/signals.c $(server_h)
249 $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
250
58caa3dc
DJ
251i387-fp.o: i387-fp.c $(server_h)
252
253linux_low_h = $(srcdir)/linux-low.h
254
255linux-low.o: linux-low.c $(linux_low_h) $(server_h)
0d62e5e8
DJ
256 $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< @USE_THREAD_DB@
257
58caa3dc
DJ
258linux-arm-low.o: linux-arm-low.c $(linux_low_h) $(server_h)
259linux-i386-low.o: linux-i386-low.c $(linux_low_h) $(server_h)
260linux-ia64-low.o: linux-ia64-low.c $(linux_low_h) $(server_h)
261linux-mips-low.o: linux-mips-low.c $(linux_low_h) $(server_h)
262linux-ppc-low.o: linux-ppc-low.c $(linux_low_h) $(server_h)
265f716b 263linux-s390-low.o: linux-s390-low.c $(linux_low_h) $(server_h)
58caa3dc
DJ
264linux-sh-low.o: linux-sh-low.c $(linux_low_h) $(server_h)
265linux-x86-64-low.o: linux-x86-64-low.c $(linux_low_h) $(server_h)
0a30fbc4 266
0c74b2a7
DJ
267reg-arm.o : reg-arm.c $(regdef_h)
268reg-arm.c : $(srcdir)/../regformats/reg-arm.dat $(regdat_sh)
269 sh $(regdat_sh) $(srcdir)/../regformats/reg-arm.dat reg-arm.c
270reg-i386.o : reg-i386.c $(regdef_h)
271reg-i386.c : $(srcdir)/../regformats/reg-i386.dat $(regdat_sh)
272 sh $(regdat_sh) $(srcdir)/../regformats/reg-i386.dat reg-i386.c
a02e4a61
DJ
273reg-i386-linux.o : reg-i386-linux.c $(regdef_h)
274reg-i386-linux.c : $(srcdir)/../regformats/reg-i386-linux.dat $(regdat_sh)
275 sh $(regdat_sh) $(srcdir)/../regformats/reg-i386-linux.dat reg-i386-linux.c
0c74b2a7
DJ
276reg-ia64.o : reg-ia64.c $(regdef_h)
277reg-ia64.c : $(srcdir)/../regformats/reg-ia64.dat $(regdat_sh)
278 sh $(regdat_sh) $(srcdir)/../regformats/reg-ia64.dat reg-ia64.c
279reg-m68k.o : reg-m68k.c $(regdef_h)
280reg-m68k.c : $(srcdir)/../regformats/reg-m68k.dat $(regdat_sh)
281 sh $(regdat_sh) $(srcdir)/../regformats/reg-m68k.dat reg-m68k.c
282reg-mips.o : reg-mips.c $(regdef_h)
283reg-mips.c : $(srcdir)/../regformats/reg-mips.dat $(regdat_sh)
284 sh $(regdat_sh) $(srcdir)/../regformats/reg-mips.dat reg-mips.c
285reg-ppc.o : reg-ppc.c $(regdef_h)
286reg-ppc.c : $(srcdir)/../regformats/reg-ppc.dat $(regdat_sh)
287 sh $(regdat_sh) $(srcdir)/../regformats/reg-ppc.dat reg-ppc.c
265f716b
DJ
288reg-s390.o : reg-s390.c $(regdef_h)
289reg-s390.c : $(srcdir)/../regformats/reg-s390.dat $(regdat_sh)
290 sh $(regdat_sh) $(srcdir)/../regformats/reg-s390.dat reg-s390.c
291reg-s390x.o : reg-s390x.c $(regdef_h)
292reg-s390x.c : $(srcdir)/../regformats/reg-s390x.dat $(regdat_sh)
293 sh $(regdat_sh) $(srcdir)/../regformats/reg-s390x.dat reg-s390x.c
0c74b2a7
DJ
294reg-sh.o : reg-sh.c $(regdef_h)
295reg-sh.c : $(srcdir)/../regformats/reg-sh.dat $(regdat_sh)
296 sh $(regdat_sh) $(srcdir)/../regformats/reg-sh.dat reg-sh.c
58caa3dc
DJ
297reg-x86-64.o : reg-x86-64.c $(regdef_h)
298reg-x86-64.c : $(srcdir)/../regformats/reg-x86-64.dat $(regdat_sh)
299 sh $(regdat_sh) $(srcdir)/../regformats/reg-x86-64.dat reg-x86-64.c
0c74b2a7 300
c906108c 301# This is the end of "Makefile.in".
This page took 0.304159 seconds and 4 git commands to generate.