1 ##Copyright (C) 1989-1991 Free Software Foundation, Inc.
3 # This file is part of GDB.
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.
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.
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.
19 # Host and target-dependent makefile fragments come in here.
21 # End of host and target-dependent makefile fragments
23 # Destination directory of the software tree build
26 # Place to install binaries in the destination tree.
27 bindir=$(ddestdir)/bin
29 # System V: If you compile gdb with a compiler which uses the coff
30 # encapsulation feature (this is a function of the compiler used, NOT
31 # of the m-?.h file selected by config.gdb), you must make sure that
32 # the GNU nm is the one that is used by munch.
34 # If you are compiling with GCC, make sure that either 1) You use the
35 # -traditional flag, or 2) You have the fixed include files where GCC
36 # can reach them. Otherwise the ioctl calls in inflow.c
37 # will be incorrectly compiled. The "fixincludes" script in the gcc
38 # distribution will fix your include files up.
43 # Directory containing source files. Don't clean up the spacing,
44 # this exact string is matched for by the "configure" script.
47 # It is also possible that you will need to add -I/usr/include/sys to the
48 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
49 # is where it should be according to Posix).
53 YACC=$(BISON) $(BISONFLAGS)
58 # Documentation (gdb.dvi) needs either GNU m4 or SysV m4;
59 # Berkeley/Sun don't have quite enough.
63 # where to find texinfo; GDB dist should include a recent one
64 TEXIDIR=${srcdir}/../texinfo/fsf
66 # where to find makeinfo, preferably one designed for texinfo-2
69 # Set this up with gcc if you have gnu ld and the loader will print out
70 # line numbers for undefinded refs.
74 # define this to be "gmalloc.o" if you want to use the gnu malloc routine
75 # (useful for debugging memory allocation problems in gdb). To use your
76 # system malloc, uncomment the following two lines.
78 #MALLOC_CFLAGS = -DNO_MALLOC_CHECK
79 GNU_MALLOC = gmalloc.o mcheck.o mtrace.o
82 # Where is the "include" directory? Traditionally ../include or ./include
83 INCLUDE_DIR = ${srcdir}/../include
84 INCLUDE_DEP = $$(INCLUDE_DIR)
86 # Where is the source dir for the BFD library? Traditionally ../bfd or ./bfd
87 # (When we want the binary library built from it, we use ${BFD_DIR}${subdir}.)
88 BFD_DIR = ${srcdir}/../bfd
90 BFD_LIB = $(unsubdir)/../bfd${subdir}/libbfd.a
92 # Where is the source dir for the READLINE library? Traditionally in .. or .
93 # (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
94 READLINE_DIR = ${srcdir}/../readline
95 READLINE_DEP = $$(READLINE_DIR)
96 RL_LIB = $(unsubdir)/../readline${subdir}/libreadline.a
98 # All the includes used for CFLAGS and for lint.
99 # -I. for config files.
100 # -I${srcdir} possibly for regex.h also.
101 INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR) -I$(READLINE_DIR) -I${srcdir}/vx-share
103 # {X,T}M_CFLAGS, if defined, has system-dependent CFLAGS.
106 GLOBAL_CFLAGS = $(MINUS_G) ${TM_CFLAGS} ${XM_CFLAGS}
107 #PROFILE_CFLAGS = -pg
109 CFLAGS = ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MALLOC_CFLAGS} ${INCLUDE_CFLAGS}
110 # None of the things in CFLAGS will do any harm, and on some systems
111 # (e.g. SunOS4) it is important to use the M_CFLAGS.
114 # Where is the "-liberty" library, containing getopt and obstack?
115 LIBIBERTY_DIR = ${srcdir}/../libiberty
116 LIBIBERTY = $(unsubdir)/../libiberty${subdir}/libiberty.a
118 # Flags that describe where you can find the termcap library.
119 # You may need to make other arrangements for USG.
122 # The xconfig file must define REGEX and REGEX1 on USG machines.
123 # If your sysyem is missing alloca(), or, more likely, it's there but
124 # it doesn't work, define ALLOCA & ALLOCA1 too.
125 # If your system is missing putenv(), add putenv.c to XM_ADD_FILES.
127 # Libraries and corresponding dependencies for compiling gdb.
128 # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
129 # TERMCAP comes after readline, since readline depends on it.
130 CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${LIBIBERTY} ${XM_CLIBS} ${TM_CLIBS}
131 CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${LIBIBERTY} ${RL_LIB}
133 ADD_FILES = ${REGEX} ${ALLOCA} ${GNU_MALLOC} ${XM_ADD_FILES} ${TM_ADD_FILES}
134 ADD_DEPS = ${REGEX1} ${ALLOCA1} ${GNU_MALLOC} ${XM_ADD_FILES} ${TM_ADD_FILES}
140 LINTFLAGS= -I${BFD_DIR}
142 # Source files in the main directory.
143 # Files which are included via a tconfig/* or xconfig/* file
144 # should *not* be specified here; they're in "ALLDEPFILES".
146 blockframe.c breakpoint.c command.c core.c \
147 environ.c eval.c expprint.c findvar.c infcmd.c inflow.c infrun.c \
149 remote.c source.c stack.c symmisc.c symtab.c symfile.c \
150 utils.c valarith.c valops.c valprint.c values.c c-exp.y m2-exp.y \
151 signame.c cplus-dem.c mem-break.c target.c inftarg.c \
152 dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c \
153 ieee-float.c language.c parse.c buildsym.c
155 # Source files in subdirectories (which will be handled separately by
157 # Files which are included via a tconfig/* or xconfig/* file
158 # should *not* be specified here; they're in "ALLDEPFILES".
160 ${srcdir}/vx-share/dbgRpcLib.h \
161 ${srcdir}/vx-share/ptrace.h \
162 ${srcdir}/vx-share/reg.h \
163 ${srcdir}/vx-share/vxTypes.h \
164 ${srcdir}/vx-share/vxWorks.h \
165 ${srcdir}/vx-share/wait.h \
166 ${srcdir}/vx-share/xdr_ld.h \
167 ${srcdir}/vx-share/xdr_ptrace.h \
168 ${srcdir}/vx-share/xdr_rdb.h \
169 ${srcdir}/vx-share/xdr_regs.h \
170 ${srcdir}/nindy-share/b.out.h \
171 ${srcdir}/nindy-share/block_io.h \
172 ${srcdir}/nindy-share/coff.h \
173 ${srcdir}/nindy-share/demux.h \
174 ${srcdir}/nindy-share/env.h \
175 ${srcdir}/nindy-share/stop.h \
176 ${srcdir}/nindy-share/ttycntl.h
178 # Non-source files in subdirs, that should go into gdb.tar.Z.
180 ${srcdir}/nindy-share/Makefile \
181 ${srcdir}/nindy-share/VERSION
183 # All source files that go into linking GDB, except config-specified files.
184 SFILES = $(SFILES_MAINDIR) $(SFILES_SUBDIR)
186 # All source files that lint should look at
187 LINTFILES = $(SFILES) $(YYFILES) init.c
189 # Any additional files specified on these lines should also be added to
190 # the OTHERS = definition below, so they go in the tar files.
191 SFILES_STAND = $(SFILES) standalone.c
192 SFILES_KGDB = $(SFILES) stuff.c kdb-start.c
194 # Header files that are not named in tconfig/* or xconfig/* go here.
195 HFILES= breakpoint.h command.h defs.h environ.h \
196 expression.h frame.h gdbcmd.h gdbcore.h getpagesize.h \
197 ieee-float.h inferior.h minimon.h param-no-tm.h param.h \
198 signals.h signame.h symfile.h symtab.h \
199 target.h tdesc.h terminal.h tm-68k.h tm-i960.h tm-sunos.h \
200 language.h parser-defs.h value.h
202 # Header files for machine opcode tables.
203 # when OPCODE_DIR changes to ../include, remove the whole $(OPCODES)
204 # business, since they will be included in the separate includes tar file
205 # rather than in the gdb tar file.
207 OPCODES = $(OPCODE_DIR)pn-opcode.h $(OPCODE_DIR)np1-opcode.h \
208 $(OPCODE_DIR)sparc-opcode.h $(OPCODE_DIR)vax-opcode.h \
209 $(OPCODE_DIR)m68k-opcode.h $(OPCODE_DIR)ns32k-opcode.h \
210 $(OPCODE_DIR)convx-opcode.h $(OPCODE_DIR)pyr-opcode.h \
211 $(OPCODE_DIR)mips-opcode.h $(OPCODE_DIR)am29k-opcode.h \
212 $(OPCODE_DIR)arm-opcode.h $(OPCODE_DIR)m88k-opcode.h \
213 $(OPCODE_DIR)tahoe-opcode.h
215 REMOTE_EXAMPLES = m68k-stub.c i386-stub.c rem-multi.shar
217 MALLOCSRC = gmalloc.c mcheck.c mtrace.c mtrace.awk \
220 POSSLIBS_MAINDIR = regex.c regex.h alloca.c $(MALLOCSRC)
221 POSSLIBS = $(POSSLIBS_MAINDIR)
223 TESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c
225 # tdesc-lib cannot be named simply tdesc, because if it were, GNU make
226 # would try to make it from tdesc.c.
227 OTHERS = Makefile.in depend alldeps.mak createtags munch configure.in \
228 ChangeLog ChangeLog-3.x refcard.ps \
229 README TODO TAGS WHATS.NEW Projects \
230 .gdbinit COPYING $(YYFILES) \
231 copying.c Convex.notes copying.awk \
232 saber.suppress standalone.c stuff.c tdesc-lib kdb-start.c \
235 # Subdirectories of gdb, which should be included in their entirety in
237 TARDIRS = doc # tests
239 # GDB "info" files, which should be included in their entirety
240 INFOFILES = gdb.info*
242 DEPFILES= ${TDEPFILES} ${XDEPFILES}
244 SOURCES=$(SFILES) $(ALLDEPFILES) $(YYFILES)
245 TAGFILES = $(SOURCES) ${HFILES} ${OPCODES} ${ALLPARAM} ${POSSLIBS}
246 TAGFILES_MAINDIR = $(SFILES_MAINDIR) $(ALLDEPFILES_MAINDIR) \
247 ${HFILES} ${OPCODES} ${ALLPARAM} ${POSSLIBS_MAINDIR}
248 TARFILES = ${TAGFILES_MAINDIR} ${OTHERS} ${REMOTE_EXAMPLES}
250 OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
251 values.o eval.o valops.o valarith.o valprint.o printcmd.o \
252 symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \
253 command.o utils.o expprint.o environ.o version.o \
254 copying.o $(DEPFILES) signame.o cplus-dem.o mem-break.o target.o \
255 inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \
257 dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o # mipsread.o
259 RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
261 TSOBS = core.o inflow.o
263 NTSOBS = standalone.o
265 TSSTART = /lib/crt0.o
267 NTSSTART = kdb-start.o
271 # For now, shortcut the "configure GDB for fewer languages" stuff.
272 YYFILES = c-exp.tab.c m2-exp.tab.c
273 YYOBJ = c-exp.tab.o m2-exp.tab.o
275 # Prevent Sun make from putting in the machine type. Setting
276 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
278 ${CC} -c ${CFLAGS} $<
281 $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)"
283 $(MAKE) subdir_do DO=all-info "DODIRS=$(SUBDIRS)"
285 $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)"
288 nroff -man gdb.1 | col -b > gdb.t
289 pack gdb.t ; rm -f gdb.t
293 cp gdb $(bindir)/gdb.new
294 mv $(bindir)/gdb.new $(bindir)/gdb
296 $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)"
298 init.c: $(srcdir)/munch $(OBS) $(TSOBS)
299 $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
301 gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${CDEPS} init.o
302 ${CC-LD} $(LDFLAGS) -o gdb init.o $(OBS) $(TSOBS) $(ADD_FILES) \
303 $(CLIBS) $(LOADLIBES)
305 saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
306 #setopt load_flags $(CFLAGS) -I$(BFD_DIR) -DHOST_SYS=SUN4_SYS
307 #load ./init.c $(SFILES)
308 #unload ${srcdir}/c-exp.y ${srcdir}/m2-exp.y ${srcdir}/vx-share/*.h
309 #unload ${srcdir}/nindy-share/[A-Z]*
310 #load c-exp.tab.c m2-exp.tab.c
311 #load copying.c version.c
312 #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
313 #load ${LIBIBERTY_DIR}/*.c
315 #load ${READLINE_DIR}/*.c
317 ##void mcheck(a) void (*a)(); { }
322 # This is useful when debugging GDB, because some Unix's don't let you run GDB
323 # on itself without copying the executable. So "make gdb1" will make
324 # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
325 # Removing gdb1 before the copy is the right thing if gdb1 is open
326 # in another process.
331 # This is a remote stub which runs under unix and starts up an
332 # inferior process. This is at least useful for debugging GDB's
336 ${srcdir}/munch ${MUNCH_DEFINE} ${RAPP_OBS} > rapp_init.c
337 ${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS)
339 # Support for building Makefile out of configured pieces, automatically
340 # generated dependencies, etc. alldeps.mak is a file that contains
341 # "make" variable definitions for all ALLDEPFILES, ALLDEPFILES_MAINDIR,
342 # ALLDEPFILES_SUBDIR, ALLPARAM, and ALLCONFIG, all cadged from the current
343 # contents of the xconfig and tconfig subdirectories.
345 alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig
346 rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp
347 for i in `ls -d ${srcdir}/tconfig/*[0-9A-Za-z] \
348 ${srcdir}/xconfig/*[0-9A-Za-z] | \
349 grep -v RCS | grep -v CVS.adm | grep -v SCCS` ; do \
350 echo $$i >>allconfig.tmp; \
352 $$1 == "TDEPFILES=" || $$1 == "XDEPFILES=" { \
353 for (i = 2; i <= NF; i++) \
354 print $$i >> "alldeps.tmp" ; \
356 $$1 == "TM_FILE=" || $$1 == "XM_FILE=" { \
357 print $$2 >> "allparam.tmp" }' ; \
359 sort <alldeps.tmp | uniq | \
360 sed -e 's/arm-convert.o/arm-convert.s/' \
361 -e 's!^Onindy.o!nindy-share/Onindy.c!' \
362 -e 's!^nindy.o!nindy-share/nindy.c!' \
363 -e 's!ttybreak.o!nindy-share/ttybreak.c!' \
364 -e 's!ttyflush.o!nindy-share/ttyflush.c!' \
365 -e 's!xdr_ld.o!vx-share/xdr_ld.c!' \
366 -e 's!xdr_ptrace.o!vx-share/xdr_ptrace.c!' \
367 -e 's!xdr_rdb.o!vx-share/xdr_rdb.c!' \
368 -e 's!xdr_regs.o!vx-share/xdr_regs.c!' \
371 echo '# Start of "alldeps.mak" definitions' \
373 echo 'ALLDEPFILES = $$(ALLDEPFILES_MAINDIR) $$(ALLDEPFILES_SUBDIR)' \
375 grep -v / alldeps2.tmp | \
376 awk 'BEGIN {printf "ALLDEPFILES_MAINDIR="} \
377 NR == 0 {printf $$0;} \
378 NR != 0 {printf "\\\n" $$0} \
379 END {printf "\n\n"}' >>alldeps.mak;
380 grep / alldeps2.tmp | \
381 awk 'BEGIN {printf "ALLDEPFILES_SUBDIR="} \
382 NR == 0 {printf $$0;} \
383 NR != 0 {printf "\\\n" $$0} \
384 END {printf "\n\n"}' >>alldeps.mak;
385 sort <allparam.tmp | uniq | awk 'BEGIN {printf "ALLPARAM="} \
386 NR == 0 {printf $$0;} \
387 NR != 0 {printf "\\\n" $$0} \
388 END {printf "\n\n"}' >>alldeps.mak;
389 sort <allconfig.tmp | uniq | awk 'BEGIN {printf "ALLCONFIG="} \
390 NR == 0 {printf $$0;} \
391 NR != 0 {printf "\\\n" $$0} \
392 END {printf "\n\n"}' >>alldeps.mak;
393 echo '# End of "alldeps.mak" definitions' \
395 rm -f alldeps.tmp alldeps2.tmp allparam.tmp allconfig.tmp
397 # The sed script makes everything which depends on {x,t}m.h depend on
398 # config.status as well, in case someone reconfigures gdb out from
399 # under an already compiled gdb.
400 depend: $(SOURCES) Makefile.in
401 @echo Ignore errors about non-existent system-supplied include files
402 @echo for systems other than the one you are using.
403 @echo "If xm.h and tm.h don't exist, the error messages saying so"
404 @echo can safely be ignored.
405 @echo Also ignore parse errors in valops.c, and any errors in
407 -$(GCC) -MM $(CFLAGS) -I$(BFD_DIR) \
408 `ls $(SOURCES) | grep -v '\.[hy]$$' |sort -u` >depend.tmp
409 # If running in srcdir, translate "./foo.c" into "$srcdir/foo.c" except
410 # for xm.h and tm.h. This allows the same "depend" file to be used
411 # by the various subdirectories.
412 if [ "${srcdir}" = "." ] ; then \
414 -e 's; ./xm.h; xm.h;g' \
415 -e 's; ./tm.h; tm.h;g' \
416 -e 's; \./; $${srcdir}/;g' \
417 -e 's; vx-share/; $${srcdir}/vx-share/;g' \
418 -e 's; nindy-share/; $${srcdir}/nindy-share/;g' \
421 mv depend.tm2 depend.tmp; \
424 -e 's; [xt]m.h;& config.status;g' \
425 -e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g' \
426 -e 's; $(READLINE_DIR)/; $(READLINE_DEP)/;g' \
427 -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g' \
428 -e 's; ./xm.h; xm.h config.status;g' \
429 -e 's; ./tm.h; tm.h config.status;g' \
434 @echo "You must configure gdb. Look at the README file for details."
437 # These are not generated by "make depend" because they only are there
439 # But these rules don't do what we want; we want to hack the foo.o: tm.h
440 # dependency to do the right thing.
441 tm-isi.h tm-sun3.h tm-news.h tm-hp300bsd.h tm-altos.h : tm-68k.h
442 tm-hp300hpux.h tm-sun2.h tm-3b1.h : tm-68k.h
443 xm-news1000.h : xm-news.h
444 xm-i386-sv32.h : xm-i386.h
445 tm-i386gas.h: tm-i386.h
446 xm-sun4os4.h : xm-sparc.h
447 tm-sun4os4.h : tm-sparc.h
449 kdb : $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${CDEPS}
451 $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(NTSOBS) > init.c
452 $(CC) $(LDFLAGS) -c init.c $(CLIBS)
453 ld -o kdb $(NTSSTART) $(OBS) $(NTSOBS) init.o $(ADD_FILES) \
456 # Put the proper machine-specific files first.
457 # createtags will edit the .o in DEPFILES into .c
459 $(srcdir)/createtags $(TM_FILE) ${XM_FILE} $(DEPFILES) ${TAGFILES}
462 # Making distributions of GDB and friends.
464 # Make a directory `proto-gdb.dir' that contains an image of the GDB
465 # directory of the distribution, built up with symlinks.
466 make-proto-gdb.dir: force_update
467 $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
468 $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1
470 # Make a tar file containing the GDB directory of the distribution.
471 gdb.tar.Z: force_update
472 $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
473 $(MAKE) $(MFLAGS) -f Makefile.in gdb-$(VERSION).tar.Z
475 # Set up the GDB directory for distribution, by building all files that
476 # are products of other files.
477 setup-to-dist: force_update
480 $(MAKE) $(MFLAGS) alldeps.mak
483 $(MAKE) $(MFLAGS) depend
485 (cd doc; $(MAKE) $(MFLAGS) rdl-apps.texi gdbVN.m4)
486 $(MAKE) $(MFLAGS) gdb.info
487 $(MAKE) $(MFLAGS) refcard.ps
489 # Build a tar file from a proto-gdb.dir.
490 gdb-$(VERSION).tar.Z: force_update
491 rm -f gdb.tar gdb-$(VERSION).tar.Z
492 $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1
493 ln -s proto-gdb.dir $(DIST)
494 tar chf - $(DIST) | compress >gdb-$(VERSION).tar.Z
495 rm -rf $(DIST) proto-gdb.dir
497 # Build a proto-gdb.dir after GDB has been set up for distribution.
498 # This stuff must be run in `Makefile', not `Makefile.in`; we use the makefile
499 # built in the setup-to-dist process, since it defines things like ALLCONFIG
500 # and ALLDEPFILES, that we need.
501 make-proto-gdb-1: ${TARFILES} ${TARDIRS} gdb.info
504 cd proto-gdb.dir ; for i in ${TARFILES} ; do ln -s ../$$i . ; done
505 cd proto-gdb.dir ; ln -s ../${INFOFILES} .
506 cd proto-gdb.dir ; for i in ${TARDIRS}; do \
507 (mkdir $$i; cd $$i; \
508 ln -s ../../$$i/* .; \
509 rm -rf SCCS CVS.adm RCS); done
510 mkdir proto-gdb.dir/xconfig proto-gdb.dir/tconfig
511 cd proto-gdb.dir/tconfig ; \
512 for i in $(ALLCONFIG) ; do ln -s ../../$$i ../$$i ; done
513 mkdir proto-gdb.dir/vx-share proto-gdb.dir/nindy-share
514 cd proto-gdb.dir/tconfig ; \
515 for i in $(SFILES_SUBDIR) $(NONSRC_SUBDIR) $(ALLDEPFILES_SUBDIR); \
516 do ln -s ../../$$i ../$$i ; done
517 chmod og=u `find . -print`
520 rm -f ${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES}
521 rm -f init.c init.o version.c
522 rm -f gdb core gdb.tar gdb.tar.Z make.log
524 $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)"
526 distclean: clean c-exp.tab.c m2-exp.tab.c TAGS
527 rm -f tm.h xm.h config.status
528 rm -f y.output yacc.acts yacc.tmp
529 rm -f ${TESTS} Makefile depend
530 $(MAKE) subdir_do DO=distclean "DODIRS=$(SUBDIRS)"
533 rm -f c-exp.tab.c m2-exp.tab.c TAGS
534 rm -f tm.h xm.h config.status
535 rm -f Makefile depend
536 $(MAKE) subdir_do DO=realclean "DODIRS=$(SUBDIRS)"
538 STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
541 for i in $(DODIRS); do \
542 if [ -d $(unsubdir)/$$i ] ; then \
543 if (cd $(unsubdir)/$$i$(subdir); \
545 "against=$(against)" \
548 "AR_FLAGS=$(AR_FLAGS)" \
550 "BISON=$(BISON)" $(DO)) ; then true ; \
555 # Copy the object files from a particular stage into a subdirectory.
558 -mv -f $(STAGESTUFF) stage1
559 $(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)"
563 -mv -f $(STAGESTUFF) stage2
564 $(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)"
568 -mv -f $(STAGESTUFF) stage3
569 $(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)"
574 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
575 $(MAKE) subdir_do DO=comparison "DODIRS=$(SUBDIRS)"
578 - (cd stage1 ; mv -f * ..)
580 $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)"
583 - (cd stage2 ; mv -f * ..)
585 $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)"
588 - (cd stage3 ; mv -f * ..)
590 $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)"
592 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
593 $(SHELL) ./config.status
598 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
599 refcard.dvi : $(srcdir)/doc/refcard.tex
600 ( cd $(srcdir)/doc; $(MAKE) refcard.dvi )
601 mv $(srcdir)/doc/refcard.dvi .
603 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
604 refcard.ps : $(srcdir)/doc/refcard.tex
605 ( cd $(srcdir)/doc; $(MAKE) refcard.ps )
606 mv $(srcdir)/doc/refcard.ps .
608 # GDB MANUAL: TeX dvi file
609 gdb.dvi : $(srcdir)/doc/gdb-all.texi $(srcdir)/doc/rdl-apps.texi
610 ( cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb.dvi )
611 mv $(srcdir)/doc/gdb.dvi .
613 # GDB MANUAL: info file
614 gdb.info: $(srcdir)/doc/gdb-all.texi
615 ( cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb.info )
616 mv $(srcdir)/doc/gdb.info* .
618 $(srcdir)/doc/gdb-all.texi:
619 (cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb-all.texi)
620 $(srcdir)/doc/rdl-apps.texi:
621 (cd $(srcdir)/doc; $(MAKE) rdl-apps.texi)
623 # Make copying.c from COPYING
624 copying.c: ${srcdir}/COPYING ${srcdir}/copying.awk
625 awk -f ${srcdir}/copying.awk < ${srcdir}/COPYING > copying.c
627 version.c : Makefile.in
628 echo 'char *version = "$(VERSION)";' >version.c
630 # c-exp.tab.c is generated in target dir from c-exp.y if it doesn't exist
631 # in srcdir, then compiled in target dir to c-exp.tab.o.
632 c-exp.tab.o: c-exp.tab.c
633 c-exp.tab.c: $(srcdir)/c-exp.y
634 @echo 'Expect 4 shift/reduce conflicts.'
635 ${YACC} $(srcdir)/c-exp.y
636 - mv y.tab.c c-exp.tab.c
638 # m2-exp.tab.c is generated in target dir from m2-exp.y if it doesn't exist
639 # in srcdir, then compiled in target dir to m2-exp.tab.o.
640 m2-exp.tab.o: m2-exp.tab.c
641 m2-exp.tab.c: $(srcdir)/m2-exp.y
642 ${YACC} $(srcdir)/m2-exp.y
643 - mv y.tab.c m2-exp.tab.c
645 # The symbol-file readers have dependencies on BFD header files.
646 dbxread.o: ${srcdir}/dbxread.c
647 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
649 coffread.o: ${srcdir}/coffread.c
650 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/coffread.c
652 mipsread.o: ${srcdir}/mipsread.c
653 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/mipsread.c
655 elfread.o: ${srcdir}/elfread.c
656 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/elfread.c
658 xcoffread.o: ${srcdir}/xcoffread.c
659 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffread.c
661 xcoffexec.o: ${srcdir}/xcoffexec.c
662 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffexec.c
664 # Drag in the files that are in another directory.
666 xdr_ld.o: ${srcdir}/vx-share/xdr_ld.c
667 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ld.c
669 xdr_ptrace.o: ${srcdir}/vx-share/xdr_ptrace.c
670 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ptrace.c
672 xdr_rdb.o: ${srcdir}/vx-share/xdr_rdb.c
673 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_rdb.c
675 xdr_regs.o: ${srcdir}/vx-share/xdr_regs.c
676 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_regs.c
678 nindy.o: ${srcdir}/nindy-share/nindy.c
679 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/nindy.c
681 Onindy.o: ${srcdir}/nindy-share/Onindy.c
682 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/Onindy.c
684 ttybreak.o: ${srcdir}/nindy-share/ttybreak.c
685 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttybreak.c
687 ttyflush.o: ${srcdir}/nindy-share/ttyflush.c
688 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttyflush.c
690 disasm.o: $(srcdir)/tdesc-lib/disasm.c
691 $(CC) -c $(CFLAGS) $(srcdir)/tdesc-lib/disasm.c
693 classify.o: $(srcdir)/tdesc-lib/classify.c
694 $(CC) -c $(CFLAGS) $(srcdir)/tdesc-lib/classify.c
696 fcns.o: $(srcdir)/tdesc-lib/fcns.c
697 $(CC) -c $(CFLAGS) $(srcdir)/tdesc-lib/fcns.c
699 table.o: $(TABHDRS) $(srcdir)/tdesc-lib/table.c
700 $(CC) -c $(CFLAGS) $(srcdir)/tdesc-lib/table.c
703 $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
704 `echo ${DEPFILES} | sed 's/\.o /\.c /g'
707 cxref -I. $(SFILES) >gdb.cxref
711 # When used with GDB, the demangler should never look for leading
712 # underscores because GDB strips them off during symbol read-in. Thus
715 cplus-dem.o : cplus-dem.c
716 ${CC} -c ${CFLAGS} -Dnounderscore \
717 `echo ${srcdir}/cplus-dem.c | sed 's,^\./,,'`
719 # GNU Make has an annoying habit of putting *all* the Makefile variables
720 # into the environment, unless you include this target as a circumvention.
721 # Rumor is that this will be fixed (and this target can be removed)
725 # This is the end of "Makefile.in". When built into "Makefile"
726 # by the configure script, two things are added below this point:
727 # alldeps.mak -- defintions of all files that are used in
728 # host- or target-dependent configurations
729 # depend -- what .o files depend on what .c and .h files,
730 # for all configurations.