Roll VERSION to 4.2.90.
[deliverable/binutils-gdb.git] / gdb / Makefile.in
1 ##Copyright (C) 1989-1991 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
19 # Host and target-dependent makefile fragments come in here.
20 ####
21 # End of host and target-dependent makefile fragments
22
23 # Destination directory of the software tree build
24 ddestdir = /usr/local
25
26 # Place to install binaries in the destination tree.
27 bindir=$(ddestdir)/bin
28
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.
33
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.
39 #CC=cc
40 #CC=gcc -traditional
41 GCC=gcc
42
43 # Directory containing source files. Don't clean up the spacing,
44 # this exact string is matched for by the "configure" script.
45 srcdir = .
46
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).
50
51 BISON=bison -y
52 BISONFLAGS=
53 YACC=$(BISON) $(BISONFLAGS)
54 # YACC=yacc
55 SHELL=/bin/sh
56 MAKE=make
57
58 # Documentation (gdb.dvi) needs either GNU m4 or SysV m4;
59 # Berkeley/Sun don't have quite enough.
60 #M4=/usr/5bin/m4
61 M4=gm4
62
63 # where to find texinfo; GDB dist should include a recent one
64 TEXIDIR=${srcdir}/../texinfo/fsf
65
66 # where to find makeinfo, preferably one designed for texinfo-2
67 MAKEINFO=makeinfo
68
69 # Set this up with gcc if you have gnu ld and the loader will print out
70 # line numbers for undefinded refs.
71 #CC-LD=gcc -static
72 CC-LD=${CC}
73
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.
77 #GNU_MALLOC =
78 #MALLOC_CFLAGS = -DNO_MALLOC_CHECK
79 GNU_MALLOC = gmalloc.o mcheck.o mtrace.o
80 MALLOC_CFLAGS =
81
82 # Where is the "include" directory? Traditionally ../include or ./include
83 INCLUDE_DIR = ${srcdir}/../include
84 INCLUDE_DEP = $$(INCLUDE_DIR)
85
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
89 BFD_DEP = $$(BFD_DIR)
90 BFD_LIB = $(unsubdir)/../bfd${subdir}/libbfd.a
91
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
97
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
102
103 # {X,T}M_CFLAGS, if defined, has system-dependent CFLAGS.
104 # CFLAGS for GDB
105 MINUS_G=-g
106 GLOBAL_CFLAGS = ${MINUS_G} ${TM_CFLAGS} ${XM_CFLAGS}
107 #PROFILE_CFLAGS = -pg
108
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.
112 LDFLAGS = $(CFLAGS)
113
114 # Where is the "-liberty" library, containing getopt and obstack?
115 LIBIBERTY_DIR = ${srcdir}/../libiberty
116 LIBIBERTY = $(unsubdir)/../libiberty${subdir}/libiberty.a
117
118 # Flags that describe where you can find the termcap library.
119 # You may need to make other arrangements for USG.
120 TERMCAP = -ltermcap
121
122 # The config/mh-* 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.
126
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}
132
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}
135
136 VERSION = 4.2.90
137 DIST=gdb
138
139 LINT=/usr/5bin/lint
140 LINTFLAGS= -I${BFD_DIR}
141
142 # Source files in the main directory.
143 # Files which are included via a config/* Makefile fragment
144 # should *not* be specified here; they're in "ALLDEPFILES".
145 SFILES_MAINDIR = \
146 blockframe.c breakpoint.c command.c core.c \
147 environ.c eval.c expprint.c findvar.c infcmd.c inflow.c infrun.c \
148 main.c printcmd.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
154
155 # Source files in subdirectories (which will be handled separately by
156 # 'make gdb.tar.Z').
157 # Files which are included via a config/* Makefile fragment
158 # should *not* be specified here; they're in "ALLDEPFILES".
159 SFILES_SUBDIR = \
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
177
178 # Non-source files in subdirs, that should go into gdb.tar.Z.
179 NONSRC_SUBDIR = \
180 ${srcdir}/nindy-share/Makefile \
181 ${srcdir}/nindy-share/VERSION
182
183 # All source files that go into linking GDB, except config-specified files.
184 SFILES = $(SFILES_MAINDIR) $(SFILES_SUBDIR)
185
186 # All source files that lint should look at
187 LINTFILES = $(SFILES) $(YYFILES) init.c
188
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
193
194 # Header files that are not named in config/* Makefile fragments go here.
195 HFILES= breakpoint.h command.h defs.h environ.h \
196 expression.h frame.h gdbcmd.h gdbcore.h \
197 ieee-float.h inferior.h minimon.h \
198 signals.h signame.h symfile.h symtab.h \
199 target.h terminal.h tm-68k.h tm-i960.h tm-sunos.h \
200 language.h parser-defs.h value.h
201
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.
206 OPCODE_DIR =
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
214
215 REMOTE_EXAMPLES = m68k-stub.c i386-stub.c rem-multi.shar
216
217 MALLOCSRC = gmalloc.c mcheck.c mtrace.c mtrace.awk \
218 ansidecl.h gmalloc.h
219
220 POSSLIBS_MAINDIR = regex.c regex.h alloca.c $(MALLOCSRC)
221 POSSLIBS = $(POSSLIBS_MAINDIR)
222
223 TESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c
224
225 OTHERS = Makefile.in depend alldeps.mak createtags munch configure.in \
226 ChangeLog ChangeLog-3.x refcard.ps \
227 README TODO TAGS WHATS.NEW Projects \
228 .gdbinit COPYING $(YYFILES) \
229 copying.c Convex.notes copying.awk \
230 saber.suppress standalone.c stuff.c kdb-start.c \
231 putenv.c
232
233 # Subdirectories of gdb, which should be included in their entirety in
234 # gdb-xxx.tar.Z:
235 TARDIRS = doc # tests
236
237 # GDB "info" files, which should be included in their entirety
238 INFOFILES = gdb.info*
239
240 DEPFILES= ${TDEPFILES} ${XDEPFILES}
241
242 SOURCES=$(SFILES) $(ALLDEPFILES) $(YYFILES)
243 TAGFILES = $(SOURCES) ${HFILES} ${OPCODES} ${ALLPARAM} ${POSSLIBS}
244 TAGFILES_MAINDIR = $(SFILES_MAINDIR) $(ALLDEPFILES_MAINDIR) \
245 ${HFILES} ${OPCODES} ${ALLPARAM} ${POSSLIBS_MAINDIR}
246 TARFILES = ${TAGFILES_MAINDIR} ${OTHERS} ${REMOTE_EXAMPLES}
247
248 OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
249 values.o eval.o valops.o valarith.o valprint.o printcmd.o \
250 symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \
251 command.o utils.o expprint.o environ.o version.o \
252 copying.o $(DEPFILES) signame.o cplus-dem.o mem-break.o target.o \
253 inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \
254 buildsym.o \
255 dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o # mipsread.o
256
257 RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
258
259 TSOBS = core.o inflow.o
260
261 NTSOBS = standalone.o
262
263 TSSTART = /lib/crt0.o
264
265 NTSSTART = kdb-start.o
266
267 SUBDIRS = doc
268
269 # For now, shortcut the "configure GDB for fewer languages" stuff.
270 YYFILES = c-exp.tab.c m2-exp.tab.c
271 YYOBJ = c-exp.tab.o m2-exp.tab.o
272
273 # Prevent Sun make from putting in the machine type. Setting
274 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
275 .c.o:
276 ${CC} -c ${CFLAGS} $<
277
278 all: gdb
279 $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)"
280 all-info: force
281 $(MAKE) subdir_do DO=all-info "DODIRS=$(SUBDIRS)"
282 install-info: force
283 $(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)"
284
285 gdb.z:gdb.1
286 nroff -man gdb.1 | col -b > gdb.t
287 pack gdb.t ; rm -f gdb.t
288 mv gdb.t.z gdb.z
289
290 install: gdb gdb.z
291 cp gdb $(bindir)/gdb.new
292 mv $(bindir)/gdb.new $(bindir)/gdb
293 $(M_INSTALL)
294 $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)"
295
296 init.c: $(srcdir)/munch $(OBS) $(TSOBS)
297 $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
298
299 gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${CDEPS} init.o
300 ${CC-LD} $(LDFLAGS) -o gdb init.o $(OBS) $(TSOBS) $(ADD_FILES) \
301 $(CLIBS) $(LOADLIBES)
302
303 saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
304 #setopt load_flags $(CFLAGS) -I$(BFD_DIR) -DHOST_SYS=SUN4_SYS
305 #load ./init.c $(SFILES)
306 #unload ${srcdir}/c-exp.y ${srcdir}/m2-exp.y ${srcdir}/vx-share/*.h
307 #unload ${srcdir}/nindy-share/[A-Z]*
308 #load c-exp.tab.c m2-exp.tab.c
309 #load copying.c version.c
310 #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
311 #load ${LIBIBERTY_DIR}/*.c
312 #load ${BFD_DIR}/*.c
313 #load ${READLINE_DIR}/*.c
314 #load -ltermcap
315 ##void mcheck(a) void (*a)(); { }
316 ##void mtrace() { }
317
318
319
320 # This is useful when debugging GDB, because some Unix's don't let you run GDB
321 # on itself without copying the executable. So "make gdb1" will make
322 # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
323 # Removing gdb1 before the copy is the right thing if gdb1 is open
324 # in another process.
325 gdb1: gdb
326 rm -f gdb1
327 cp gdb gdb1
328
329 # This is a remote stub which runs under unix and starts up an
330 # inferior process. This is at least useful for debugging GDB's
331 # remote support.
332 rapp: $(RAPP_OBS)
333 rm -f rapp_init.c
334 ${srcdir}/munch ${MUNCH_DEFINE} ${RAPP_OBS} > rapp_init.c
335 ${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS)
336
337 # Support for building Makefile out of configured pieces, automatically
338 # generated dependencies, etc. alldeps.mak is a file that contains
339 # "make" variable definitions for all ALLDEPFILES, ALLDEPFILES_MAINDIR,
340 # ALLDEPFILES_SUBDIR, ALLPARAM, and ALLCONFIG, all cadged from the current
341 # contents of the config subdirectory.
342
343 alldeps.mak: ${srcdir}/config
344 rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp
345 for i in `ls -d ${srcdir}/config/m[ht]-*` ; do \
346 echo $$i >>allconfig.tmp; \
347 awk <$$i ' \
348 $$1 == "TDEPFILES=" || $$1 == "XDEPFILES=" { \
349 for (i = 2; i <= NF; i++) \
350 print $$i >> "alldeps.tmp" ; \
351 } \
352 $$1 == "TM_FILE=" || $$1 == "XM_FILE=" { \
353 print $$2 >> "allparam.tmp" }' ; \
354 done
355 sort <alldeps.tmp | uniq | \
356 sed -e 's/arm-convert.o/arm-convert.s/' \
357 -e 's!^Onindy.o!nindy-share/Onindy.c!' \
358 -e 's!^nindy.o!nindy-share/nindy.c!' \
359 -e 's!ttybreak.o!nindy-share/ttybreak.c!' \
360 -e 's!ttyflush.o!nindy-share/ttyflush.c!' \
361 -e 's!xdr_ld.o!vx-share/xdr_ld.c!' \
362 -e 's!xdr_ptrace.o!vx-share/xdr_ptrace.c!' \
363 -e 's!xdr_rdb.o!vx-share/xdr_rdb.c!' \
364 -e 's!xdr_regs.o!vx-share/xdr_regs.c!' \
365 -e 's/\.o/.c/' \
366 >alldeps2.tmp
367 echo '# Start of "alldeps.mak" definitions' \
368 >>alldeps.mak;
369 echo 'ALLDEPFILES = $$(ALLDEPFILES_MAINDIR) $$(ALLDEPFILES_SUBDIR)' \
370 >>alldeps.mak;
371 grep -v / alldeps2.tmp | \
372 awk 'BEGIN {printf "ALLDEPFILES_MAINDIR="} \
373 NR == 0 {printf $$0;} \
374 NR != 0 {printf "\\\n" $$0} \
375 END {printf "\n\n"}' >>alldeps.mak;
376 grep / alldeps2.tmp | \
377 awk 'BEGIN {printf "ALLDEPFILES_SUBDIR="} \
378 NR == 0 {printf $$0;} \
379 NR != 0 {printf "\\\n" $$0} \
380 END {printf "\n\n"}' >>alldeps.mak;
381 sort <allparam.tmp | uniq | awk 'BEGIN {printf "ALLPARAM="} \
382 NR == 0 {printf $$0;} \
383 NR != 0 {printf "\\\n" $$0} \
384 END {printf "\n\n"}' >>alldeps.mak;
385 sort <allconfig.tmp | uniq | awk 'BEGIN {printf "ALLCONFIG="} \
386 NR == 0 {printf $$0;} \
387 NR != 0 {printf "\\\n" $$0} \
388 END {printf "\n\n"}' >>alldeps.mak;
389 echo '# End of "alldeps.mak" definitions' \
390 >>alldeps.mak;
391 rm -f alldeps.tmp alldeps2.tmp allparam.tmp allconfig.tmp
392
393 # The sed script makes everything which depends on {x,t}m.h depend on
394 # config.status as well, in case someone reconfigures gdb out from
395 # under an already compiled gdb.
396 depend: $(SOURCES) Makefile.in
397 @echo Ignore errors about non-existent system-supplied include files
398 @echo for systems other than the one you are using.
399 @echo "If xm.h and tm.h don't exist, the error messages saying so"
400 @echo can safely be ignored.
401 @echo Also ignore parse errors in valops.c, and any errors in
402 @echo arm-convert.s.
403 -$(GCC) -MM $(CFLAGS) -I$(BFD_DIR) \
404 `ls $(SOURCES) | grep -v '\.[hy]$$' |sort -u` >depend.tmp
405 # If running in srcdir, translate "./foo.c" into "$srcdir/foo.c" except
406 # for xm.h and tm.h. This allows the same "depend" file to be used
407 # by the various subdirectories.
408 if [ "${srcdir}" = "." ] ; then \
409 <depend.tmp sed \
410 -e 's; ./xm.h; xm.h;g' \
411 -e 's; ./tm.h; tm.h;g' \
412 -e 's; \./; $${srcdir}/;g' \
413 -e 's; vx-share/; $${srcdir}/vx-share/;g' \
414 -e 's; nindy-share/; $${srcdir}/nindy-share/;g' \
415 >depend.tm2; \
416 rm depend.tmp; \
417 mv depend.tm2 depend.tmp; \
418 fi
419 <depend.tmp sed \
420 -e 's; [xt]m.h;& config.status;g' \
421 -e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g' \
422 -e 's; $(READLINE_DIR)/; $(READLINE_DEP)/;g' \
423 -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g' \
424 -e 's; ./xm.h; xm.h config.status;g' \
425 -e 's; ./tm.h; tm.h config.status;g' \
426 >depend
427 rm depend.tmp
428
429 config.status:
430 @echo "You must configure gdb. Look at the README file for details."
431 @false
432
433 # These are not generated by "make depend" because they only are there
434 # for some machines.
435 # But these rules don't do what we want; we want to hack the foo.o: tm.h
436 # dependency to do the right thing.
437 tm-isi.h tm-sun3.h tm-news.h tm-hp300bsd.h tm-altos.h: tm-68k.h
438 tm-hp300hpux.h tm-sun2.h tm-3b1.h: tm-68k.h
439 xm-news1000.h: xm-news.h
440 xm-i386-sv32.h: xm-i386.h
441 tm-i386gas.h: tm-i386.h
442 xm-sun4os4.h: xm-sparc.h
443 tm-sun4os4.h: tm-sparc.h
444
445 kdb: $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${CDEPS}
446 rm -f init.c
447 $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(NTSOBS) > init.c
448 $(CC) $(LDFLAGS) -c init.c $(CLIBS)
449 ld -o kdb $(NTSSTART) $(OBS) $(NTSOBS) init.o $(ADD_FILES) \
450 -lc $(CLIBS)
451
452 # Put the proper machine-specific files first.
453 # createtags will edit the .o in DEPFILES into .c
454 TAGS: ${TAGFILES}
455 $(srcdir)/createtags $(TM_FILE) ${XM_FILE} $(DEPFILES) ${TAGFILES}
456 tags: TAGS
457
458 # Making distributions of GDB and friends.
459
460 # Make a directory `proto-gdb.dir' that contains an image of the GDB
461 # directory of the distribution, built up with symlinks.
462 make-proto-gdb.dir: force_update
463 $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
464 $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1
465
466 # Make a tar file containing the GDB directory of the distribution.
467 gdb.tar.Z: force_update
468 $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
469 $(MAKE) $(MFLAGS) -f Makefile.in gdb-$(VERSION).tar.Z
470
471 # Set up the GDB directory for distribution, by building all files that
472 # are products of other files.
473 setup-to-dist: force_update
474 ../configure none
475 rm -f alldeps.mak
476 $(MAKE) $(MFLAGS) alldeps.mak
477 ../configure none
478 rm -f depend
479 $(MAKE) $(MFLAGS) depend
480 ../configure none
481 (cd doc; $(MAKE) $(MFLAGS) rdl-apps.texi gdbVN.m4)
482 $(MAKE) $(MFLAGS) gdb.info
483 $(MAKE) $(MFLAGS) refcard.ps
484
485 # Build a tar file from a proto-gdb.dir.
486 gdb-$(VERSION).tar.Z: force_update
487 rm -f gdb.tar gdb-$(VERSION).tar.Z
488 $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1
489 ln -s proto-gdb.dir $(DIST)
490 tar chf - $(DIST) | compress >gdb-$(VERSION).tar.Z
491 rm -rf $(DIST) proto-gdb.dir
492
493 # Build a proto-gdb.dir after GDB has been set up for distribution.
494 # This stuff must be run in `Makefile', not `Makefile.in`; we use the makefile
495 # built in the setup-to-dist process, since it defines things like ALLCONFIG
496 # and ALLDEPFILES, that we need.
497 make-proto-gdb-1: ${TARFILES} ${TARDIRS} gdb.info
498 rm -rf proto-gdb.dir
499 mkdir proto-gdb.dir
500 cd proto-gdb.dir ; for i in ${TARFILES} ; do ln -s ../$$i . ; done
501 cd proto-gdb.dir ; ln -s ../${INFOFILES} .
502 cd proto-gdb.dir ; for i in ${TARDIRS}; do \
503 (mkdir $$i; cd $$i; \
504 ln -s ../../$$i/* .; \
505 rm -rf SCCS CVS.adm RCS); done
506 mkdir proto-gdb.dir/config
507 cd proto-gdb.dir/config ; \
508 for i in $(ALLCONFIG) ; do ln -s ../../$$i ../$$i ; done
509 mkdir proto-gdb.dir/vx-share proto-gdb.dir/nindy-share
510 cd proto-gdb.dir/config ; \
511 for i in $(SFILES_SUBDIR) $(NONSRC_SUBDIR) $(ALLDEPFILES_SUBDIR); \
512 do ln -s ../../$$i ../$$i ; done
513 chmod og=u `find . -print`
514
515 clean:
516 rm -f ${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES}
517 rm -f init.c init.o version.c
518 rm -f gdb core gdb.tar gdb.tar.Z make.log
519 rm -f gdb[0-9]
520 $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)"
521
522 distclean: clean c-exp.tab.c m2-exp.tab.c TAGS
523 rm -f tm.h xm.h config.status
524 rm -f y.output yacc.acts yacc.tmp
525 rm -f ${TESTS} Makefile depend
526 $(MAKE) subdir_do DO=distclean "DODIRS=$(SUBDIRS)"
527
528 realclean: clean
529 rm -f c-exp.tab.c m2-exp.tab.c TAGS
530 rm -f tm.h xm.h config.status
531 rm -f Makefile depend
532 $(MAKE) subdir_do DO=realclean "DODIRS=$(SUBDIRS)"
533
534 STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
535
536 subdir_do: force
537 for i in $(DODIRS); do \
538 if [ -d $(unsubdir)/$$i ] ; then \
539 if (cd $(unsubdir)/$$i$(subdir); \
540 $(MAKE) \
541 "against=$(against)" \
542 "AR=$(AR)" \
543 "CC=$(CC)" \
544 "AR_FLAGS=$(AR_FLAGS)" \
545 "RANLIB=$(RANLIB)" \
546 "BISON=$(BISON)" $(DO)) ; then true ; \
547 else exit 1 ; fi ; \
548 else true ; fi ; \
549 done
550
551 # Copy the object files from a particular stage into a subdirectory.
552 stage1: force
553 -mkdir stage1
554 -mv -f $(STAGESTUFF) stage1
555 $(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)"
556
557 stage2: force
558 -mkdir stage2
559 -mv -f $(STAGESTUFF) stage2
560 $(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)"
561
562 stage3: force
563 -mkdir stage3
564 -mv -f $(STAGESTUFF) stage3
565 $(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)"
566
567 against=stage2
568
569 comparison: force
570 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
571 $(MAKE) subdir_do DO=comparison "DODIRS=$(SUBDIRS)"
572
573 de-stage1: force
574 - (cd stage1 ; mv -f * ..)
575 - rmdir stage1
576 $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)"
577
578 de-stage2: force
579 - (cd stage2 ; mv -f * ..)
580 - rmdir stage2
581 $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)"
582
583 de-stage3: force
584 - (cd stage3 ; mv -f * ..)
585 - rmdir stage3
586 $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)"
587
588 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
589 $(SHELL) ./config.status
590
591 force:
592
593 # Documentation!
594 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
595 refcard.dvi: $(srcdir)/doc/refcard.tex
596 ( cd $(srcdir)/doc; $(MAKE) refcard.dvi )
597 mv $(srcdir)/doc/refcard.dvi .
598
599 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
600 refcard.ps: $(srcdir)/doc/refcard.tex
601 ( cd $(srcdir)/doc; $(MAKE) refcard.ps )
602 mv $(srcdir)/doc/refcard.ps .
603
604 # GDB MANUAL: TeX dvi file
605 gdb.dvi: $(srcdir)/doc/gdb-all.texi $(srcdir)/doc/rdl-apps.texi
606 ( cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb.dvi )
607 mv $(srcdir)/doc/gdb.dvi .
608
609 # GDB MANUAL: info file
610 gdb.info: $(srcdir)/doc/gdb-all.texi
611 ( cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb.info )
612 mv $(srcdir)/doc/gdb.info* .
613
614 $(srcdir)/doc/gdb-all.texi:
615 (cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb-all.texi)
616 $(srcdir)/doc/rdl-apps.texi:
617 (cd $(srcdir)/doc; $(MAKE) rdl-apps.texi)
618
619 # Make copying.c from COPYING
620 copying.c: ${srcdir}/COPYING ${srcdir}/copying.awk
621 awk -f ${srcdir}/copying.awk < ${srcdir}/COPYING > copying.c
622
623 version.c: Makefile.in
624 echo 'char *version = "$(VERSION)";' >version.c
625
626 # c-exp.tab.c is generated in target dir from c-exp.y if it doesn't exist
627 # in srcdir, then compiled in target dir to c-exp.tab.o.
628 c-exp.tab.o: c-exp.tab.c
629 c-exp.tab.c: $(srcdir)/c-exp.y
630 @echo 'Expect 4 shift/reduce conflicts.'
631 ${YACC} $(srcdir)/c-exp.y
632 - mv y.tab.c c-exp.tab.c
633
634 # m2-exp.tab.c is generated in target dir from m2-exp.y if it doesn't exist
635 # in srcdir, then compiled in target dir to m2-exp.tab.o.
636 m2-exp.tab.o: m2-exp.tab.c
637 m2-exp.tab.c: $(srcdir)/m2-exp.y
638 ${YACC} $(srcdir)/m2-exp.y
639 - mv y.tab.c m2-exp.tab.c
640
641 # The symbol-file readers have dependencies on BFD header files.
642 dbxread.o: ${srcdir}/dbxread.c
643 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
644
645 coffread.o: ${srcdir}/coffread.c
646 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/coffread.c
647
648 mipsread.o: ${srcdir}/mipsread.c
649 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/mipsread.c
650
651 elfread.o: ${srcdir}/elfread.c
652 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/elfread.c
653
654 xcoffread.o: ${srcdir}/xcoffread.c
655 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffread.c
656
657 xcoffexec.o: ${srcdir}/xcoffexec.c
658 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffexec.c
659
660 # Drag in the files that are in another directory.
661
662 xdr_ld.o: ${srcdir}/vx-share/xdr_ld.c
663 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ld.c
664
665 xdr_ptrace.o: ${srcdir}/vx-share/xdr_ptrace.c
666 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ptrace.c
667
668 xdr_rdb.o: ${srcdir}/vx-share/xdr_rdb.c
669 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_rdb.c
670
671 xdr_regs.o: ${srcdir}/vx-share/xdr_regs.c
672 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_regs.c
673
674 nindy.o: ${srcdir}/nindy-share/nindy.c
675 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/nindy.c
676
677 Onindy.o: ${srcdir}/nindy-share/Onindy.c
678 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/Onindy.c
679
680 ttybreak.o: ${srcdir}/nindy-share/ttybreak.c
681 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttybreak.c
682
683 ttyflush.o: ${srcdir}/nindy-share/ttyflush.c
684 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttyflush.c
685
686 lint: $(LINTFILES)
687 $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
688 `echo ${DEPFILES} | sed 's/\.o /\.c /g'
689
690 gdb.cxref: $(SFILES)
691 cxref -I. $(SFILES) >gdb.cxref
692
693 force_update:
694
695 # When used with GDB, the demangler should never look for leading
696 # underscores because GDB strips them off during symbol read-in. Thus
697 # -Dnounderscore.
698
699 cplus-dem.o: cplus-dem.c
700 ${CC} -c ${CFLAGS} -Dnounderscore \
701 `echo ${srcdir}/cplus-dem.c | sed 's,^\./,,'`
702
703 # GNU Make has an annoying habit of putting *all* the Makefile variables
704 # into the environment, unless you include this target as a circumvention.
705 # Rumor is that this will be fixed (and this target can be removed)
706 # in GNU Make 4.0.
707 .NOEXPORT:
708
709 # This is the end of "Makefile.in". When built into "Makefile"
710 # by the configure script, two things are added below this point:
711 # alldeps.mak -- defintions of all files that are used in
712 # host- or target-dependent configurations
713 # depend -- what .o files depend on what .c and .h files,
714 # for all configurations.
715
716
This page took 0.044835 seconds and 5 git commands to generate.