1 # Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
2 # 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4 # This file is part of GDB.
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.
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.
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.
21 exec_prefix = @
exec_prefix@
23 host_alias
= @host_alias@
24 target_alias
= @target_alias@
25 program_transform_name
= @program_transform_name@
28 tooldir
= $(libdir)/$(target_alias
)
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
42 htmldir
= $(prefix)/html
43 includedir = @
includedir@
48 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
49 INSTALL_DATA
= @INSTALL_DATA@
53 # Directory containing source files. Don't clean up the spacing,
54 # this exact string is matched for by the "configure" script.
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).
62 # Set this up with gcc if you have gnu ld and the loader will print out
63 # line numbers for undefinded refs.
67 # Where is the "include" directory? Traditionally ../include or ./include
68 INCLUDE_DIR
= ${srcdir}/..
/..
/include
69 INCLUDE_DEP
= $$(INCLUDE_DIR
)
71 # Where are the BFD library?
73 BFD
= $(BFD_DIR
)/libbfd.a
74 BFD_SRC
= $(srcdir)/$(BFD_DIR
)
75 BFD_CFLAGS
= -I
$(BFD_DIR
) -I
$(BFD_SRC
)
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
)
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
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}
93 # CFLAGS is specifically reserved for setting from the command line
94 # when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
97 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
98 INTERNAL_CFLAGS
= ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} \
99 ${INCLUDE_CFLAGS} ${BFD_CFLAGS} -DGDBSERVER
101 # LDFLAGS is specifically reserved for setting from the command line
104 # Perhaps should come from parent Makefile
105 VERSION
= gdbserver-4.12
.3
109 LINTFLAGS
= $(BFD_CFLAGS
)
111 # All source files that go into linking GDB remote server.
113 SFILES
= $(srcdir)/low-hppabsd.c
$(srcdir)/low-linux.c
$(srcdir)/low-lynx.c \
114 $(srcdir)/low-nbsd.c
$(srcdir)/low-sim.c
$(srcdir)/low-sparc.c \
115 $(srcdir)/low-sun3.c
$(srcdir)/utils.c
$(srcdir)/server.c \
116 $(srcdir)/remote-utils.c
118 DEPFILES
= @GDBSERVER_DEPFILES@
121 TAGFILES
= $(SOURCES
) ${HFILES} ${ALLPARAM} ${POSSLIBS}
123 OBS
= utils.o
$(DEPFILES
) server.o remote-utils.o regcache.o
125 # Prevent Sun make from putting in the machine type. Setting
126 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
128 ${CC} -c
${INTERNAL_CFLAGS} $<
130 all: gdbserver gdbreplay
132 # Traditionally "install" depends on "all". But it may be useful
133 # not to; for example, if the user has made some trivial change to a
134 # source file and doesn't care about rebuilding or just wants to save the
135 # time it takes for make to check that all is up to date.
136 # install-only is intended to address that need.
137 install: all install-only
139 n
=`echo gdbserver | sed '$(program_transform_name)'`; \
140 if
[ x
$$n = x
]; then n
=gdbserver
; else true
; fi
; \
141 $(INSTALL_PROGRAM
) gdbserver
$(bindir)/$$n; \
142 $(INSTALL_DATA
) $(srcdir)/gdbserver
.1 $(man1dir)/$$n.1
145 n
=`echo gdbserver | sed '$(program_transform_name)'`; \
146 if
[ x
$$n = x
]; then n
=gdbserver
; else true
; fi
; \
147 rm -f
$(bindir)/$$n $(man1dir)/$$n.1
157 gdbserver
: $(OBS
) ${ADD_DEPS} ${CDEPS}
159 ${CC-LD
} $(GLOBAL_CFLAGS
) $(LDFLAGS
) -o gdbserver
$(OBS
) \
160 $(GDBSERVER_LIBS
) $(XM_CLIBS
)
162 gdbreplay
: gdbreplay.o
164 ${CC-LD
} $(GLOBAL_CFLAGS
) $(LDFLAGS
) -o gdbreplay gdbreplay.o \
167 # Put the proper machine-specific files first, so M-. on a machine
168 # specific routine gets the one for the correct machine.
169 # The xyzzy stuff below deals with empty DEPFILES
171 etags
`find ${srcdir}/../config -name $(TM_FILE) -print` \
172 `find ${srcdir}/../config -name ${XM_FILE} -print` \
173 `find ${srcdir}/../config -name ${NAT_FILE} -print` \
174 `for i in yzzy ${DEPFILES}; do \
175 if [ x$$i != xyzzy ]; then \
176 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
183 rm -f
*.o
${ADD_FILES} *~
184 rm -f gdbserver gdbreplay core make.log
185 rm -f reg-arm.c reg-i386.c reg-ia64.c reg-m68k.c reg-mips.c
186 rm -f reg-ppc.c reg-sh.c reg-i386-linux.c
189 rm -f nm.h tm.h xm.h config.status
192 maintainer-clean
realclean: clean
193 rm -f nm.h tm.h xm.h config.status
196 STAGESTUFF
=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
198 Makefile
: Makefile.in config.status
199 $(SHELL
) .
/config.status
201 config.status
: configure
202 $(SHELL
) .
/config.status
--recheck
207 echo
'char *version = "$(VERSION)";' >version.c
209 # GNU Make has an annoying habit of putting *all* the Makefile variables
210 # into the environment, unless you include this target as a circumvention.
211 # Rumor is that this will be fixed (and this target can be removed)
215 # GNU Make 3.63 has a different problem: it keeps tacking command line
216 # overrides onto the definition of $(MAKE). This variable setting
220 ## This is ugly, but I don't want GNU make to put these variables in
221 ## the environment. Older makes will see this as a set of targets
222 ## with no dependencies and no actions.
223 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
225 regdat_sh
= $(srcdir)/..
/regformats
/regdat.sh
226 regdef_h
= $(srcdir)/..
/regformats
/regdef.h
227 regcache_h
= $(srcdir)/regcache.h
228 server_h
= $(srcdir)/server.h
$(regcache_h
)
230 server.o
: server.c
$(server_h
)
231 remote-utils.o
: remote-utils.c terminal.h
$(server_h
)
232 utils.o
: utils.c
$(server_h
)
233 regcache.o
: regcache.c
$(server_h
) $(regdef_h
)
235 linux-low.o
: linux-low.c
$(server_h
)
236 linux-arm-low.o
: linux-arm-low.c
$(server_h
)
237 linux-i386-low.o
: linux-i386-low.c
$(server_h
)
238 linux-ia64-low.o
: linux-ia64-low.c
$(server_h
)
239 linux-mips-low.o
: linux-mips-low.c
$(server_h
)
240 linux-ppc-low.o
: linux-ppc-low.c
$(server_h
)
241 linux-sh-low.o
: linux-sh-low.c
$(server_h
)
244 # OBSOLETE # low-lynx.o : ${srcdir}/low-lynx.c ${srcdir}/server.h
245 # OBSOLETE # low-nbsd.o : ${srcdir}/low-nbsd.c ${srcdir}/server.h
246 # OBSOLETE # low-sim.o : ${srcdir}/low-sim.c ${srcdir}/server.h
247 # OBSOLETE # low-sparc.o : $(srcdir)/low-sparc.c $(srcdir)/server.h
248 # OBSOLETE # low-sun3.o : $(srcdir)/low-sun3.c $(srcdir)/server.h
249 # OBSOLETE # low-hppabsd.o : $(srcdir)/low-hppabsd.c $(srcdir)/server.h
251 reg-arm.o
: reg-arm.c
$(regdef_h
)
252 reg-arm.c
: $(srcdir)/..
/regformats
/reg-arm.dat
$(regdat_sh
)
253 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-arm.dat reg-arm.c
254 reg-i386.o
: reg-i386.c
$(regdef_h
)
255 reg-i386.c
: $(srcdir)/..
/regformats
/reg-i386.dat
$(regdat_sh
)
256 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-i386.dat reg-i386.c
257 reg-i386-linux.o
: reg-i386-linux.c
$(regdef_h
)
258 reg-i386-linux.c
: $(srcdir)/..
/regformats
/reg-i386-linux.dat
$(regdat_sh
)
259 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-i386-linux.dat reg-i386-linux.c
260 reg-ia64.o
: reg-ia64.c
$(regdef_h
)
261 reg-ia64.c
: $(srcdir)/..
/regformats
/reg-ia64.dat
$(regdat_sh
)
262 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-ia64.dat reg-ia64.c
263 reg-m68k.o
: reg-m68k.c
$(regdef_h
)
264 reg-m68k.c
: $(srcdir)/..
/regformats
/reg-m68k.dat
$(regdat_sh
)
265 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-m68k.dat reg-m68k.c
266 reg-mips.o
: reg-mips.c
$(regdef_h
)
267 reg-mips.c
: $(srcdir)/..
/regformats
/reg-mips.dat
$(regdat_sh
)
268 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-mips.dat reg-mips.c
269 reg-ppc.o
: reg-ppc.c
$(regdef_h
)
270 reg-ppc.c
: $(srcdir)/..
/regformats
/reg-ppc.dat
$(regdat_sh
)
271 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-ppc.dat reg-ppc.c
272 reg-sh.o
: reg-sh.c
$(regdef_h
)
273 reg-sh.c
: $(srcdir)/..
/regformats
/reg-sh.dat
$(regdat_sh
)
274 sh
$(regdat_sh
) $(srcdir)/..
/regformats
/reg-sh.dat reg-sh.c
276 # This is the end of "Makefile.in".