1 # Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
2 # 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
3 # Free Software Foundation, Inc.
5 # This file is part of GDB.
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.
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.
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.
22 exec_prefix = @
exec_prefix@
24 host_alias
= @host_alias@
25 target_alias
= @target_alias@
26 program_transform_name
= @program_transform_name@
29 tooldir
= $(libdir)/$(target_alias
)
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
43 htmldir
= $(prefix)/html
44 includedir = @
includedir@
49 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
50 INSTALL_DATA
= @INSTALL_DATA@
54 # Directory containing source files. Don't clean up the spacing,
55 # this exact string is matched for by the "configure" script.
59 # It is also possible that you will need to add -I/usr/include/sys to the
60 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
61 # is where it should be according to Posix).
63 # Set this up with gcc if you have gnu ld and the loader will print out
64 # line numbers for undefinded refs.
68 # Where is the "include" directory? Traditionally ../include or ./include
69 INCLUDE_DIR
= ${srcdir}/..
/..
/include
70 INCLUDE_DEP
= $$(INCLUDE_DIR
)
72 # Where are the BFD library?
74 BFD
= $(BFD_DIR
)/libbfd.a
75 BFD_SRC
= $(srcdir)/$(BFD_DIR
)
76 BFD_CFLAGS
= -I
$(BFD_DIR
) -I
$(BFD_SRC
)
78 # Where is the source dir for the READLINE library? Traditionally in .. or .
79 # (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
80 READLINE_DIR
= ${srcdir}/..
/readline
81 READLINE_DEP
= $$(READLINE_DIR
)
83 # All the includes used for CFLAGS and for lint.
84 # -I. for config files.
85 # -I${srcdir} for our headers.
86 # -I$(srcdir)/../regformats for regdef.h.
87 INCLUDE_CFLAGS
= -I.
-I
${srcdir} -I
$(srcdir)/..
/regformats
-I
$(INCLUDE_DIR
)
89 # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
90 # from the config/ directory.
91 GLOBAL_CFLAGS
= ${MT_CFLAGS} ${MH_CFLAGS}
96 # CFLAGS is specifically reserved for setting from the command line
97 # when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
100 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
101 INTERNAL_CFLAGS
= $(WARN_CFLAGS
) ${CFLAGS} ${GLOBAL_CFLAGS} \
102 ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${BFD_CFLAGS}
104 # LDFLAGS is specifically reserved for setting from the command line
107 INTERNAL_LDFLAGS
= $(LDFLAGS
) @RDYNAMIC@
109 # Perhaps should come from parent Makefile
110 VERSION
= gdbserver-4.12
.3
114 LINTFLAGS
= $(BFD_CFLAGS
)
116 # All source files that go into linking GDB remote server.
118 SFILES
= $(srcdir)/gdbreplay.c
$(srcdir)/inferiors.c \
119 $(srcdir)/mem-break.c
$(srcdir)/proc-service.c
$(srcdir)/regcache.c \
120 $(srcdir)/remote-utils.c
$(srcdir)/server.c
$(srcdir)/target.c \
121 $(srcdir)/thread-db.c
$(srcdir)/utils.c \
122 $(srcdir)/linux-arm-low.c
$(srcdir)/linux-cris-low.c \
123 $(srcdir)/linux-crisv32-low.c
$(srcdir)/linux-i386-low.c \
124 $(srcdir)/i387-fp.c \
125 $(srcdir)/linux-ia64-low.c
$(srcdir)/linux-low.c \
126 $(srcdir)/linux-m32r-low.c \
127 $(srcdir)/linux-m68k-low.c
$(srcdir)/linux-mips-low.c \
128 $(srcdir)/linux-ppc-low.c
$(srcdir)/linux-ppc64-low.c \
129 $(srcdir)/linux-s390-low.c \
130 $(srcdir)/linux-sh-low.c
$(srcdir)/linux-x86-64-low.c
132 DEPFILES
= @GDBSERVER_DEPFILES@
135 TAGFILES
= $(SOURCES
) ${HFILES} ${ALLPARAM} ${POSSLIBS}
137 OBS
= inferiors.o regcache.o remote-utils.o server.o signals.o target.o \
141 GDBSERVER_LIBS
= @GDBSERVER_LIBS@
144 # Prevent Sun make from putting in the machine type. Setting
145 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
147 ${CC} -c
${INTERNAL_CFLAGS} $<
149 all: gdbserver gdbreplay
151 # Traditionally "install" depends on "all". But it may be useful
152 # not to; for example, if the user has made some trivial change to a
153 # source file and doesn't care about rebuilding or just wants to save the
154 # time it takes for make to check that all is up to date.
155 # install-only is intended to address that need.
156 install: all install-only
158 n
=`echo gdbserver | sed '$(program_transform_name)'`; \
159 if
[ x
$$n = x
]; then n
=gdbserver
; else true
; fi
; \
160 $(SHELL
) $(srcdir)/..
/..
/mkinstalldirs
$(DESTDIR
)$(bindir); \
161 $(INSTALL_PROGRAM
) gdbserver
$(DESTDIR
)$(bindir)/$$n; \
162 $(SHELL
) $(srcdir)/..
/..
/mkinstalldirs
$(DESTDIR
)$(man1dir); \
163 $(INSTALL_DATA
) $(srcdir)/gdbserver
.1 $(DESTDIR
)$(man1dir)/$$n.1
166 n
=`echo gdbserver | sed '$(program_transform_name)'`; \
167 if
[ x
$$n = x
]; then n
=gdbserver
; else true
; fi
; \
168 rm -f
$(bindir)/$$n $(DESTDIR
)$(man1dir)/$$n.1
178 gdbserver
: $(OBS
) ${ADD_DEPS} ${CDEPS}
180 ${CC-LD
} $(INTERNAL_CFLAGS
) $(INTERNAL_LDFLAGS
) -o gdbserver
$(OBS
) \
181 $(GDBSERVER_LIBS
) $(XM_CLIBS
)
183 gdbreplay
: gdbreplay.o
185 ${CC-LD
} $(INTERNAL_CFLAGS
) $(INTERNAL_LDFLAGS
) -o gdbreplay gdbreplay.o \
188 # Put the proper machine-specific files first, so M-. on a machine
189 # specific routine gets the one for the correct machine.
190 # The xyzzy stuff below deals with empty DEPFILES
192 etags
`find ${srcdir}/../config -name $(DEPRECATED_TM_FILE) -print` \
193 `find ${srcdir}/../config -name ${XM_FILE} -print` \
194 `find ${srcdir}/../config -name ${NAT_FILE} -print` \
195 `for i in yzzy ${DEPFILES}; do \
196 if [ x$$i != xyzzy ]; then \
197 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
204 rm -f
*.o
${ADD_FILES} *~
206 rm -f gdbserver gdbreplay core make.log
207 rm -f reg-arm.c reg-i386.c reg-ia64.c reg-m32r.c reg-m68k.c reg-mips.c
208 rm -f reg-ppc.c reg-sh.c reg-x86-64.c reg-i386-linux.c
209 rm -f reg-cris.c reg-crisv32.c
211 maintainer-clean
realclean distclean: clean
212 rm -f nm.h tm.h xm.h config.status config.h stamp-h config.log
215 config.h
: stamp-h
; @true
216 stamp-h
: config.in config.status
217 CONFIG_FILES
="" CONFIG_HEADERS
=config.h
:config.in
$(SHELL
) .
/config.status
219 Makefile
: Makefile.in config.status
220 CONFIG_HEADERS
="" $(SHELL
) .
/config.status
222 config.status
: configure configure.srv
223 $(SHELL
) .
/config.status
--recheck
227 version.c
: Makefile
$(srcdir)/..
/version.in
228 rm -f version.c-tmp version.c
229 echo
'#include "server.h"' >> version.c-tmp
230 echo
'const char version[] = "'"`sed q ${srcdir}/../version.in`"'";' >> version.c-tmp
231 echo
'const char host_name[] = "$(host_alias)";' >> version.c-tmp
232 mv version.c-tmp version.c
233 version.o
: version.c
$(server_h
)
235 # GNU Make has an annoying habit of putting *all* the Makefile variables
236 # into the environment, unless you include this target as a circumvention.
237 # Rumor is that this will be fixed (and this target can be removed)
241 # GNU Make 3.63 has a different problem: it keeps tacking command line
242 # overrides onto the definition of $(MAKE). This variable setting
246 gdb_proc_service_h
= $(srcdir)/gdb_proc_service.h
247 regdat_sh
= $(srcdir)/..
/regformats
/regdat.sh
248 regdef_h
= $(srcdir)/..
/regformats
/regdef.h
249 regcache_h
= $(srcdir)/regcache.h
250 server_h
= $(srcdir)/server.h
$(regcache_h
) config.h
$(srcdir)/target.h \
251 $(srcdir)/mem-break.h
253 inferiors.o
: inferiors.c
$(server_h
)
254 mem-break.o
: mem-break.c
$(server_h
)
255 proc-service.o
: proc-service.c
$(server_h
) $(gdb_proc_service_h
)
256 regcache.o
: regcache.c
$(server_h
) $(regdef_h
)
257 remote-utils.o
: remote-utils.c terminal.h
$(server_h
)
258 server.o
: server.c
$(server_h
)
259 target.o
: target.c
$(server_h
)
260 thread-db.o
: thread-db.c
$(server_h
) $(gdb_proc_service_h
)
261 utils.o
: utils.c
$(server_h
)
263 signals.o
: ..
/signals
/signals.c
$(server_h
)
264 $(CC
) -c
$(CPPFLAGS
) $(INTERNAL_CFLAGS
) $< -DGDBSERVER
266 i387-fp.o
: i387-fp.c
$(server_h
)
268 linux_low_h
= $(srcdir)/linux-low.h
270 linux-low.o
: linux-low.c
$(linux_low_h
) $(server_h
)
271 $(CC
) -c
$(CPPFLAGS
) $(INTERNAL_CFLAGS
) $< @USE_THREAD_DB@
273 linux-arm-low.o
: linux-arm-low.c
$(linux_low_h
) $(server_h
) \
274 $(gdb_proc_service_h
)
275 linux-cris-low.o
: linux-cris-low.c
$(linux_low_h
) $(server_h
)
276 linux-crisv32-low.o
: linux-crisv32-low.c
$(linux_low_h
) $(server_h
)
277 linux-i386-low.o
: linux-i386-low.c
$(linux_low_h
) $(server_h
) \
278 $(gdb_proc_service_h
)
279 linux-ia64-low.o
: linux-ia64-low.c
$(linux_low_h
) $(server_h
)
280 linux-m32r-low.o
: linux-m32r-low.c
$(linux_low_h
) $(server_h
)
281 linux-mips-low.o
: linux-mips-low.c
$(linux_low_h
) $(server_h
) \
282 $(gdb_proc_service_h
)
283 linux-ppc-low.o
: linux-ppc-low.c
$(linux_low_h
) $(server_h
)
284 linux-ppc64-low.o
: linux-ppc64-low.c
$(linux_low_h
) $(server_h
)
285 linux-s390-low.o
: linux-s390-low.c
$(linux_low_h
) $(server_h
)
286 linux-sh-low.o
: linux-sh-low.c
$(linux_low_h
) $(server_h
)
287 linux-x86-64-low.o
: linux-x86-64-low.c
$(linux_low_h
) $(server_h
) \
288 $(gdb_proc_service_h
)
290 win32-i386-low.o
: win32-i386-low.c
$(server_h
) $(regdef_h
) $(regcache_h
)
292 reg-arm.o
: reg-arm.c
$(regdef_h
)
293 reg-arm.c
: $(srcdir)/..
/regformats
/reg-arm.dat
$(regdat_sh
)
294 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-arm.dat reg-arm.c
295 reg-cris.o
: reg-cris.c
$(regdef_h
)
296 reg-cris.c
: $(srcdir)/..
/regformats
/reg-cris.dat
$(regdat_sh
)
297 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-cris.dat reg-cris.c
298 reg-crisv32.o
: reg-crisv32.c
$(regdef_h
)
299 reg-crisv32.c
: $(srcdir)/..
/regformats
/reg-crisv32.dat
$(regdat_sh
)
300 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-crisv32.dat reg-crisv32.c
301 reg-i386.o
: reg-i386.c
$(regdef_h
)
302 reg-i386.c
: $(srcdir)/..
/regformats
/reg-i386.dat
$(regdat_sh
)
303 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-i386.dat reg-i386.c
304 reg-i386-linux.o
: reg-i386-linux.c
$(regdef_h
)
305 reg-i386-linux.c
: $(srcdir)/..
/regformats
/reg-i386-linux.dat
$(regdat_sh
)
306 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-i386-linux.dat reg-i386-linux.c
307 reg-ia64.o
: reg-ia64.c
$(regdef_h
)
308 reg-ia64.c
: $(srcdir)/..
/regformats
/reg-ia64.dat
$(regdat_sh
)
309 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-ia64.dat reg-ia64.c
310 reg-m32r.o
: reg-m32r.c
$(regdef_h
)
311 reg-m32r.c
: $(srcdir)/..
/regformats
/reg-m32r.dat
$(regdat_sh
)
312 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-m32r.dat reg-m32r.c
313 reg-m68k.o
: reg-m68k.c
$(regdef_h
)
314 reg-m68k.c
: $(srcdir)/..
/regformats
/reg-m68k.dat
$(regdat_sh
)
315 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-m68k.dat reg-m68k.c
316 reg-mips.o
: reg-mips.c
$(regdef_h
)
317 reg-mips.c
: $(srcdir)/..
/regformats
/reg-mips.dat
$(regdat_sh
)
318 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-mips.dat reg-mips.c
319 reg-ppc.o
: reg-ppc.c
$(regdef_h
)
320 reg-ppc.c
: $(srcdir)/..
/regformats
/reg-ppc.dat
$(regdat_sh
)
321 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-ppc.dat reg-ppc.c
322 reg-ppc64.o
: reg-ppc64.c
$(regdef_h
)
323 reg-ppc64.c
: $(srcdir)/..
/regformats
/reg-ppc64.dat
$(regdat_sh
)
324 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-ppc64.dat reg-ppc64.c
325 reg-s390.o
: reg-s390.c
$(regdef_h
)
326 reg-s390.c
: $(srcdir)/..
/regformats
/reg-s390.dat
$(regdat_sh
)
327 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-s390.dat reg-s390.c
328 reg-s390x.o
: reg-s390x.c
$(regdef_h
)
329 reg-s390x.c
: $(srcdir)/..
/regformats
/reg-s390x.dat
$(regdat_sh
)
330 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-s390x.dat reg-s390x.c
331 reg-sh.o
: reg-sh.c
$(regdef_h
)
332 reg-sh.c
: $(srcdir)/..
/regformats
/reg-sh.dat
$(regdat_sh
)
333 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-sh.dat reg-sh.c
334 reg-x86-64.o
: reg-x86-64.c
$(regdef_h
)
335 reg-x86-64.c
: $(srcdir)/..
/regformats
/reg-x86-64.dat
$(regdat_sh
)
336 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-x86-64.dat reg-x86-64.c
338 # This is the end of "Makefile.in".