Fix PR gdb/287. From wiz at danbala. Then->than and typos.
[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.
5c44784c 84# -I.. for gdb's config files (especially config.h)
c906108c
SS
85# -I${srcdir} possibly for regex.h also.
86# -I${srcdir}/config for more generic config files.
0c74b2a7 87# -I$(srcdir)/../regformats for regdef.h
0a30fbc4
DJ
88INCLUDE_CFLAGS = -I. -I.. -I${srcdir} -I${srcdir}/.. \
89 -I$(srcdir)/../regformats
c906108c
SS
90
91# M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
92# from the config/ directory.
93GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
94#PROFILE_CFLAGS = -pg
95
96# CFLAGS is specifically reserved for setting from the command line
97# when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
84563040
DJ
98CFLAGS = @CFLAGS@
99
c906108c
SS
100# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
101INTERNAL_CFLAGS = ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} \
5c44784c 102 ${INCLUDE_CFLAGS} ${BFD_CFLAGS} -DGDBSERVER
c906108c
SS
103
104# LDFLAGS is specifically reserved for setting from the command line
105# when running make.
106
107# Perhaps should come from parent Makefile
108VERSION = gdbserver-4.12.3
109DIST=gdb
110
111LINT=/usr/5bin/lint
112LINTFLAGS= $(BFD_CFLAGS)
113
114# Host and target-dependent makefile fragments come in here.
d6e9fb05
JK
115@host_makefile_frag@
116@target_makefile_frag@
c906108c
SS
117# End of host and target-dependent makefile fragments
118
119# All source files that go into linking GDB remote server.
120
d6e9fb05
JK
121SFILES = $(srcdir)/low-hppabsd.c $(srcdir)/low-linux.c $(srcdir)/low-lynx.c \
122 $(srcdir)/low-nbsd.c $(srcdir)/low-sim.c $(srcdir)/low-sparc.c \
123 $(srcdir)/low-sun3.c $(srcdir)/utils.c $(srcdir)/server.c \
124 $(srcdir)/remote-utils.c
c906108c
SS
125
126DEPFILES = $(GDBSERVER_DEPFILES)
127
128SOURCES = $(SFILES) $(ALLDEPFILES)
129TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
130
0a30fbc4 131OBS = utils.o $(GDBSERVER_DEPFILES) server.o remote-utils.o regcache.o
c906108c
SS
132
133# Prevent Sun make from putting in the machine type. Setting
134# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
135.c.o:
136 ${CC} -c ${INTERNAL_CFLAGS} $<
137
138all: gdbserver gdbreplay
139
140# Traditionally "install" depends on "all". But it may be useful
141# not to; for example, if the user has made some trivial change to a
142# source file and doesn't care about rebuilding or just wants to save the
143# time it takes for make to check that all is up to date.
144# install-only is intended to address that need.
145install: all install-only
146install-only:
147 n=`echo gdbserver | sed '$(program_transform_name)'`; \
148 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
149 $(INSTALL_PROGRAM) gdbserver $(bindir)/$$n; \
150 $(INSTALL_DATA) $(srcdir)/gdbserver.1 $(man1dir)/$$n.1
151
152uninstall: force
153 n=`echo gdbserver | sed '$(program_transform_name)'`; \
154 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
155 rm -f $(bindir)/$$n $(man1dir)/$$n.1
156
157installcheck:
158check:
159info dvi:
160install-info:
085dd6e6
JM
161html:
162install-html:
c906108c
SS
163clean-info:
164
165gdbserver: $(OBS) ${ADD_DEPS} ${CDEPS}
166 rm -f gdbserver
167 ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbserver $(OBS) \
168 $(GDBSERVER_LIBS) $(XM_CLIBS)
169
170gdbreplay: gdbreplay.o
171 rm -f gdbreplay
172 ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbreplay gdbreplay.o \
173 $(XM_CLIBS)
174
c906108c
SS
175# Put the proper machine-specific files first, so M-. on a machine
176# specific routine gets the one for the correct machine.
177# The xyzzy stuff below deals with empty DEPFILES
178TAGS: ${TAGFILES}
179 etags `find ${srcdir}/../config -name $(TM_FILE) -print` \
180 `find ${srcdir}/../config -name ${XM_FILE} -print` \
181 `find ${srcdir}/../config -name ${NAT_FILE} -print` \
182 `for i in yzzy ${DEPFILES}; do \
183 if [ x$$i != xyzzy ]; then \
184 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
185 fi; \
186 done` \
187 ${TAGFILES}
188tags: TAGS
189
190clean:
191 rm -f *.o ${ADD_FILES} *~
d6e9fb05 192 rm -f gdbserver gdbreplay core make.log
0a30fbc4
DJ
193 rm -f reg-arm.c reg-i386.c reg-ia64.c reg-m68k.c reg-mips.c
194 rm -f reg-ppc.c reg-sh.c
c906108c
SS
195
196distclean: clean
197 rm -f nm.h tm.h xm.h config.status
198 rm -f Makefile
199
200maintainer-clean realclean: clean
201 rm -f nm.h tm.h xm.h config.status
202 rm -f Makefile
203
204STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
205
d6e9fb05 206Makefile: Makefile.in config.status @frags@
c906108c
SS
207 $(SHELL) ./config.status
208
d6e9fb05
JK
209config.status: configure
210 $(SHELL) ./config.status --recheck
211
c906108c
SS
212force:
213
214version.c: Makefile
215 echo 'char *version = "$(VERSION)";' >version.c
216
217# GNU Make has an annoying habit of putting *all* the Makefile variables
218# into the environment, unless you include this target as a circumvention.
219# Rumor is that this will be fixed (and this target can be removed)
220# in GNU Make 4.0.
221.NOEXPORT:
222
223# GNU Make 3.63 has a different problem: it keeps tacking command line
224# overrides onto the definition of $(MAKE). This variable setting
225# will remove them.
226MAKEOVERRIDES=
227
228## This is ugly, but I don't want GNU make to put these variables in
229## the environment. Older makes will see this as a set of targets
230## with no dependencies and no actions.
231unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
232
0c74b2a7 233regdat_sh = $(srcdir)/../regformats/regdat.sh
0a30fbc4
DJ
234regdef_h = $(srcdir)/../regformats/regdef.h
235regcache_h = $(srcdir)/regcache.h
236server_h = $(srcdir)/server.h $(regcache_h)
237
238server.o: server.c $(server_h)
239remote-utils.o: remote-utils.c $(server_h)
240utils.o: utils.c $(server_h)
241regcache.o: regcache.c $(server_h) $(regdef_h)
242
243linux-low.o: linux-low.c $(server_h)
ad68be46
DJ
244linux-arm-low.o: linux-arm-low.c $(server_h)
245linux-i386-low.o: linux-i386-low.c $(server_h)
246linux-ia64-low.o: linux-ia64-low.c $(server_h)
247linux-mips-low.o: linux-mips-low.c $(server_h)
248linux-ppc-low.o: linux-ppc-low.c $(server_h)
249linux-sh-low.o: linux-sh-low.c $(server_h)
0a30fbc4
DJ
250
251# OBSOLETE TARGETS
252# OBSOLETE # low-lynx.o : ${srcdir}/low-lynx.c ${srcdir}/server.h
253# OBSOLETE # low-nbsd.o : ${srcdir}/low-nbsd.c ${srcdir}/server.h
254# OBSOLETE # low-sim.o : ${srcdir}/low-sim.c ${srcdir}/server.h
255# OBSOLETE # low-sparc.o : $(srcdir)/low-sparc.c $(srcdir)/server.h
256# OBSOLETE # low-sun3.o : $(srcdir)/low-sun3.c $(srcdir)/server.h
257# OBSOLETE # low-hppabsd.o : $(srcdir)/low-hppabsd.c $(srcdir)/server.h
0c74b2a7
DJ
258
259reg-arm.o : reg-arm.c $(regdef_h)
260reg-arm.c : $(srcdir)/../regformats/reg-arm.dat $(regdat_sh)
261 sh $(regdat_sh) $(srcdir)/../regformats/reg-arm.dat reg-arm.c
262reg-i386.o : reg-i386.c $(regdef_h)
263reg-i386.c : $(srcdir)/../regformats/reg-i386.dat $(regdat_sh)
264 sh $(regdat_sh) $(srcdir)/../regformats/reg-i386.dat reg-i386.c
265reg-ia64.o : reg-ia64.c $(regdef_h)
266reg-ia64.c : $(srcdir)/../regformats/reg-ia64.dat $(regdat_sh)
267 sh $(regdat_sh) $(srcdir)/../regformats/reg-ia64.dat reg-ia64.c
268reg-m68k.o : reg-m68k.c $(regdef_h)
269reg-m68k.c : $(srcdir)/../regformats/reg-m68k.dat $(regdat_sh)
270 sh $(regdat_sh) $(srcdir)/../regformats/reg-m68k.dat reg-m68k.c
271reg-mips.o : reg-mips.c $(regdef_h)
272reg-mips.c : $(srcdir)/../regformats/reg-mips.dat $(regdat_sh)
273 sh $(regdat_sh) $(srcdir)/../regformats/reg-mips.dat reg-mips.c
274reg-ppc.o : reg-ppc.c $(regdef_h)
275reg-ppc.c : $(srcdir)/../regformats/reg-ppc.dat $(regdat_sh)
276 sh $(regdat_sh) $(srcdir)/../regformats/reg-ppc.dat reg-ppc.c
277reg-sh.o : reg-sh.c $(regdef_h)
278reg-sh.c : $(srcdir)/../regformats/reg-sh.dat $(regdat_sh)
279 sh $(regdat_sh) $(srcdir)/../regformats/reg-sh.dat reg-sh.c
280
c906108c 281# This is the end of "Makefile.in".
This page took 0.198759 seconds and 4 git commands to generate.