1*66103Sbostic#Copyright 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
2*66103Sbostic
3*66103Sbostic# This file is part of GDB.
4*66103Sbostic
5*66103Sbostic# This program is free software; you can redistribute it and/or modify
6*66103Sbostic# it under the terms of the GNU General Public License as published by
7*66103Sbostic# the Free Software Foundation; either version 2 of the License, or
8*66103Sbostic# (at your option) any later version.
9*66103Sbostic#
10*66103Sbostic# This program is distributed in the hope that it will be useful,
11*66103Sbostic# but WITHOUT ANY WARRANTY; without even the implied warranty of
12*66103Sbostic# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13*66103Sbostic# GNU General Public License for more details.
14*66103Sbostic#
15*66103Sbostic# You should have received a copy of the GNU General Public License
16*66103Sbostic# along with this program; if not, write to the Free Software
17*66103Sbostic# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18*66103Sbostic
19*66103Sbosticprefix = /usr/local
20*66103Sbostic
21*66103Sbosticprogram_transform_name =
22*66103Sbosticexec_prefix = $(prefix)
23*66103Sbosticbindir = /usr/bin
24*66103Sbosticlibdir = $(exec_prefix)/lib
25*66103Sbostictooldir = $(libdir)/$(target_alias)
26*66103Sbostic
27*66103Sbosticdatadir = $(prefix)/lib
28*66103Sbosticmandir = $(prefix)/man
29*66103Sbosticman1dir = $(mandir)/man1
30*66103Sbosticman2dir = $(mandir)/man2
31*66103Sbosticman3dir = $(mandir)/man3
32*66103Sbosticman4dir = $(mandir)/man4
33*66103Sbosticman5dir = $(mandir)/man5
34*66103Sbosticman6dir = $(mandir)/man6
35*66103Sbosticman7dir = $(mandir)/man7
36*66103Sbosticman8dir = $(mandir)/man8
37*66103Sbosticman9dir = $(mandir)/man9
38*66103Sbosticinfodir = $(prefix)/info
39*66103Sbosticincludedir = $(prefix)/include
40*66103Sbosticdocdir = $(datadir)/doc
41*66103Sbostic
42*66103SbosticSHELL = /bin/sh
43*66103Sbostic
44*66103Sbosticxbindir = /usr/bin/X11
45*66103Sbosticxlibdir = /usr/lib/X11
46*66103Sbostic
47*66103SbosticINSTALL = install -c
48*66103SbosticINSTALL_PROGRAM = $(INSTALL)
49*66103SbosticINSTALL_DATA = $(INSTALL)
50*66103Sbostic
51*66103SbosticAR = ar
52*66103SbosticAR_FLAGS = qv
53*66103SbosticRANLIB = ranlib
54*66103Sbostic
55*66103Sbostic# Flags that describe where you can find the termcap library.
56*66103Sbostic# This can be overridden in the host Makefile fragment file.
57*66103SbosticTERMCAP = -ltermcap
58*66103Sbostic
59*66103Sbostic# System V: If you compile gdb with a compiler which uses the coff
60*66103Sbostic# encapsulation feature (this is a function of the compiler used, NOT
61*66103Sbostic# of the m-?.h file selected by config.gdb), you must make sure that
62*66103Sbostic# the GNU nm is the one that is used by munch.
63*66103Sbostic
64*66103Sbostic# If you are compiling with GCC, make sure that either 1) You use the
65*66103Sbostic# -traditional flag, or 2) You have the fixed include files where GCC
66*66103Sbostic# can reach them.  Otherwise the ioctl calls in inflow.c
67*66103Sbostic# will be incorrectly compiled.  The "fixincludes" script in the gcc
68*66103Sbostic# distribution will fix your include files up.
69*66103Sbostic#CC=cc
70*66103Sbostic#CC=gcc -traditional
71*66103SbosticCC=gcc -O2
72*66103SbosticGCC=gcc
73*66103Sbostic
74*66103Sbostic# Directory containing source files.  Don't clean up the spacing,
75*66103Sbostic# this exact string is matched for by the "configure" script.
76*66103Sbosticsrcdir = .
77*66103Sbostic
78*66103Sbostic# It is also possible that you will need to add -I/usr/include/sys to the
79*66103Sbostic# CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
80*66103Sbostic# is where it should be according to Posix).
81*66103Sbostic
82*66103SbosticBISON=yacc
83*66103SbosticYACC=$(BISON)
84*66103Sbostic
85*66103Sbostic# Documentation (gdb.dvi) needs either GNU m4 or SysV m4;
86*66103Sbostic# Berkeley/Sun don't have quite enough.
87*66103Sbostic#M4=/usr/5bin/m4
88*66103SbosticM4=gm4
89*66103Sbostic
90*66103Sbostic# where to find texinfo; GDB dist should include a recent one
91*66103SbosticTEXIDIR=${srcdir}/../texinfo/fsf
92*66103Sbostic
93*66103Sbostic# where to find makeinfo, preferably one designed for texinfo-2
94*66103SbosticMAKEINFO=makeinfo
95*66103Sbostic
96*66103Sbostic# Set this up with gcc if you have gnu ld and the loader will print out
97*66103Sbostic# line numbers for undefinded refs.
98*66103Sbostic#CC-LD=gcc -static
99*66103SbosticCC-LD=${CC}
100*66103Sbostic
101*66103Sbostic# Where is the "include" directory?  Traditionally ../include or ./include
102*66103SbosticINCLUDE_DIR =  ${srcdir}/../include
103*66103SbosticINCLUDE_DEP = $$(INCLUDE_DIR)
104*66103Sbostic
105*66103Sbostic# Where is the source dir for the MMALLOC library? Traditionally ../mmalloc
106*66103Sbostic# or ./mmalloc  (When we want the binary library built from it, we use
107*66103Sbostic# ${MMALLOC_DIR}${subdir}.)
108*66103Sbostic# Note that mmalloc can still be used on systems without mmap().
109*66103Sbostic# To use your system malloc, comment out the following defines.
110*66103SbosticMMALLOC_DIR = ${srcdir}/../mmalloc
111*66103SbosticMMALLOC_DEP = $$(MMALLOC_DIR)
112*66103SbosticMMALLOC_LIB = ./../mmalloc${subdir}/libmmalloc.a
113*66103Sbostic# To use your system malloc, uncomment MMALLOC_DISABLE.
114*66103Sbostic#MMALLOC_DISABLE = -DNO_MMALLOC
115*66103Sbostic# To use mmalloc but disable corruption checking, uncomment MMALLOC_CHECK
116*66103Sbostic#MMALLOC_CHECK = -DNO_MMALLOC_CHECK
117*66103SbosticMMALLOC_CFLAGS = ${MMALLOC_CHECK} ${MMALLOC_DISABLE}
118*66103Sbostic
119*66103Sbostic# Where is the source dir for the BFD library?  Traditionally ../bfd or ./bfd
120*66103Sbostic# (When we want the binary library built from it, we use ${BFD_DIR}${subdir}.)
121*66103SbosticBFD_DIR =  ${srcdir}/../bfd
122*66103SbosticBFD_DEP = $$(BFD_DIR)
123*66103SbosticBFD_LIB = ./../bfd${subdir}/libbfd.a
124*66103Sbostic
125*66103Sbostic# Where is the source dir for the READLINE library?  Traditionally in .. or .
126*66103Sbostic# (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
127*66103SbosticREADLINE_DIR = ${srcdir}/../readline
128*66103SbosticREADLINE_DEP = $$(READLINE_DIR)
129*66103SbosticRL_LIB = ./../readline${subdir}/libreadline.a
130*66103Sbostic
131*66103Sbostic# All the includes used for CFLAGS and for lint.
132*66103Sbostic# -I. for config files.
133*66103Sbostic# -I${srcdir} possibly for regex.h also.
134*66103SbosticINCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR)
135*66103Sbostic
136*66103Sbostic# M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
137*66103Sbostic# from the config/ directory.
138*66103SbosticGLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
139*66103Sbostic#PROFILE_CFLAGS = -pg
140*66103Sbostic
141*66103Sbostic# CFLAGS is specifically reserved for setting from the command line
142*66103Sbostic# when running make.  I.E.  "make USER_CFLAGS=-Wmissing-prototypes".
143*66103SbosticCFLAGS = -g
144*66103Sbostic# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
145*66103SbosticINTERNAL_CFLAGS = ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MMALLOC_CFLAGS} ${INCLUDE_CFLAGS} ${USER_CFLAGS}
146*66103Sbostic# None of the things in CFLAGS will do any harm, and on some systems
147*66103Sbostic#  (e.g. SunOS4) it is important to use the MH_CFLAGS.
148*66103SbosticLDFLAGS = $(CFLAGS)
149*66103Sbostic
150*66103Sbostic# Where is the "-liberty" library, containing getopt and obstack?
151*66103SbosticLIBIBERTY_DIR = ${srcdir}/../libiberty
152*66103SbosticLIBIBERTY = ./../libiberty${subdir}/libiberty.a
153*66103Sbostic
154*66103Sbostic# Where is the "-lopcodes" library, with (some of) the opcode tables and
155*66103Sbostic# disassemblers?
156*66103SbosticOPCODES = ./../opcodes${subdir}/libopcodes.a
157*66103Sbostic
158*66103Sbostic# The config/mh-* file must define REGEX and REGEX1 on USG machines.
159*66103Sbostic# If your sysyem is missing alloca(), or, more likely, it's there but
160*66103Sbostic# it doesn't work, define ALLOCA & ALLOCA1 too.
161*66103Sbostic
162*66103Sbostic# Libraries and corresponding dependencies for compiling gdb.
163*66103Sbostic# {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
164*66103Sbostic# TERMCAP comes after readline, since readline depends on it.
165*66103SbosticCLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${OPCODES} ${MMALLOC_LIB} ${LIBIBERTY} \
166*66103Sbostic	${XM_CLIBS} ${TM_CLIBS} ${NAT_CLIBS}
167*66103SbosticCDEPS = ${XM_CDEPS} ${TM_CDEPS} ${NAT_CDEPS} \
168*66103Sbostic	${BFD_LIB} ${RL_LIB}            ${OPCODES} ${MMALLOC_LIB} ${LIBIBERTY}
169*66103Sbostic
170*66103SbosticADD_FILES = ${REGEX} ${ALLOCA}  ${XM_ADD_FILES} ${TM_ADD_FILES} ${NAT_ADD_FILES}
171*66103SbosticADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES} ${NAT_ADD_FILES}
172*66103Sbostic
173*66103SbosticVERSION = 4.7
174*66103SbosticDIST=gdb
175*66103Sbostic
176*66103SbosticLINT=/usr/5bin/lint
177*66103SbosticLINTFLAGS= -I${BFD_DIR}
178*66103Sbostic
179*66103Sbostic# Host and target-dependent makefile fragments come in here.
180*66103Sbostic####
181*66103Sbostic# End of host and target-dependent makefile fragments
182*66103SbosticLBL_SRC = kcore.c remote-sl.c remote-fp.c kernel.c cmdparse.c
183*66103SbosticLBL_OBJ = $(LBL_SRC:.c=.o)
184*66103Sbostic
185*66103Sbostic#SYMREADERS = dbxread.c coffread.c elfread.c dwarfread.c \
186*66103Sbostic#		xcoffread.c stabsread.c mipsread.c
187*66103SbosticSYMREADERS = dbxread.c stabsread.c
188*66103SbosticSYMREADOBJ = $(SYMREADERS:.c=.o)
189*66103Sbostic
190*66103SbosticFLAGS_TO_PASS = \
191*66103Sbostic	"against=$(against)" \
192*66103Sbostic	"AR=$(AR)" \
193*66103Sbostic	"AR_FLAGS=$(AR_FLAGS)" \
194*66103Sbostic	"CC=$(CC)" \
195*66103Sbostic	"CFLAGS=$(CFLAGS) $(MT_CFLAGS)" \
196*66103Sbostic	"RANLIB=$(RANLIB)" \
197*66103Sbostic	"MAKEINFO=$(MAKEINFO)" \
198*66103Sbostic	"INSTALL=$(INSTALL)" \
199*66103Sbostic	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
200*66103Sbostic	"INSTALL_DATA=$(INSTALL_DATA)" \
201*66103Sbostic	"BISON=$(BISON)"
202*66103Sbostic
203*66103Sbostic# Source files in the main directory.
204*66103Sbostic# Files which are included via a config/* Makefile fragment
205*66103Sbostic# should *not* be specified here; they're in "ALLDEPFILES".
206*66103SbosticSFILES_MAINDIR = \
207*66103Sbostic	blockframe.c breakpoint.c command.c core.c demangle.c \
208*66103Sbostic	environ.c eval.c expprint.c findvar.c infcmd.c inflow.c infrun.c \
209*66103Sbostic	main.c printcmd.c gdbtypes.c \
210*66103Sbostic	remote.c source.c stack.c symmisc.c symtab.c symfile.c \
211*66103Sbostic	utils.c valarith.c valops.c valprint.c values.c c-exp.y m2-exp.y \
212*66103Sbostic	mem-break.c target.c \
213*66103Sbostic	$(SYMREADERS) \
214*66103Sbostic	ieee-float.c language.c parse.c buildsym.c objfiles.c \
215*66103Sbostic	minsyms.c maint.c \
216*66103Sbostic	$(LBL_SRC) xgdb.c
217*66103Sbostic
218*66103Sbostic# Source files in subdirectories (which will be handled separately by
219*66103Sbostic#  'make gdb.tar.Z').
220*66103Sbostic# Files which are included via a config/* Makefile fragment
221*66103Sbostic# should *not* be specified here; they're in "ALLDEPFILES".
222*66103SbosticSFILES_SUBDIR = \
223*66103Sbostic	 ${srcdir}/vx-share/dbgRpcLib.h \
224*66103Sbostic	 ${srcdir}/vx-share/ptrace.h \
225*66103Sbostic	 ${srcdir}/vx-share/reg.h \
226*66103Sbostic	 ${srcdir}/vx-share/vxTypes.h \
227*66103Sbostic	 ${srcdir}/vx-share/vxWorks.h \
228*66103Sbostic	 ${srcdir}/vx-share/wait.h \
229*66103Sbostic	 ${srcdir}/vx-share/xdr_ld.h \
230*66103Sbostic	 ${srcdir}/vx-share/xdr_ptrace.h \
231*66103Sbostic	 ${srcdir}/vx-share/xdr_rdb.h \
232*66103Sbostic	 ${srcdir}/vx-share/xdr_regs.h \
233*66103Sbostic	 ${srcdir}/nindy-share/b.out.h \
234*66103Sbostic	 ${srcdir}/nindy-share/block_io.h \
235*66103Sbostic	 ${srcdir}/nindy-share/coff.h \
236*66103Sbostic	 ${srcdir}/nindy-share/demux.h \
237*66103Sbostic	 ${srcdir}/nindy-share/env.h \
238*66103Sbostic	 ${srcdir}/nindy-share/stop.h \
239*66103Sbostic	 ${srcdir}/nindy-share/ttycntl.h
240*66103Sbostic
241*66103Sbostic# Non-source files in subdirs, that should go into gdb.tar.Z.
242*66103SbosticNONSRC_SUBDIR = \
243*66103Sbostic	 ${srcdir}/nindy-share/Makefile \
244*66103Sbostic	 ${srcdir}/nindy-share/VERSION \
245*66103Sbostic	 ${srcdir}/nindy-share/README \
246*66103Sbostic	 ${srcdir}/vx-share/README
247*66103Sbostic
248*66103Sbostic# All source files that go into linking GDB, except config-specified files.
249*66103SbosticSFILES = $(SFILES_MAINDIR) $(SFILES_SUBDIR)
250*66103Sbostic
251*66103Sbostic# All source files that lint should look at
252*66103SbosticLINTFILES = $(SFILES) $(YYFILES) init.c
253*66103Sbostic
254*66103Sbostic# Any additional files specified on these lines should also be added to
255*66103Sbostic# the OTHERS = definition below, so they go in the tar files.
256*66103SbosticSFILES_STAND = $(SFILES) standalone.c
257*66103SbosticSFILES_KGDB  = $(SFILES) stuff.c kdb-start.c
258*66103Sbostic
259*66103Sbostic# Header files that are not named in config/* Makefile fragments go here.
260*66103SbosticHFILES=	breakpoint.h buildsym.h call-cmds.h command.h defs.h \
261*66103Sbostic	environ.h expression.h frame.h gdbcmd.h gdbcore.h gdbtypes.h \
262*66103Sbostic	gdb-stabs.h ieee-float.h inferior.h language.h \
263*66103Sbostic	minimon.h objfiles.h parser-defs.h partial-stab.h \
264*66103Sbostic	serial.h signals.h solib.h symfile.h symtab.h stabsread.h \
265*66103Sbostic	target.h terminal.h xcoffsolib.h value.h \
266*66103Sbostic	tm-68k.h tm-hppa.h tm-i960.h tm-sparc.h tm-sunos.h tm-sysv4.h \
267*66103Sbostic	xm-m68k.h xm-sparc.h xm-sysv4.h xm-vax.h \
268*66103Sbostic	nm-i386bsd.h nm-i386mach.h nm-i386sco.h nm-i386v.h nm-i386v4.h nm-irix3.h \
269*66103Sbostic	nm-irix4.h nm-linux.h nm-m88k.h nm-mips.h nm-news.h nm-rs6000.h \
270*66103Sbostic	nm-sun2.h nm-sun3.h nm-sun386.h nm-sun4os4.h nm-trash.h \
271*66103Sbostic	nm-ultra3.h nm-hppab.h nm-hppah.h nm-umax.h nm-sysv4.h
272*66103Sbostic
273*66103SbosticREMOTE_EXAMPLES = m68k-stub.c i386-stub.c sparc-stub.c rem-multi.shar
274*66103Sbostic
275*66103SbosticPOSSLIBS_MAINDIR = regex.c regex.h alloca.c
276*66103SbosticPOSSLIBS = $(POSSLIBS_MAINDIR)
277*66103Sbostic
278*66103SbosticTESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c
279*66103Sbostic
280*66103SbosticOTHERS = Makefile.in depend alldeps.mak createtags munch configure.in \
281*66103Sbostic	 ChangeLog ChangeLog-9091 ChangeLog-3.x gdb.1 refcard.ps \
282*66103Sbostic	 README TODO TAGS NEWS Projects \
283*66103Sbostic	 .gdbinit COPYING $(YYFILES) \
284*66103Sbostic	 copying.c Convex.notes copying.awk \
285*66103Sbostic	 saber.suppress standalone.c stuff.c kdb-start.c \
286*66103Sbostic	 putenv.c gcc.patch XGDB-README
287*66103Sbostic
288*66103Sbostic# Subdirectories of gdb, which should be included in their entirety in
289*66103Sbostic# gdb-xxx.tar.Z:
290*66103SbosticTARDIRS = doc # tests
291*66103Sbostic
292*66103Sbostic# GDB "info" files, which should be included in their entirety
293*66103SbosticINFOFILES = gdb.info*
294*66103Sbostic
295*66103SbosticDEPFILES= ${TDEPFILES} ${XDEPFILES} ${NATDEPFILES}
296*66103Sbostic
297*66103SbosticSOURCES=$(SFILES) $(ALLDEPFILES) $(YYFILES)
298*66103SbosticTAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
299*66103SbosticTAGFILES_MAINDIR = $(SFILES_MAINDIR) $(ALLDEPFILES_MAINDIR) \
300*66103Sbostic             ${HFILES} ${ALLPARAM} ${POSSLIBS_MAINDIR}
301*66103SbosticTARFILES = ${TAGFILES_MAINDIR} ${OTHERS} ${REMOTE_EXAMPLES}
302*66103Sbostic
303*66103SbosticOBS = version.o main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
304*66103Sbostic    values.o eval.o valops.o valarith.o valprint.o printcmd.o \
305*66103Sbostic    symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \
306*66103Sbostic    command.o utils.o expprint.o environ.o gdbtypes.o \
307*66103Sbostic    copying.o $(DEPFILES) mem-break.o target.o \
308*66103Sbostic    ieee-float.o putenv.o parse.o language.o $(YYOBJ) \
309*66103Sbostic    buildsym.o objfiles.o minsyms.o maint.o demangle.o \
310*66103Sbostic    $(SYMREADOBJ) core.o \
311*66103Sbostic    $(LBL_OBJ)
312*66103Sbostic
313*66103SbosticRAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
314*66103Sbostic
315*66103SbosticTSOBS = inflow.o
316*66103Sbostic
317*66103SbosticNTSOBS = standalone.o
318*66103Sbostic
319*66103SbosticTSSTART = /lib/crt0.o
320*66103Sbostic
321*66103SbosticNTSSTART = kdb-start.o
322*66103Sbostic
323*66103SbosticSUBDIRS = doc
324*66103Sbostic
325*66103Sbostic# For now, shortcut the "configure GDB for fewer languages" stuff.
326*66103SbosticYYFILES = c-exp.tab.c m2-exp.tab.c
327*66103SbosticYYOBJ = c-exp.tab.o m2-exp.tab.o
328*66103Sbostic
329*66103Sbostic# Prevent Sun make from putting in the machine type.  Setting
330*66103Sbostic# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
331*66103Sbostic.c.o:
332*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} $<
333*66103Sbostic
334*66103Sbosticall: gdb
335*66103Sbostic	$(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
336*66103Sbosticcheck:
337*66103Sbosticinfo: force
338*66103Sbostic	$(MAKE) subdir_do DO=info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
339*66103Sbosticinstall-info: force
340*66103Sbostic	$(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
341*66103Sbosticclean-info: force
342*66103Sbostic	$(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
343*66103Sbostic
344*66103Sbosticinstall.xgdb: xgdb
345*66103Sbostic	rm -f $(xbindir)/xgdb
346*66103Sbostic	install xgdb $(xbindir)
347*66103Sbostic	install Xgdb.ad $(xlibdir)/app-defaults/Xgdb
348*66103Sbostic
349*66103Sbosticgdb.z:gdb.1
350*66103Sbostic	nroff -man $(srcdir)/gdb.1 | col -b > gdb.t
351*66103Sbostic	pack gdb.t ; rm -f gdb.t
352*66103Sbostic	mv gdb.t.z gdb.z
353*66103Sbostic
354*66103Sbosticinstall: gdb
355*66103Sbostic	install -c gdb /usr/bin
356*66103Sbostic
357*66103Sbosticinit.c: $(srcdir)/munch $(OBS) $(TSOBS)
358*66103Sbostic	$(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
359*66103Sbostic
360*66103Sbosticxinit.c: $(srcdir)/munch $(OBS) $(TSOBS) xgdb.o
361*66103Sbostic	rm -f xinit.c
362*66103Sbostic	./munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) xgdb.o > xinit.c
363*66103Sbostic
364*66103Sbosticxgdb: $(OBS) $(TSOBS) xgdb.o xinit.o ${ADD_DEPS}
365*66103Sbostic	$(CC-LD) $(LDFLAGS) -o xgdb xinit.o xgdb.o \
366*66103Sbostic		$(OBS) $(TSOBS) $(ADD_FILES) $(CLIBS) $(LOADLIBES) \
367*66103Sbostic		-lXaw -lXmu -lXt -lXext -lX11 -lXwchar -lX11
368*66103Sbostic
369*66103Sbosticgdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${CDEPS} init.o
370*66103Sbostic	${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdb \
371*66103Sbostic	  init.o $(OBS) $(TSOBS) $(ADD_FILES) $(CLIBS) $(LOADLIBES)
372*66103Sbostic
373*66103Sbosticsaber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
374*66103Sbostic	#setopt load_flags $(CFLAGS) -I$(BFD_DIR) -DHOST_SYS=SUN4_SYS
375*66103Sbostic	#load ./init.c $(SFILES)
376*66103Sbostic	#unload ${srcdir}/c-exp.y ${srcdir}/m2-exp.y ${srcdir}/vx-share/*.h
377*66103Sbostic	#unload ${srcdir}/nindy-share/[A-Z]*
378*66103Sbostic	#load c-exp.tab.c m2-exp.tab.c
379*66103Sbostic	#load copying.c version.c
380*66103Sbostic	#load ../opcodes/libopcodes.a
381*66103Sbostic	#load ../libiberty/libiberty.a
382*66103Sbostic	#load ../bfd/libbfd.a
383*66103Sbostic	#load ../readline/libreadline.a
384*66103Sbostic	#load ../mmalloc/libmmalloc.a
385*66103Sbostic	#load -ltermcap
386*66103Sbostic	#load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
387*66103Sbostic	echo "Load .c corresponding to:" $(DEPFILES)
388*66103Sbostic
389*66103Sbostic
390*66103Sbostic# This is useful when debugging GDB, because some Unix's don't let you run GDB
391*66103Sbostic# on itself without copying the executable.  So "make gdb1" will make
392*66103Sbostic# gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
393*66103Sbostic# Removing gdb1 before the copy is the right thing if gdb1 is open
394*66103Sbostic# in another process.
395*66103Sbosticgdb1: gdb
396*66103Sbostic	rm -f gdb1
397*66103Sbostic	cp gdb gdb1
398*66103Sbostic
399*66103Sbostic# This is a remote stub which runs under unix and starts up an
400*66103Sbostic# inferior process.  This is at least useful for debugging GDB's
401*66103Sbostic# remote support.
402*66103Sbosticrapp: $(RAPP_OBS)
403*66103Sbostic	rm -f rapp_init.c
404*66103Sbostic	${srcdir}/munch ${MUNCH_DEFINE} ${RAPP_OBS} > rapp_init.c
405*66103Sbostic	${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS)
406*66103Sbostic
407*66103Sbostic# Support for building Makefile out of configured pieces, automatically
408*66103Sbostic# generated dependencies, etc.  alldeps.mak is a file that contains
409*66103Sbostic# "make" variable definitions for all ALLDEPFILES, ALLDEPFILES_MAINDIR,
410*66103Sbostic# ALLDEPFILES_SUBDIR, ALLPARAM, and ALLCONFIG, all cadged from the current
411*66103Sbostic# contents of the config subdirectory.
412*66103Sbostic
413*66103Sbosticalldeps.mak: ${srcdir}/config
414*66103Sbostic	rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp
415*66103Sbostic	for i in `ls -d ${srcdir}/config/*.m[ht]` ; do \
416*66103Sbostic	  echo $$i >>allconfig.tmp; \
417*66103Sbostic	  awk <$$i ' \
418*66103Sbostic	    $$1 == "TDEPFILES=" || $$1 == "XDEPFILES=" \
419*66103Sbostic		|| $$1 == "NATDEPFILES=" { \
420*66103Sbostic	      for (i = 2; i <= NF; i++) \
421*66103Sbostic	        print $$i >> "alldeps.tmp" ; \
422*66103Sbostic            } \
423*66103Sbostic	    $$1 == "TM_FILE=" || $$1 == "XM_FILE=" || $$1 == "NAT_FILE" { \
424*66103Sbostic	      print $$2 >> "allparam.tmp" }' ; \
425*66103Sbostic	done
426*66103Sbostic	sort <alldeps.tmp | uniq | \
427*66103Sbostic	  sed -e 's/arm-convert.o/arm-convert.s/' \
428*66103Sbostic	      -e 's!^Onindy.o!nindy-share/Onindy.c!' \
429*66103Sbostic	      -e 's!^nindy.o!nindy-share/nindy.c!' \
430*66103Sbostic	      -e 's!ttybreak.o!nindy-share/ttybreak.c!' \
431*66103Sbostic	      -e 's!ttyflush.o!nindy-share/ttyflush.c!' \
432*66103Sbostic	      -e 's!xdr_ld.o!vx-share/xdr_ld.c!' \
433*66103Sbostic	      -e 's!xdr_ptrace.o!vx-share/xdr_ptrace.c!' \
434*66103Sbostic	      -e 's!xdr_rdb.o!vx-share/xdr_rdb.c!' \
435*66103Sbostic	      -e 's!xdr_regs.o!vx-share/xdr_regs.c!' \
436*66103Sbostic	      -e 's/\.o/.c/' \
437*66103Sbostic	    >alldeps2.tmp
438*66103Sbostic	echo '# Start of "alldeps.mak" definitions' \
439*66103Sbostic	    >>alldeps.mak;
440*66103Sbostic	echo 'ALLDEPFILES = $$(ALLDEPFILES_MAINDIR) $$(ALLDEPFILES_SUBDIR)' \
441*66103Sbostic	    >>alldeps.mak;
442*66103Sbostic	grep -v / alldeps2.tmp | \
443*66103Sbostic	  awk 'BEGIN {printf "ALLDEPFILES_MAINDIR="} \
444*66103Sbostic	    NR == 0 {printf $$0;} \
445*66103Sbostic	    NR != 0 {printf "\\\n" $$0} \
446*66103Sbostic	    END {printf "\n\n"}' >>alldeps.mak;
447*66103Sbostic	grep / alldeps2.tmp | \
448*66103Sbostic	  awk 'BEGIN {printf "ALLDEPFILES_SUBDIR="} \
449*66103Sbostic	    NR == 0 {printf $$0;} \
450*66103Sbostic	    NR != 0 {printf "\\\n" $$0} \
451*66103Sbostic	    END {printf "\n\n"}' >>alldeps.mak;
452*66103Sbostic	sort <allparam.tmp | uniq | awk 'BEGIN {printf "ALLPARAM="} \
453*66103Sbostic	    NR == 0 {printf $$0;} \
454*66103Sbostic	    NR != 0 {printf "\\\n" $$0} \
455*66103Sbostic	    END {printf "\n\n"}' >>alldeps.mak;
456*66103Sbostic	sort <allconfig.tmp | uniq | awk 'BEGIN {printf "ALLCONFIG="} \
457*66103Sbostic	    NR == 0 {printf $$0;} \
458*66103Sbostic	    NR != 0 {printf "\\\n" $$0} \
459*66103Sbostic	    END {printf "\n\n"}' >>alldeps.mak;
460*66103Sbostic	echo '# End of "alldeps.mak" definitions' \
461*66103Sbostic	    >>alldeps.mak;
462*66103Sbostic	rm -f alldeps.tmp alldeps2.tmp allparam.tmp allconfig.tmp
463*66103Sbostic
464*66103Sbostic# The sed script makes everything which depends on {x,t}m.h depend on
465*66103Sbostic# config.status as well, in case someone reconfigures gdb out from
466*66103Sbostic# under an already compiled gdb.
467*66103Sbosticdepend: $(SOURCES) Makefile.in
468*66103Sbostic	@echo Ignore errors about non-existent system-supplied include files
469*66103Sbostic	@echo for systems other than the one you are using.
470*66103Sbostic	@echo Also ignore parse errors in valops.c, and any errors in
471*66103Sbostic	@echo arm-convert.s.
472*66103Sbostic	touch xm.h tm.h
473*66103Sbostic	-$(GCC) -MM -nostdinc -I/usr/include $(CFLAGS) -I$(BFD_DIR) \
474*66103Sbostic	  -I${READLINE_DIR} $(INCLUDE_CFLAGS) \
475*66103Sbostic	  `ls $(SOURCES) | grep -v '\.[hy]$$' | \
476*66103Sbostic	  sort -u` >depend.tmp
477*66103Sbostic# If running in srcdir, translate "./foo.c" into "$srcdir/foo.c" except
478*66103Sbostic# for xm.h and tm.h.  This allows the same "depend" file to be used
479*66103Sbostic# by the various subdirectories.
480*66103Sbostic	if [ "${srcdir}" = "." ] ; then \
481*66103Sbostic	  <depend.tmp sed \
482*66103Sbostic	    -e 's; ./xm.h; xm.h;g'  \
483*66103Sbostic	    -e 's; ./tm.h; tm.h;g'  \
484*66103Sbostic	    -e 's; \./; $${srcdir}/;g'  \
485*66103Sbostic	    -e 's; vx-share/; $${srcdir}/vx-share/;g'  \
486*66103Sbostic	    -e 's; nindy-share/; $${srcdir}/nindy-share/;g'  \
487*66103Sbostic	    >depend.tm2; \
488*66103Sbostic	  rm depend.tmp; \
489*66103Sbostic	  mv depend.tm2 depend.tmp; \
490*66103Sbostic	fi
491*66103Sbostic	<depend.tmp sed \
492*66103Sbostic	  -e 's; [xt]m.h;& config.status;g'  \
493*66103Sbostic	  -e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g'  \
494*66103Sbostic	  -e 's; $(READLINE_DIR)/; $(READLINE_DEP)/;g'  \
495*66103Sbostic	  -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g'  \
496*66103Sbostic	  -e 's; ./xm.h; xm.h config.status;g'  \
497*66103Sbostic	  -e 's; ./tm.h; tm.h config.status;g'  \
498*66103Sbostic	  >depend
499*66103Sbostic	rm depend.tmp
500*66103Sbostic
501*66103Sbosticconfig.status:
502*66103Sbostic	@echo "You must configure gdb.  Look at the README file for details."
503*66103Sbostic	@false
504*66103Sbostic
505*66103Sbostic# This checks the configure.in file versus the config/ directory.
506*66103Sbosticconfig-check: config-check-hosts config-check-targets
507*66103Sbosticconfig-check-hosts:
508*66103Sbostic	grep gdb_host= ${srcdir}/configure.in | \
509*66103Sbostic		sed -e 's/.*gdb_host=//' -e 's/ ;;$$/.mh/' | sort -u >HOSTconf.o
510*66103Sbostic	(cd ${srcdir}/config; ls *.mh) >HOSTdir.o
511*66103Sbostic	diff -u HOSTconf.o HOSTdir.o
512*66103Sbostic
513*66103Sbosticconfig-check-targets:
514*66103Sbostic	grep gdb_target= ${srcdir}/configure.in | \
515*66103Sbostic		sed -e 's/.*gdb_target=//' -e 's/ ;;$$/.mh/' | sort -u >TARGconf.o
516*66103Sbostic	(cd ${srcdir}/config; ls *.mt) >TARGdir.o
517*66103Sbostic	diff -u HOSTconf.o HOSTdir.o
518*66103Sbostic
519*66103Sbostic# These are not generated by "make depend" because they only are there
520*66103Sbostic# for some machines.
521*66103Sbostic# But these rules don't do what we want; we want to hack the foo.o: tm.h
522*66103Sbostic# dependency to do the right thing.
523*66103Sbostictm-isi.h tm-sun3.h tm-news.h tm-hp300bsd.h tm-altos.h: tm-68k.h
524*66103Sbostictm-hp300hpux.h tm-sun2.h tm-3b1.h: tm-68k.h
525*66103Sbosticxm-news1000.h: xm-news.h
526*66103Sbosticxm-i386-sv32.h: xm-i386.h
527*66103Sbostictm-i386gas.h: tm-i386.h
528*66103Sbosticxm-sun4os4.h: xm-sparc.h
529*66103Sbostictm-sun4os4.h: tm-sparc.h
530*66103Sbosticxm-vaxult.h: xm-vax.h
531*66103Sbosticxm-vaxbsd.h: xm-vax.h
532*66103Sbostic
533*66103Sbostickdb: $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${CDEPS}
534*66103Sbostic	rm -f init.c
535*66103Sbostic	$(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(NTSOBS) > init.c
536*66103Sbostic	$(CC) $(LDFLAGS) -c init.c $(CLIBS)
537*66103Sbostic	ld -o kdb $(NTSSTART) $(OBS) $(NTSOBS) init.o $(ADD_FILES) \
538*66103Sbostic	  -lc $(CLIBS)
539*66103Sbostic
540*66103Sbostic# Put the proper machine-specific files first.
541*66103Sbostic# createtags will edit the .o in DEPFILES into .c
542*66103SbosticTAGS: ${TAGFILES}
543*66103Sbostic	$(srcdir)/createtags $(TM_FILE) ${XM_FILE} ${NAT_FILE} \
544*66103Sbostic			     $(DEPFILES) ${TAGFILES}
545*66103Sbostictags: TAGS
546*66103Sbostic
547*66103Sbostic# Making distributions of GDB and friends.
548*66103Sbostic
549*66103Sbostic# Make a directory `proto-gdb.dir' that contains an image of the GDB
550*66103Sbostic# directory of the distribution, built up with symlinks.
551*66103Sbosticmake-proto-gdb.dir: force_update
552*66103Sbostic	$(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
553*66103Sbostic	$(MAKE) $(MFLAGS) -f Makefile    make-proto-gdb-1
554*66103Sbostic
555*66103Sbostic# Make a tar file containing the GDB directory of the distribution.
556*66103Sbosticgdb.tar.Z: force_update
557*66103Sbostic	$(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
558*66103Sbostic	$(MAKE) $(MFLAGS) -f Makefile.in gdb-$(VERSION).tar.Z
559*66103Sbostic
560*66103Sbostic# Update the "alldeps.mak" file in a source directory.
561*66103Sbosticupdate-alldeps: force_update
562*66103Sbostic	../configure none -norecursion
563*66103Sbostic	rm -f alldeps.mak
564*66103Sbostic	$(MAKE) $(MFLAGS) alldeps.mak
565*66103Sbostic
566*66103Sbostic# Update the "depend" and "alldeps.mak" files in a source directory.
567*66103Sbostic# We update alldeps.mak first, since it is used to generate the list
568*66103Sbostic# of files to be checked for dependencies.
569*66103Sbosticupdate-depend: update-alldeps force_update
570*66103Sbostic	../configure none -norecursion
571*66103Sbostic	rm -f depend
572*66103Sbostic	$(MAKE) $(MFLAGS) depend
573*66103Sbostic
574*66103Sbostic# Set up the GDB source directory for distribution, by building all files that
575*66103Sbostic# are products of other files.
576*66103Sbosticsetup-to-dist: update-depend force_update
577*66103Sbostic	../configure none
578*66103Sbostic	(cd doc; $(MAKE) $(MFLAGS) gdbVN.m4)
579*66103Sbostic	$(MAKE) $(MFLAGS) gdb.info
580*66103Sbostic	$(MAKE) $(MFLAGS) refcard.ps
581*66103Sbostic
582*66103Sbostic# Build a tar file from a proto-gdb.dir.
583*66103Sbosticgdb-$(VERSION).tar.Z: force_update
584*66103Sbostic	rm -f gdb.tar gdb-$(VERSION).tar.Z
585*66103Sbostic	$(MAKE) $(MFLAGS) -f Makefile    make-proto-gdb-1
586*66103Sbostic	ln -s proto-gdb.dir $(DIST)
587*66103Sbostic	tar chf - $(DIST) | compress >gdb-$(VERSION).tar.Z
588*66103Sbostic	rm -rf $(DIST) proto-gdb.dir
589*66103Sbostic
590*66103Sbostic# Build a proto-gdb.dir after GDB has been set up for distribution.
591*66103Sbostic# This stuff must be run in `Makefile', not `Makefile.in`; we use the makefile
592*66103Sbostic# built in the setup-to-dist process, since it defines things like ALLCONFIG
593*66103Sbostic# and ALLDEPFILES, that we need.
594*66103Sbosticmake-proto-gdb-1: ${TARFILES} ${TARDIRS} gdb.info
595*66103Sbostic	rm -rf proto-gdb.dir
596*66103Sbostic	mkdir proto-gdb.dir
597*66103Sbostic	cd proto-gdb.dir ; for i in ${TARFILES} ; do ln -s ../$$i . ; done
598*66103Sbostic	cd proto-gdb.dir ; ln -s ../${INFOFILES} .
599*66103Sbostic	cd proto-gdb.dir ; for i in ${TARDIRS}; do \
600*66103Sbostic	  mkdir $$i; cd $$i; \
601*66103Sbostic	  ln -s ../../$$i/* .; \
602*66103Sbostic	  rm -rf SCCS CVS.adm RCS config.status; \
603*66103Sbostic	  if test -f Makefile.in; then rm Makefile; else true; fi; done
604*66103Sbostic	mkdir proto-gdb.dir/config
605*66103Sbostic	cd proto-gdb.dir/config ; \
606*66103Sbostic	  for i in $(ALLCONFIG) ; do ln -s ../../$$i ../$$i ; done
607*66103Sbostic	mkdir proto-gdb.dir/vx-share proto-gdb.dir/nindy-share
608*66103Sbostic	cd proto-gdb.dir/config ; \
609*66103Sbostic	  for i in $(SFILES_SUBDIR) $(NONSRC_SUBDIR) $(ALLDEPFILES_SUBDIR); \
610*66103Sbostic	    do ln -s ../../$$i ../$$i ; done
611*66103Sbostic	chmod og=u `find . -print`
612*66103Sbostic
613*66103Sbosticclean:
614*66103Sbostic	rm -f *.o ${ADD_FILES} *~
615*66103Sbostic	rm -f init.c version.c
616*66103Sbostic	rm -f gdb core gdb.tar gdb.tar.Z make.log
617*66103Sbostic	rm -f gdb[0-9]
618*66103Sbostic	rm -f xgdb.o xgdb
619*66103Sbostic	@$(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
620*66103Sbostic
621*66103Sbosticdistclean: clean c-exp.tab.c m2-exp.tab.c TAGS
622*66103Sbostic	rm -f tm.h xm.h config.status
623*66103Sbostic	rm -f y.output yacc.acts yacc.tmp
624*66103Sbostic	rm -f ${TESTS} Makefile depend
625*66103Sbostic	@$(MAKE) subdir_do DO=distclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
626*66103Sbostic
627*66103Sbosticrealclean: clean
628*66103Sbostic	rm -f c-exp.tab.c m2-exp.tab.c TAGS
629*66103Sbostic	rm -f tm.h xm.h config.status
630*66103Sbostic	rm -f Makefile depend
631*66103Sbostic	@$(MAKE) subdir_do DO=realclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
632*66103Sbostic
633*66103SbosticSTAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
634*66103Sbostic
635*66103Sbosticsubdir_do: force
636*66103Sbostic	@for i in $(DODIRS); do \
637*66103Sbostic		if [ -d ./$$i ] ; then \
638*66103Sbostic			if (cd ./$$i; \
639*66103Sbostic				$(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
640*66103Sbostic			else exit 1 ; fi ; \
641*66103Sbostic		else true ; fi ; \
642*66103Sbostic	done
643*66103Sbostic
644*66103SbosticMakefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
645*66103Sbostic	$(SHELL) ./config.status
646*66103Sbostic
647*66103Sbosticforce:
648*66103Sbostic
649*66103Sbostic# Documentation!
650*66103Sbostic# GDB QUICK REFERENCE (TeX dvi file, CM fonts)
651*66103Sbosticrefcard.dvi: $(srcdir)/doc/refcard.tex
652*66103Sbostic	( cd ./doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS) )
653*66103Sbostic	mv ./doc/refcard.dvi .
654*66103Sbostic
655*66103Sbostic# GDB QUICK REFERENCE (PostScript output, common PS fonts)
656*66103Sbosticrefcard.ps: $(srcdir)/doc/refcard.tex
657*66103Sbostic	( cd ./doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS) )
658*66103Sbostic	mv ./doc/refcard.ps .
659*66103Sbostic
660*66103Sbostic# GDB MANUAL: TeX dvi file
661*66103Sbosticgdb.dvi: ./doc/gdb-all.texi
662*66103Sbostic	( cd ./doc; $(MAKE) M4=$(M4) gdb.dvi $(FLAGS_TO_PASS) )
663*66103Sbostic	mv ./doc/gdb.dvi .
664*66103Sbostic
665*66103Sbostic# GDB MANUAL: info file
666*66103Sbosticgdb.info: ./doc/gdb-all.texi
667*66103Sbostic	( cd ./doc; $(MAKE) M4=$(M4) gdb.info $(FLAGS_TO_PASS) )
668*66103Sbostic	mv ./doc/gdb.info* .
669*66103Sbostic
670*66103Sbostic./doc/gdb-all.texi:
671*66103Sbostic	(cd ./doc; $(MAKE) M4=$(M4) gdb-all.texi $(FLAGS_TO_PASS) )
672*66103Sbostic
673*66103Sbostic# Make copying.c from COPYING
674*66103Sbosticcopying.c: ${srcdir}/COPYING ${srcdir}/copying.awk
675*66103Sbostic	awk -f ${srcdir}/copying.awk < ${srcdir}/COPYING > copying.c
676*66103Sbostic
677*66103Sbosticversion.c: Makefile
678*66103Sbostic	echo 'char *version = "$(VERSION)";' >version.c
679*66103Sbostic
680*66103Sbostic# c-exp.tab.c is generated in target dir from c-exp.y if it doesn't exist
681*66103Sbostic# in srcdir, then compiled in target dir to c-exp.tab.o.
682*66103Sbostic# Remove bogus decls for malloc/realloc/free which conflict with everything
683*66103Sbostic# else.
684*66103Sbosticc-exp.tab.o: c-exp.tab.c
685*66103Sbosticc-exp.tab.c: $(srcdir)/c-exp.y
686*66103Sbostic	@echo 'Expect 4 shift/reduce conflicts.'
687*66103Sbostic	${YACC} $(srcdir)/c-exp.y
688*66103Sbostic	-sed -e '/extern.*malloc/d' \
689*66103Sbostic	     -e '/extern.*realloc/d' \
690*66103Sbostic	     -e '/extern.*free/d' \
691*66103Sbostic	  < y.tab.c > c-exp.tab.c
692*66103Sbostic	-rm y.tab.c
693*66103Sbostic
694*66103Sbostic# m2-exp.tab.c is generated in target dir from m2-exp.y if it doesn't exist
695*66103Sbostic# in srcdir, then compiled in target dir to m2-exp.tab.o.
696*66103Sbosticm2-exp.tab.o: m2-exp.tab.c
697*66103Sbosticm2-exp.tab.c: $(srcdir)/m2-exp.y
698*66103Sbostic	${YACC} $(srcdir)/m2-exp.y
699*66103Sbostic	-sed -e '/extern.*malloc/d' \
700*66103Sbostic	     -e '/extern.*realloc/d' \
701*66103Sbostic	     -e '/extern.*free/d' \
702*66103Sbostic	  < y.tab.c > m2-exp.tab.c
703*66103Sbostic	-rm y.tab.c
704*66103Sbostic
705*66103Sbosticxgdb.o: defs.h symtab.h frame.h
706*66103Sbostic
707*66103Sbosticmain.o:	${srcdir}/main.c
708*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} -I${READLINE_DIR} $<
709*66103Sbostic
710*66103Sbostic# The symbol-file readers have dependencies on BFD header files.
711*66103Sbosticdbxread.o: ${srcdir}/dbxread.c
712*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
713*66103Sbostic
714*66103Sbosticcoffread.o: ${srcdir}/coffread.c
715*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/coffread.c
716*66103Sbostic
717*66103Sbosticmipsread.o: ${srcdir}/mipsread.c
718*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/mipsread.c
719*66103Sbostic
720*66103Sbosticelfread.o: ${srcdir}/elfread.c
721*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/elfread.c
722*66103Sbostic
723*66103Sbosticdwarfread.o: ${srcdir}/dwarfread.c
724*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dwarfread.c
725*66103Sbostic
726*66103Sbosticstabsread.o: ${srcdir}/stabsread.c
727*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/stabsread.c
728*66103Sbostic
729*66103Sbosticxcoffread.o: ${srcdir}/xcoffread.c
730*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffread.c
731*66103Sbostic
732*66103Sbosticxcoffexec.o: ${srcdir}/xcoffexec.c
733*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffexec.c
734*66103Sbostic
735*66103Sbostic# Drag in the files that are in another directory.
736*66103Sbostic
737*66103Sbosticxdr_ld.o: ${srcdir}/vx-share/xdr_ld.c
738*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_ld.c
739*66103Sbostic
740*66103Sbosticxdr_ptrace.o: ${srcdir}/vx-share/xdr_ptrace.c
741*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_ptrace.c
742*66103Sbostic
743*66103Sbosticxdr_rdb.o: ${srcdir}/vx-share/xdr_rdb.c
744*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_rdb.c
745*66103Sbostic
746*66103Sbosticxdr_regs.o: ${srcdir}/vx-share/xdr_regs.c
747*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_regs.c
748*66103Sbostic
749*66103Sbosticnindy.o: ${srcdir}/nindy-share/nindy.c
750*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} -DSTRIP='"$(tooldir)/bin/strip"' \
751*66103Sbostic		${srcdir}/nindy-share/nindy.c
752*66103Sbostic
753*66103SbosticOnindy.o: ${srcdir}/nindy-share/Onindy.c
754*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/Onindy.c
755*66103Sbostic
756*66103Sbosticttybreak.o: ${srcdir}/nindy-share/ttybreak.c
757*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/ttybreak.c
758*66103Sbostic
759*66103Sbosticttyflush.o: ${srcdir}/nindy-share/ttyflush.c
760*66103Sbostic	${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/ttyflush.c
761*66103Sbostic
762*66103Sbosticlint: $(LINTFILES)
763*66103Sbostic	$(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
764*66103Sbostic	   `echo ${DEPFILES} | sed 's/\.o /\.c /g'
765*66103Sbostic
766*66103Sbosticgdb.cxref: $(SFILES)
767*66103Sbostic	cxref -I. $(SFILES) >gdb.cxref
768*66103Sbostic
769*66103Sbosticforce_update:
770*66103Sbostic
771*66103Sbostic# GNU Make has an annoying habit of putting *all* the Makefile variables
772*66103Sbostic# into the environment, unless you include this target as a circumvention.
773*66103Sbostic# Rumor is that this will be fixed (and this target can be removed)
774*66103Sbostic# in GNU Make 4.0.
775*66103Sbostic.NOEXPORT:
776*66103Sbostic
777*66103Sbostic# This is the end of "Makefile.in".  When built into "Makefile"
778*66103Sbostic# by the configure script, two things are added below this point:
779*66103Sbostic# 	alldeps.mak -- defintions of all files that are used in
780*66103Sbostic#			host- or target-dependent configurations
781*66103Sbostic#	depend -- what .o files depend on what .c and .h files,
782*66103Sbostic#			for all configurations.
783*66103Sbostic
784*66103Sbostic
785