daily update
[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
SS
50
51AR = ar
52AR_FLAGS = qv
53RANLIB = ranlib
54
55# If you are compiling with GCC, make sure that either 1) You use the
56# -traditional flag, or 2) You have the fixed include files where GCC
57# can reach them. Otherwise the ioctl calls in inflow.c
58# will be incorrectly compiled. The "fixincludes" script in the gcc
59# distribution will fix your include files up.
60#CC=cc
61#CC=gcc -traditional
62GCC=gcc
63
64# Directory containing source files. Don't clean up the spacing,
65# this exact string is matched for by the "configure" script.
d6e9fb05
JK
66srcdir = @srcdir@
67VPATH = @srcdir@
c906108c
SS
68
69# It is also possible that you will need to add -I/usr/include/sys to the
70# CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
71# is where it should be according to Posix).
72
73# Set this up with gcc if you have gnu ld and the loader will print out
74# line numbers for undefinded refs.
75#CC-LD=gcc -static
76CC-LD=${CC}
77
78# Where is the "include" directory? Traditionally ../include or ./include
79INCLUDE_DIR = ${srcdir}/../../include
80INCLUDE_DEP = $$(INCLUDE_DIR)
81
82# Where are the BFD library?
83BFD_DIR = ../../bfd
84BFD = $(BFD_DIR)/libbfd.a
85BFD_SRC = $(srcdir)/$(BFD_DIR)
86BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
87
88# Where is the source dir for the READLINE library? Traditionally in .. or .
89# (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
90READLINE_DIR = ${srcdir}/../readline
91READLINE_DEP = $$(READLINE_DIR)
92
93# All the includes used for CFLAGS and for lint.
94# -I. for config files.
5c44784c 95# -I.. for gdb's config files (especially config.h)
c906108c
SS
96# -I${srcdir} possibly for regex.h also.
97# -I${srcdir}/config for more generic config files.
0c74b2a7 98# -I$(srcdir)/../regformats for regdef.h
0a30fbc4
DJ
99INCLUDE_CFLAGS = -I. -I.. -I${srcdir} -I${srcdir}/.. \
100 -I$(srcdir)/../regformats
c906108c
SS
101
102# M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
103# from the config/ directory.
104GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
105#PROFILE_CFLAGS = -pg
106
107# CFLAGS is specifically reserved for setting from the command line
108# when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
109CFLAGS = -g
110# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
111INTERNAL_CFLAGS = ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} \
5c44784c 112 ${INCLUDE_CFLAGS} ${BFD_CFLAGS} -DGDBSERVER
c906108c
SS
113
114# LDFLAGS is specifically reserved for setting from the command line
115# when running make.
116
117# Perhaps should come from parent Makefile
118VERSION = gdbserver-4.12.3
119DIST=gdb
120
121LINT=/usr/5bin/lint
122LINTFLAGS= $(BFD_CFLAGS)
123
124# Host and target-dependent makefile fragments come in here.
d6e9fb05
JK
125@host_makefile_frag@
126@target_makefile_frag@
c906108c
SS
127# End of host and target-dependent makefile fragments
128
129# All source files that go into linking GDB remote server.
130
d6e9fb05
JK
131SFILES = $(srcdir)/low-hppabsd.c $(srcdir)/low-linux.c $(srcdir)/low-lynx.c \
132 $(srcdir)/low-nbsd.c $(srcdir)/low-sim.c $(srcdir)/low-sparc.c \
133 $(srcdir)/low-sun3.c $(srcdir)/utils.c $(srcdir)/server.c \
134 $(srcdir)/remote-utils.c
c906108c
SS
135
136DEPFILES = $(GDBSERVER_DEPFILES)
137
138SOURCES = $(SFILES) $(ALLDEPFILES)
139TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
140
0a30fbc4 141OBS = utils.o $(GDBSERVER_DEPFILES) server.o remote-utils.o regcache.o
c906108c
SS
142
143# Prevent Sun make from putting in the machine type. Setting
144# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
145.c.o:
146 ${CC} -c ${INTERNAL_CFLAGS} $<
147
148all: gdbserver gdbreplay
149
150# Traditionally "install" depends on "all". But it may be useful
151# not to; for example, if the user has made some trivial change to a
152# source file and doesn't care about rebuilding or just wants to save the
153# time it takes for make to check that all is up to date.
154# install-only is intended to address that need.
155install: all install-only
156install-only:
157 n=`echo gdbserver | sed '$(program_transform_name)'`; \
158 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
159 $(INSTALL_PROGRAM) gdbserver $(bindir)/$$n; \
160 $(INSTALL_DATA) $(srcdir)/gdbserver.1 $(man1dir)/$$n.1
161
162uninstall: force
163 n=`echo gdbserver | sed '$(program_transform_name)'`; \
164 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
165 rm -f $(bindir)/$$n $(man1dir)/$$n.1
166
167installcheck:
168check:
169info dvi:
170install-info:
085dd6e6
JM
171html:
172install-html:
c906108c
SS
173clean-info:
174
175gdbserver: $(OBS) ${ADD_DEPS} ${CDEPS}
176 rm -f gdbserver
177 ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbserver $(OBS) \
178 $(GDBSERVER_LIBS) $(XM_CLIBS)
179
180gdbreplay: gdbreplay.o
181 rm -f gdbreplay
182 ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbreplay gdbreplay.o \
183 $(XM_CLIBS)
184
c906108c
SS
185# Put the proper machine-specific files first, so M-. on a machine
186# specific routine gets the one for the correct machine.
187# The xyzzy stuff below deals with empty DEPFILES
188TAGS: ${TAGFILES}
189 etags `find ${srcdir}/../config -name $(TM_FILE) -print` \
190 `find ${srcdir}/../config -name ${XM_FILE} -print` \
191 `find ${srcdir}/../config -name ${NAT_FILE} -print` \
192 `for i in yzzy ${DEPFILES}; do \
193 if [ x$$i != xyzzy ]; then \
194 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
195 fi; \
196 done` \
197 ${TAGFILES}
198tags: TAGS
199
200clean:
201 rm -f *.o ${ADD_FILES} *~
d6e9fb05 202 rm -f gdbserver gdbreplay core make.log
0a30fbc4
DJ
203 rm -f reg-arm.c reg-i386.c reg-ia64.c reg-m68k.c reg-mips.c
204 rm -f reg-ppc.c reg-sh.c
c906108c
SS
205
206distclean: clean
207 rm -f nm.h tm.h xm.h config.status
208 rm -f Makefile
209
210maintainer-clean realclean: clean
211 rm -f nm.h tm.h xm.h config.status
212 rm -f Makefile
213
214STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
215
d6e9fb05 216Makefile: Makefile.in config.status @frags@
c906108c
SS
217 $(SHELL) ./config.status
218
d6e9fb05
JK
219config.status: configure
220 $(SHELL) ./config.status --recheck
221
c906108c
SS
222force:
223
224version.c: Makefile
225 echo 'char *version = "$(VERSION)";' >version.c
226
227# GNU Make has an annoying habit of putting *all* the Makefile variables
228# into the environment, unless you include this target as a circumvention.
229# Rumor is that this will be fixed (and this target can be removed)
230# in GNU Make 4.0.
231.NOEXPORT:
232
233# GNU Make 3.63 has a different problem: it keeps tacking command line
234# overrides onto the definition of $(MAKE). This variable setting
235# will remove them.
236MAKEOVERRIDES=
237
238## This is ugly, but I don't want GNU make to put these variables in
239## the environment. Older makes will see this as a set of targets
240## with no dependencies and no actions.
241unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
242
0c74b2a7 243regdat_sh = $(srcdir)/../regformats/regdat.sh
0a30fbc4
DJ
244regdef_h = $(srcdir)/../regformats/regdef.h
245regcache_h = $(srcdir)/regcache.h
246server_h = $(srcdir)/server.h $(regcache_h)
247
248server.o: server.c $(server_h)
249remote-utils.o: remote-utils.c $(server_h)
250utils.o: utils.c $(server_h)
251regcache.o: regcache.c $(server_h) $(regdef_h)
252
253linux-low.o: linux-low.c $(server_h)
ad68be46
DJ
254linux-arm-low.o: linux-arm-low.c $(server_h)
255linux-i386-low.o: linux-i386-low.c $(server_h)
256linux-ia64-low.o: linux-ia64-low.c $(server_h)
257linux-mips-low.o: linux-mips-low.c $(server_h)
258linux-ppc-low.o: linux-ppc-low.c $(server_h)
259linux-sh-low.o: linux-sh-low.c $(server_h)
0a30fbc4
DJ
260
261# OBSOLETE TARGETS
262# OBSOLETE # low-lynx.o : ${srcdir}/low-lynx.c ${srcdir}/server.h
263# OBSOLETE # low-nbsd.o : ${srcdir}/low-nbsd.c ${srcdir}/server.h
264# OBSOLETE # low-sim.o : ${srcdir}/low-sim.c ${srcdir}/server.h
265# OBSOLETE # low-sparc.o : $(srcdir)/low-sparc.c $(srcdir)/server.h
266# OBSOLETE # low-sun3.o : $(srcdir)/low-sun3.c $(srcdir)/server.h
267# OBSOLETE # low-hppabsd.o : $(srcdir)/low-hppabsd.c $(srcdir)/server.h
0c74b2a7
DJ
268
269reg-arm.o : reg-arm.c $(regdef_h)
270reg-arm.c : $(srcdir)/../regformats/reg-arm.dat $(regdat_sh)
271 sh $(regdat_sh) $(srcdir)/../regformats/reg-arm.dat reg-arm.c
272reg-i386.o : reg-i386.c $(regdef_h)
273reg-i386.c : $(srcdir)/../regformats/reg-i386.dat $(regdat_sh)
274 sh $(regdat_sh) $(srcdir)/../regformats/reg-i386.dat reg-i386.c
275reg-ia64.o : reg-ia64.c $(regdef_h)
276reg-ia64.c : $(srcdir)/../regformats/reg-ia64.dat $(regdat_sh)
277 sh $(regdat_sh) $(srcdir)/../regformats/reg-ia64.dat reg-ia64.c
278reg-m68k.o : reg-m68k.c $(regdef_h)
279reg-m68k.c : $(srcdir)/../regformats/reg-m68k.dat $(regdat_sh)
280 sh $(regdat_sh) $(srcdir)/../regformats/reg-m68k.dat reg-m68k.c
281reg-mips.o : reg-mips.c $(regdef_h)
282reg-mips.c : $(srcdir)/../regformats/reg-mips.dat $(regdat_sh)
283 sh $(regdat_sh) $(srcdir)/../regformats/reg-mips.dat reg-mips.c
284reg-ppc.o : reg-ppc.c $(regdef_h)
285reg-ppc.c : $(srcdir)/../regformats/reg-ppc.dat $(regdat_sh)
286 sh $(regdat_sh) $(srcdir)/../regformats/reg-ppc.dat reg-ppc.c
287reg-sh.o : reg-sh.c $(regdef_h)
288reg-sh.c : $(srcdir)/../regformats/reg-sh.dat $(regdat_sh)
289 sh $(regdat_sh) $(srcdir)/../regformats/reg-sh.dat reg-sh.c
290
c906108c 291# This is the end of "Makefile.in".
This page took 0.175083 seconds and 4 git commands to generate.