]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/Makefile.in
2002-02-04 Daniel Jacobowitz <drow@mvista.com>
[thirdparty/binutils-gdb.git] / gdb / gdbserver / Makefile.in
CommitLineData
b6ba6518
KB
1#Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
2#1999, 2000
c906108c
SS
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
d6e9fb05
JK
21prefix = @prefix@
22exec_prefix = @exec_prefix@
c906108c 23
d6e9fb05
JK
24host_alias = @host_alias@
25target_alias = @target_alias@
26program_transform_name = @program_transform_name@
27bindir = @bindir@
28libdir = @libdir@
c906108c
SS
29tooldir = $(libdir)/$(target_alias)
30
d6e9fb05
JK
31datadir = @datadir@
32mandir = @mandir@
c906108c
SS
33man1dir = $(mandir)/man1
34man2dir = $(mandir)/man2
35man3dir = $(mandir)/man3
36man4dir = $(mandir)/man4
37man5dir = $(mandir)/man5
38man6dir = $(mandir)/man6
39man7dir = $(mandir)/man7
40man8dir = $(mandir)/man8
41man9dir = $(mandir)/man9
d6e9fb05 42infodir = @infodir@
085dd6e6 43htmldir = $(prefix)/html
d6e9fb05 44includedir = @includedir@
c906108c
SS
45
46SHELL = /bin/sh
47
d6e9fb05
JK
48INSTALL = @INSTALL@
49INSTALL_PROGRAM = @INSTALL_PROGRAM@
50INSTALL_DATA = @INSTALL_DATA@
c906108c
SS
51
52AR = ar
53AR_FLAGS = qv
54RANLIB = ranlib
55
56# If you are compiling with GCC, make sure that either 1) You use the
57# -traditional flag, or 2) You have the fixed include files where GCC
58# can reach them. Otherwise the ioctl calls in inflow.c
59# will be incorrectly compiled. The "fixincludes" script in the gcc
60# distribution will fix your include files up.
61#CC=cc
62#CC=gcc -traditional
63GCC=gcc
64
65# Directory containing source files. Don't clean up the spacing,
66# this exact string is matched for by the "configure" script.
d6e9fb05
JK
67srcdir = @srcdir@
68VPATH = @srcdir@
c906108c
SS
69
70# It is also possible that you will need to add -I/usr/include/sys to the
71# CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
72# is where it should be according to Posix).
73
74# Set this up with gcc if you have gnu ld and the loader will print out
75# line numbers for undefinded refs.
76#CC-LD=gcc -static
77CC-LD=${CC}
78
79# Where is the "include" directory? Traditionally ../include or ./include
80INCLUDE_DIR = ${srcdir}/../../include
81INCLUDE_DEP = $$(INCLUDE_DIR)
82
83# Where are the BFD library?
84BFD_DIR = ../../bfd
85BFD = $(BFD_DIR)/libbfd.a
86BFD_SRC = $(srcdir)/$(BFD_DIR)
87BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
88
89# Where is the source dir for the READLINE library? Traditionally in .. or .
90# (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
91READLINE_DIR = ${srcdir}/../readline
92READLINE_DEP = $$(READLINE_DIR)
93
94# All the includes used for CFLAGS and for lint.
95# -I. for config files.
5c44784c 96# -I.. for gdb's config files (especially config.h)
c906108c
SS
97# -I${srcdir} possibly for regex.h also.
98# -I${srcdir}/config for more generic config files.
5c44784c 99INCLUDE_CFLAGS = -I. -I.. -I${srcdir} -I${srcdir}/.. -I${srcdir}/../config -I$(INCLUDE_DIR)
c906108c
SS
100
101# M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
102# from the config/ directory.
103GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
104#PROFILE_CFLAGS = -pg
105
106# CFLAGS is specifically reserved for setting from the command line
107# when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
108CFLAGS = -g
109# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
110INTERNAL_CFLAGS = ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} \
5c44784c 111 ${INCLUDE_CFLAGS} ${BFD_CFLAGS} -DGDBSERVER
c906108c
SS
112
113# LDFLAGS is specifically reserved for setting from the command line
114# when running make.
115
116# Perhaps should come from parent Makefile
117VERSION = gdbserver-4.12.3
118DIST=gdb
119
120LINT=/usr/5bin/lint
121LINTFLAGS= $(BFD_CFLAGS)
122
123# Host and target-dependent makefile fragments come in here.
d6e9fb05
JK
124@host_makefile_frag@
125@target_makefile_frag@
c906108c
SS
126# End of host and target-dependent makefile fragments
127
128# All source files that go into linking GDB remote server.
129
d6e9fb05
JK
130SFILES = $(srcdir)/low-hppabsd.c $(srcdir)/low-linux.c $(srcdir)/low-lynx.c \
131 $(srcdir)/low-nbsd.c $(srcdir)/low-sim.c $(srcdir)/low-sparc.c \
132 $(srcdir)/low-sun3.c $(srcdir)/utils.c $(srcdir)/server.c \
133 $(srcdir)/remote-utils.c
c906108c
SS
134
135DEPFILES = $(GDBSERVER_DEPFILES)
136
137SOURCES = $(SFILES) $(ALLDEPFILES)
138TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
139
140OBS = utils.o $(GDBSERVER_DEPFILES) server.o remote-utils.o
141
142# Prevent Sun make from putting in the machine type. Setting
143# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
144.c.o:
145 ${CC} -c ${INTERNAL_CFLAGS} $<
146
147all: gdbserver gdbreplay
148
149# Traditionally "install" depends on "all". But it may be useful
150# not to; for example, if the user has made some trivial change to a
151# source file and doesn't care about rebuilding or just wants to save the
152# time it takes for make to check that all is up to date.
153# install-only is intended to address that need.
154install: all install-only
155install-only:
156 n=`echo gdbserver | sed '$(program_transform_name)'`; \
157 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
158 $(INSTALL_PROGRAM) gdbserver $(bindir)/$$n; \
159 $(INSTALL_DATA) $(srcdir)/gdbserver.1 $(man1dir)/$$n.1
160
161uninstall: force
162 n=`echo gdbserver | sed '$(program_transform_name)'`; \
163 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
164 rm -f $(bindir)/$$n $(man1dir)/$$n.1
165
166installcheck:
167check:
168info dvi:
169install-info:
085dd6e6
JM
170html:
171install-html:
c906108c
SS
172clean-info:
173
174gdbserver: $(OBS) ${ADD_DEPS} ${CDEPS}
175 rm -f gdbserver
176 ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbserver $(OBS) \
177 $(GDBSERVER_LIBS) $(XM_CLIBS)
178
179gdbreplay: gdbreplay.o
180 rm -f gdbreplay
181 ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbreplay gdbreplay.o \
182 $(XM_CLIBS)
183
c906108c
SS
184# Put the proper machine-specific files first, so M-. on a machine
185# specific routine gets the one for the correct machine.
186# The xyzzy stuff below deals with empty DEPFILES
187TAGS: ${TAGFILES}
188 etags `find ${srcdir}/../config -name $(TM_FILE) -print` \
189 `find ${srcdir}/../config -name ${XM_FILE} -print` \
190 `find ${srcdir}/../config -name ${NAT_FILE} -print` \
191 `for i in yzzy ${DEPFILES}; do \
192 if [ x$$i != xyzzy ]; then \
193 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
194 fi; \
195 done` \
196 ${TAGFILES}
197tags: TAGS
198
199clean:
200 rm -f *.o ${ADD_FILES} *~
d6e9fb05 201 rm -f gdbserver gdbreplay core make.log
c906108c
SS
202
203distclean: clean
204 rm -f nm.h tm.h xm.h config.status
205 rm -f Makefile
206
207maintainer-clean realclean: clean
208 rm -f nm.h tm.h xm.h config.status
209 rm -f Makefile
210
211STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
212
d6e9fb05 213Makefile: Makefile.in config.status @frags@
c906108c
SS
214 $(SHELL) ./config.status
215
d6e9fb05
JK
216config.status: configure
217 $(SHELL) ./config.status --recheck
218
c906108c
SS
219force:
220
221version.c: Makefile
222 echo 'char *version = "$(VERSION)";' >version.c
223
224# GNU Make has an annoying habit of putting *all* the Makefile variables
225# into the environment, unless you include this target as a circumvention.
226# Rumor is that this will be fixed (and this target can be removed)
227# in GNU Make 4.0.
228.NOEXPORT:
229
230# GNU Make 3.63 has a different problem: it keeps tacking command line
231# overrides onto the definition of $(MAKE). This variable setting
232# will remove them.
233MAKEOVERRIDES=
234
235## This is ugly, but I don't want GNU make to put these variables in
236## the environment. Older makes will see this as a set of targets
237## with no dependencies and no actions.
238unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
239
240server.o : ${srcdir}/server.c ${srcdir}/server.h
241remote-utils.o : ${srcdir}/remote-utils.c ${srcdir}/server.h
242low-linux.o : ${srcdir}/low-linux.c ${srcdir}/server.h
243low-lynx.o : ${srcdir}/low-lynx.c ${srcdir}/server.h
d6e9fb05 244low-nbsd.o : ${srcdir}/low-nbsd.c ${srcdir}/server.h
c906108c
SS
245low-sim.o : ${srcdir}/low-sim.c ${srcdir}/server.h
246low-sparc.o : $(srcdir)/low-sparc.c $(srcdir)/server.h
247low-sun3.o : $(srcdir)/low-sun3.c $(srcdir)/server.h
248low-hppabsd.o : $(srcdir)/low-hppabsd.c $(srcdir)/server.h
249utils.o : ${srcdir}/utils.c ${srcdir}/server.h
250
251# This is the end of "Makefile.in".