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