* target.h: Add enum target_waitkind, enum target_signal, and
[deliverable/binutils-gdb.git] / gdb / gdbserver / Makefile.in
CommitLineData
c033ec17
JK
1#Copyright 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
2
3# This file is part of GDB.
4
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19prefix = /usr/local
20
21program_transform_name =
22exec_prefix = $(prefix)
23bindir = $(exec_prefix)/bin
24libdir = $(exec_prefix)/lib
25tooldir = $(libdir)/$(target_alias)
26
27datadir = $(prefix)/lib
28mandir = $(prefix)/man
29man1dir = $(mandir)/man1
30man2dir = $(mandir)/man2
31man3dir = $(mandir)/man3
32man4dir = $(mandir)/man4
33man5dir = $(mandir)/man5
34man6dir = $(mandir)/man6
35man7dir = $(mandir)/man7
36man8dir = $(mandir)/man8
37man9dir = $(mandir)/man9
38infodir = $(prefix)/info
39includedir = $(prefix)/include
40docdir = $(datadir)/doc
41
42SHELL = /bin/sh
43
44INSTALL = install -c
45INSTALL_PROGRAM = $(INSTALL)
46INSTALL_DATA = $(INSTALL)
47
48AR = ar
49AR_FLAGS = qv
50RANLIB = ranlib
51
52# Flags that describe where you can find the termcap library.
53# This can be overridden in the host Makefile fragment file.
54TERMCAP = -ltermcap
55
56# System V: If you compile gdb with a compiler which uses the coff
57# encapsulation feature (this is a function of the compiler used, NOT
58# of the m-?.h file selected by config.gdb), you must make sure that
59# the GNU nm is the one that is used by munch.
60
61# If you are compiling with GCC, make sure that either 1) You use the
62# -traditional flag, or 2) You have the fixed include files where GCC
63# can reach them. Otherwise the ioctl calls in inflow.c
64# will be incorrectly compiled. The "fixincludes" script in the gcc
65# distribution will fix your include files up.
66#CC=cc
67#CC=gcc -traditional
68GCC=gcc
69
70# Directory containing source files. Don't clean up the spacing,
71# this exact string is matched for by the "configure" script.
72srcdir = .
73
74# It is also possible that you will need to add -I/usr/include/sys to the
75# CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
76# is where it should be according to Posix).
77
78# If you use bison instead of yacc, it needs to include the "-y" argument.
79#BISON=bison -y
80BISON=yacc
81YACC=$(BISON)
82
83# where to find texinfo; GDB dist should include a recent one
84TEXIDIR=${srcdir}/../texinfo
85
86# where to find makeinfo, preferably one designed for texinfo-2
87MAKEINFO=makeinfo
88
89# Set this up with gcc if you have gnu ld and the loader will print out
90# line numbers for undefinded refs.
91#CC-LD=gcc -static
92CC-LD=${CC}
93
94# Where is the "include" directory? Traditionally ../include or ./include
95INCLUDE_DIR = ${srcdir}/../../include
96INCLUDE_DEP = $$(INCLUDE_DIR)
97
98# Where is the source dir for the MMALLOC library? Traditionally ../mmalloc
99# or ./mmalloc (When we want the binary library built from it, we use
100# ${MMALLOC_DIR}${subdir}.)
101# Note that mmalloc can still be used on systems without mmap().
102# To use your system malloc, comment out the following defines.
103MMALLOC_DIR = ${srcdir}/../mmalloc
104MMALLOC_DEP = $$(MMALLOC_DIR)
105# To use your system malloc, uncomment MMALLOC_DISABLE.
106#MMALLOC_DISABLE = -DNO_MMALLOC
107# To use mmalloc but disable corruption checking, uncomment MMALLOC_CHECK
108#MMALLOC_CHECK = -DNO_MMALLOC_CHECK
109MMALLOC_CFLAGS = ${MMALLOC_CHECK} ${MMALLOC_DISABLE}
110
111# Where is the source dir for the READLINE library? Traditionally in .. or .
112# (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
113READLINE_DIR = ${srcdir}/../readline
114READLINE_DEP = $$(READLINE_DIR)
115
116# All the includes used for CFLAGS and for lint.
117# -I. for config files.
118# -I${srcdir} possibly for regex.h also.
119# -I${srcdir}/config for more generic config files.
120INCLUDE_CFLAGS = -I. -I${srcdir} -I${srcdir}/.. -I${srcdir}/../config -I$(INCLUDE_DIR)
121
122# M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
123# from the config/ directory.
124GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
125#PROFILE_CFLAGS = -pg
126
127# CFLAGS is specifically reserved for setting from the command line
128# when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
129CFLAGS = -g
130# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
131INTERNAL_CFLAGS = ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MMALLOC_CFLAGS} ${INCLUDE_CFLAGS} ${USER_CFLAGS}
132LDFLAGS = $(CFLAGS)
133
134# Perhaps should come from parent Makefile
135VERSION = gdbserver-4.9.1
136DIST=gdb
137
138LINT=/usr/5bin/lint
139LINTFLAGS= -I${BFD_DIR}
140
141# Host and target-dependent makefile fragments come in here.
142####
143# End of host and target-dependent makefile fragments
144
145# All source files that go into linking GDB remote server.
146
5b3c73e6
JK
147SFILES = $(srcdir)/low-lynx.c $(srcdir)/low-sparc.c $(srcdir)/low-sun3.c \
148 $(srcdir)/utils.c $(srcdir)/server.c $(srcdir)/remote-utils.c
c033ec17
JK
149
150DEPFILES = $(GDBSERVER_DEPFILES)
151
152SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES)
153TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
154
155OBS = utils.o $(GDBSERVER_DEPFILES) server.o remote-utils.o
156
157# Prevent Sun make from putting in the machine type. Setting
158# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
159.c.o:
160 ${CC} -c ${INTERNAL_CFLAGS} $<
161
162all: gdbserver
163
164installcheck:
165check:
166info dvi:
167install-info:
168clean-info:
169
170gdbserver: $(OBS) ${ADD_DEPS} ${CDEPS}
171 ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbserver $(OBS) \
172 $(GDBSERVER_LIBS)
173
174config.status:
175 @echo "You must configure gdbserver. Look at the README file for details."
176 @false
177
178# Put the proper machine-specific files first, so M-. on a machine
179# specific routine gets the one for the correct machine.
180# The xyzzy stuff below deals with empty DEPFILES
181TAGS: ${TAGFILES}
182 etags `find ${srcdir}/config -name $(TM_FILE) -print` \
183 `find ${srcdir}/config -name ${XM_FILE} -print` \
184 `find ${srcdir}/config -name ${NAT_FILE} -print` \
185 `for i in yzzy ${DEPFILES}; do \
186 if [ x$$i != xyzzy ]; then \
187 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
188 fi; \
189 done` \
190 ${TAGFILES}
191tags: TAGS
192
193# Making distributions of GDB and friends.
194
195# Make a tar file containing the GDB directory of the distribution.
196gdb.tar.Z: force_update
197 $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
198 $(MAKE) $(MFLAGS) -f Makefile.in gdb-$(VERSION).tar.Z
199
200# Make a directory `proto-gdb.dir' that contains an image of the GDB
201# directory of the distribution, built up with symlinks. Note that this
202# make target is not directly referenced by any other rules in this makefile,
203# it is referenced by the makefile in the parent directory.
204make-proto-gdb.dir: force_update
205 $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
206 $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1
207
208# Set up the GDB source directory for distribution, by building all files that
209# are products of other files.
210setup-to-dist: update-depend force_update
211 ../configure none
212 (cd doc; $(MAKE) $(MFLAGS) GDBvn.texi)
213 $(MAKE) $(MFLAGS) gdb.info
214 $(MAKE) $(MFLAGS) refcard.ps
215
216# Update the "depend" and "alldeps.mak" files in a source directory.
217# We update alldeps.mak first, since it is used to generate the list
218# of files to be checked for dependencies.
219update-depend: update-alldeps force_update
220 ../configure none -norecursion
221 rm -f depend
222 $(MAKE) $(MFLAGS) depend
223
224# Update the "alldeps.mak" file in a source directory.
225update-alldeps: force_update
226 ../configure none -norecursion
227 rm -f alldeps.mak
228 $(MAKE) $(MFLAGS) alldeps.mak
229
230# Build a tar file from a proto-gdb.dir.
231gdb-$(VERSION).tar.Z: force_update
232 rm -f gdb.tar gdb-$(VERSION).tar.Z
233 $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1
234 ln -s proto-gdb.dir $(DIST)
235 tar chf - $(DIST) | compress >gdb-$(VERSION).tar.Z
236 rm -rf $(DIST) proto-gdb.dir
237
238clean:
239 rm -f *.o ${ADD_FILES} *~
240 rm -f init.c version.c
241 rm -f gdbserver core make.log
242
243distclean: clean c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS
244 rm -f tm.h xm.h config.status
245 rm -f Makefile
246
247realclean: clean
248 rm -f c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS
249 rm -f tm.h xm.h config.status
250 rm -f Makefile
251
252STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
253
254Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
255 $(SHELL) ./config.status
256
257force:
258
259version.c: Makefile
260 echo 'char *version = "$(VERSION)";' >version.c
261
262# GNU Make has an annoying habit of putting *all* the Makefile variables
263# into the environment, unless you include this target as a circumvention.
264# Rumor is that this will be fixed (and this target can be removed)
265# in GNU Make 4.0.
266.NOEXPORT:
267
268# GNU Make 3.63 has a different problem: it keeps tacking command line
269# overrides onto the definition of $(MAKE). This variable setting
270# will remove them.
271MAKEOVERRIDES=
272
273## This is ugly, but I don't want GNU make to put these variables in
274## the environment. Older makes will see this as a set of targets
275## with no dependencies and no actions.
276unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
277
278server.o : ${srcdir}/server.c ${srcdir}/server.h
279remote-utils.o : ${srcdir}/remote-utils.c ${srcdir}/server.h
280low-lynx.o : ${srcdir}/low-lynx.c ${srcdir}/server.h
281low-sparc.o : $(srcdir)/low-sparc.c $(srcdir)/server.h
5b3c73e6 282low-sun3.o : $(srcdir)/low-sun3.c $(srcdir)/server.h
c033ec17
JK
283utils.o : ${srcdir}/utils.c ${srcdir}/server.h
284
285# This is the end of "Makefile.in".
This page took 0.050776 seconds and 4 git commands to generate.