2005-04-15 Ke Sakamoto <sakamoto.kei@renesas.com>
[deliverable/binutils-gdb.git] / gdb / gdbserver / Makefile.in
1 # Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
2 # 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
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
20 prefix = @prefix@
21 exec_prefix = @exec_prefix@
22
23 host_alias = @host_alias@
24 target_alias = @target_alias@
25 program_transform_name = @program_transform_name@
26 bindir = @bindir@
27 libdir = @libdir@
28 tooldir = $(libdir)/$(target_alias)
29
30 datadir = @datadir@
31 mandir = @mandir@
32 man1dir = $(mandir)/man1
33 man2dir = $(mandir)/man2
34 man3dir = $(mandir)/man3
35 man4dir = $(mandir)/man4
36 man5dir = $(mandir)/man5
37 man6dir = $(mandir)/man6
38 man7dir = $(mandir)/man7
39 man8dir = $(mandir)/man8
40 man9dir = $(mandir)/man9
41 infodir = @infodir@
42 htmldir = $(prefix)/html
43 includedir = @includedir@
44
45 SHELL = /bin/sh
46
47 INSTALL = @INSTALL@
48 INSTALL_PROGRAM = @INSTALL_PROGRAM@
49 INSTALL_DATA = @INSTALL_DATA@
50
51 CC = @CC@
52
53 # Directory containing source files. Don't clean up the spacing,
54 # this exact string is matched for by the "configure" script.
55 srcdir = @srcdir@
56 VPATH = @srcdir@
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
65 CC-LD=${CC}
66
67 # Where is the "include" directory? Traditionally ../include or ./include
68 INCLUDE_DIR = ${srcdir}/../../include
69 INCLUDE_DEP = $$(INCLUDE_DIR)
70
71 # Where are the BFD library?
72 BFD_DIR = ../../bfd
73 BFD = $(BFD_DIR)/libbfd.a
74 BFD_SRC = $(srcdir)/$(BFD_DIR)
75 BFD_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}.)
79 READLINE_DIR = ${srcdir}/../readline
80 READLINE_DEP = $$(READLINE_DIR)
81
82 # All the includes used for CFLAGS and for lint.
83 # -I. for config files.
84 # -I${srcdir} for our headers.
85 # -I$(srcdir)/../regformats for regdef.h.
86 INCLUDE_CFLAGS = -I. -I${srcdir} -I$(srcdir)/../regformats -I$(INCLUDE_DIR)
87
88 # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
89 # from the config/ directory.
90 GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
91 #PROFILE_CFLAGS = -pg
92
93 WARN_CFLAGS = -Wall
94
95 # CFLAGS is specifically reserved for setting from the command line
96 # when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
97 CFLAGS = @CFLAGS@
98
99 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
100 INTERNAL_CFLAGS = $(WARN_CFLAGS) ${CFLAGS} ${GLOBAL_CFLAGS} \
101 ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${BFD_CFLAGS}
102
103 # LDFLAGS is specifically reserved for setting from the command line
104 # when running make.
105 LDFLAGS = @LDFLAGS@
106 INTERNAL_LDFLAGS = $(LDFLAGS) @RDYNAMIC@
107
108 # Perhaps should come from parent Makefile
109 VERSION = gdbserver-4.12.3
110 DIST=gdb
111
112 LINT=/usr/5bin/lint
113 LINTFLAGS= $(BFD_CFLAGS)
114
115 # All source files that go into linking GDB remote server.
116
117 SFILES= $(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 \
121 $(srcdir)/linux-arm-low.c $(srcdir)/linux-i386-low.c \
122 $(srcdir)/i387-fp.c \
123 $(srcdir)/linux-ia64-low.c $(srcdir)/linux-low.c \
124 $(srcdir)/linux-m32r-low.c \
125 $(srcdir)/linux-m68k-low.c $(srcdir)/linux-mips-low.c \
126 $(srcdir)/linux-ppc-low.c $(srcdir)/linux-s390-low.c \
127 $(srcdir)/linux-sh-low.c $(srcdir)/linux-x86-64-low.c
128
129 DEPFILES = @GDBSERVER_DEPFILES@
130
131 SOURCES = $(SFILES)
132 TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
133
134 OBS = inferiors.o regcache.o remote-utils.o server.o signals.o target.o \
135 utils.o \
136 mem-break.o \
137 $(DEPFILES)
138 GDBSERVER_LIBS = @GDBSERVER_LIBS@
139
140 # Prevent Sun make from putting in the machine type. Setting
141 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
142 .c.o:
143 ${CC} -c ${INTERNAL_CFLAGS} $<
144
145 all: gdbserver gdbreplay
146
147 # Traditionally "install" depends on "all". But it may be useful
148 # not to; for example, if the user has made some trivial change to a
149 # source file and doesn't care about rebuilding or just wants to save the
150 # time it takes for make to check that all is up to date.
151 # install-only is intended to address that need.
152 install: all install-only
153 install-only:
154 n=`echo gdbserver | sed '$(program_transform_name)'`; \
155 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
156 $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \
157 $(INSTALL_PROGRAM) gdbserver $(DESTDIR)$(bindir)/$$n; \
158 $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(man1dir); \
159 $(INSTALL_DATA) $(srcdir)/gdbserver.1 $(DESTDIR)$(man1dir)/$$n.1
160
161 uninstall: force
162 n=`echo gdbserver | sed '$(program_transform_name)'`; \
163 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
164 rm -f $(bindir)/$$n $(DESTDIR)$(man1dir)/$$n.1
165
166 installcheck:
167 check:
168 info dvi:
169 install-info:
170 html:
171 install-html:
172 clean-info:
173
174 gdbserver: $(OBS) ${ADD_DEPS} ${CDEPS}
175 rm -f gdbserver
176 ${CC-LD} $(GLOBAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbserver $(OBS) \
177 $(GDBSERVER_LIBS) $(XM_CLIBS)
178
179 gdbreplay: gdbreplay.o
180 rm -f gdbreplay
181 ${CC-LD} $(GLOBAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbreplay gdbreplay.o \
182 $(XM_CLIBS)
183
184 # Put the proper machine-specific files first, so M-. on a machine
185 # specific routine gets the one for the correct machine.
186 # The xyzzy stuff below deals with empty DEPFILES
187 TAGS: ${TAGFILES}
188 etags `find ${srcdir}/../config -name $(DEPRECATED_TM_FILE) -print` \
189 `find ${srcdir}/../config -name ${XM_FILE} -print` \
190 `find ${srcdir}/../config -name ${NAT_FILE} -print` \
191 `for i in yzzy ${DEPFILES}; do \
192 if [ x$$i != xyzzy ]; then \
193 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
194 fi; \
195 done` \
196 ${TAGFILES}
197 tags: TAGS
198
199 clean:
200 rm -f *.o ${ADD_FILES} *~
201 rm -f gdbserver gdbreplay core make.log
202 rm -f reg-arm.c reg-i386.c reg-ia64.c reg-m32r.c reg-m68k.c reg-mips.c
203 rm -f reg-ppc.c reg-sh.c reg-x86-64.c reg-i386-linux.c
204
205 maintainer-clean realclean distclean: clean
206 rm -f nm.h tm.h xm.h config.status config.h stamp-h config.log
207 rm -f Makefile
208
209 STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
210
211 config.h: stamp-h ; @true
212 stamp-h: config.in config.status
213 CONFIG_FILES="" CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
214
215 Makefile: Makefile.in config.status
216 CONFIG_HEADERS="" $(SHELL) ./config.status
217
218 config.status: configure configure.srv
219 $(SHELL) ./config.status --recheck
220
221 force:
222
223 version.c: Makefile
224 echo 'char *version = "$(VERSION)";' >version.c
225
226 # GNU Make has an annoying habit of putting *all* the Makefile variables
227 # into the environment, unless you include this target as a circumvention.
228 # Rumor is that this will be fixed (and this target can be removed)
229 # in GNU Make 4.0.
230 .NOEXPORT:
231
232 # GNU Make 3.63 has a different problem: it keeps tacking command line
233 # overrides onto the definition of $(MAKE). This variable setting
234 # will remove them.
235 MAKEOVERRIDES=
236
237 gdb_proc_service_h = $(srcdir)/../gdb_proc_service.h $(srcdir)/../gregset.h
238 regdat_sh = $(srcdir)/../regformats/regdat.sh
239 regdef_h = $(srcdir)/../regformats/regdef.h
240 regcache_h = $(srcdir)/regcache.h
241 server_h = $(srcdir)/server.h $(regcache_h) config.h $(srcdir)/target.h \
242 $(srcdir)/mem-break.h
243
244 inferiors.o: inferiors.c $(server_h)
245 mem-break.o: mem-break.c $(server_h)
246 proc-service.o: proc-service.c $(server_h) $(gdb_proc_service_h)
247 regcache.o: regcache.c $(server_h) $(regdef_h)
248 remote-utils.o: remote-utils.c terminal.h $(server_h)
249 server.o: server.c $(server_h)
250 target.o: target.c $(server_h)
251 thread-db.o: thread-db.c $(server_h) $(gdb_proc_service_h)
252 utils.o: utils.c $(server_h)
253
254 signals.o: ../signals/signals.c $(server_h)
255 $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< -DGDBSERVER
256
257 i387-fp.o: i387-fp.c $(server_h)
258
259 linux_low_h = $(srcdir)/linux-low.h
260
261 linux-low.o: linux-low.c $(linux_low_h) $(server_h)
262 $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< @USE_THREAD_DB@
263
264 linux-arm-low.o: linux-arm-low.c $(linux_low_h) $(server_h)
265 linux-i386-low.o: linux-i386-low.c $(linux_low_h) $(server_h)
266 linux-ia64-low.o: linux-ia64-low.c $(linux_low_h) $(server_h)
267 linux-m32r-low.o: linux-m32r-low.c $(linux_low_h) $(server_h)
268 linux-mips-low.o: linux-mips-low.c $(linux_low_h) $(server_h)
269 linux-ppc-low.o: linux-ppc-low.c $(linux_low_h) $(server_h)
270 linux-s390-low.o: linux-s390-low.c $(linux_low_h) $(server_h)
271 linux-sh-low.o: linux-sh-low.c $(linux_low_h) $(server_h)
272 linux-x86-64-low.o: linux-x86-64-low.c $(linux_low_h) $(server_h)
273
274 reg-arm.o : reg-arm.c $(regdef_h)
275 reg-arm.c : $(srcdir)/../regformats/reg-arm.dat $(regdat_sh)
276 sh $(regdat_sh) $(srcdir)/../regformats/reg-arm.dat reg-arm.c
277 reg-i386.o : reg-i386.c $(regdef_h)
278 reg-i386.c : $(srcdir)/../regformats/reg-i386.dat $(regdat_sh)
279 sh $(regdat_sh) $(srcdir)/../regformats/reg-i386.dat reg-i386.c
280 reg-i386-linux.o : reg-i386-linux.c $(regdef_h)
281 reg-i386-linux.c : $(srcdir)/../regformats/reg-i386-linux.dat $(regdat_sh)
282 sh $(regdat_sh) $(srcdir)/../regformats/reg-i386-linux.dat reg-i386-linux.c
283 reg-ia64.o : reg-ia64.c $(regdef_h)
284 reg-ia64.c : $(srcdir)/../regformats/reg-ia64.dat $(regdat_sh)
285 sh $(regdat_sh) $(srcdir)/../regformats/reg-ia64.dat reg-ia64.c
286 reg-m32r.o : reg-m32r.c $(regdef_h)
287 reg-m32r.c : $(srcdir)/../regformats/reg-m32r.dat $(regdat_sh)
288 sh $(regdat_sh) $(srcdir)/../regformats/reg-m32r.dat reg-m32r.c
289 reg-m68k.o : reg-m68k.c $(regdef_h)
290 reg-m68k.c : $(srcdir)/../regformats/reg-m68k.dat $(regdat_sh)
291 sh $(regdat_sh) $(srcdir)/../regformats/reg-m68k.dat reg-m68k.c
292 reg-mips.o : reg-mips.c $(regdef_h)
293 reg-mips.c : $(srcdir)/../regformats/reg-mips.dat $(regdat_sh)
294 sh $(regdat_sh) $(srcdir)/../regformats/reg-mips.dat reg-mips.c
295 reg-ppc.o : reg-ppc.c $(regdef_h)
296 reg-ppc.c : $(srcdir)/../regformats/reg-ppc.dat $(regdat_sh)
297 sh $(regdat_sh) $(srcdir)/../regformats/reg-ppc.dat reg-ppc.c
298 reg-s390.o : reg-s390.c $(regdef_h)
299 reg-s390.c : $(srcdir)/../regformats/reg-s390.dat $(regdat_sh)
300 sh $(regdat_sh) $(srcdir)/../regformats/reg-s390.dat reg-s390.c
301 reg-s390x.o : reg-s390x.c $(regdef_h)
302 reg-s390x.c : $(srcdir)/../regformats/reg-s390x.dat $(regdat_sh)
303 sh $(regdat_sh) $(srcdir)/../regformats/reg-s390x.dat reg-s390x.c
304 reg-sh.o : reg-sh.c $(regdef_h)
305 reg-sh.c : $(srcdir)/../regformats/reg-sh.dat $(regdat_sh)
306 sh $(regdat_sh) $(srcdir)/../regformats/reg-sh.dat reg-sh.c
307 reg-x86-64.o : reg-x86-64.c $(regdef_h)
308 reg-x86-64.c : $(srcdir)/../regformats/reg-x86-64.dat $(regdat_sh)
309 sh $(regdat_sh) $(srcdir)/../regformats/reg-x86-64.dat reg-x86-64.c
310
311 # This is the end of "Makefile.in".
This page took 0.04211 seconds and 5 git commands to generate.