* Makefile.in: link with libiberty after libreadline, since
[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 GLOBAL_CFLAGS = -g ${TM_CFLAGS} ${XM_CFLAGS}
106 #PROFILE_CFLAGS = -pg
107
108 CFLAGS = ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MALLOC_CFLAGS} ${INCLUDE_CFLAGS}
109 # None of the things in CFLAGS will do any harm, and on some systems
110 # (e.g. SunOS4) it is important to use the M_CFLAGS.
111 LDFLAGS = $(CFLAGS)
112
113 # Where is the "-liberty" library, containing getopt and obstack?
114 LIBIBERTY_DIR = ${srcdir}/../libiberty
115 LIBIBERTY = $(unsubdir)/../libiberty${subdir}/libiberty.a
116
117 # Flags that describe where you can find the termcap library.
118 # You may need to make other arrangements for USG.
119 TERMCAP = -ltermcap
120
121 # The xconfig file must define REGEX and REGEX1 on USG machines.
122 # If your sysyem is missing alloca(), or, more likely, it's there but
123 # it doesn't work, define ALLOCA & ALLOCA1 too.
124 # If your system is missing putenv(), add putenv.c to XM_ADD_FILES.
125
126 # Libraries and corresponding dependencies for compiling gdb.
127 # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
128 # TERMCAP comes after readline, since readline depends on it.
129 CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${LIBIBERTY} ${XM_CLIBS} ${TM_CLIBS}
130 CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${LIBIBERTY} ${RL_LIB}
131
132 ADD_FILES = ${REGEX} ${ALLOCA} ${GNU_MALLOC} ${XM_ADD_FILES} ${TM_ADD_FILES}
133 ADD_DEPS = ${REGEX1} ${ALLOCA1} ${GNU_MALLOC} ${XM_ADD_FILES} ${TM_ADD_FILES}
134
135 VERSION = 4.2.2
136 DIST=gdb
137
138 LINT=/usr/5bin/lint
139 LINTFLAGS=
140
141 # Source files in the main directory.
142 # Files which are included via a tconfig/* or xconfig/* file
143 # should *not* be specified here; they're in "ALLDEPFILES".
144 SFILES_MAINDIR = \
145 blockframe.c breakpoint.c command.c core.c \
146 environ.c eval.c expprint.c findvar.c infcmd.c inflow.c infrun.c \
147 main.c printcmd.c \
148 remote.c source.c stack.c symmisc.c symtab.c symfile.c \
149 utils.c valarith.c valops.c valprint.c values.c c-exp.y m2-exp.y \
150 signame.c cplus-dem.c mem-break.c target.c inftarg.c \
151 dbxread.c coffread.c elfread.c dwarfread.c \
152 ieee-float.c language.c parse.c buildsym.c
153 # xcoffread.c xcoffexec.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 tconfig/* or xconfig/* file
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 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
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 # tdesc-lib cannot be named simply tdesc, because if it were, GNU make
226 # would try to make it from tdesc.c.
227 # tdesc-lib removed from the list due to Motorola copyrights...gnu@cygnus.com
228 OTHERS = Makefile.in depend alldeps.mak createtags munch configure.in \
229 ChangeLog ChangeLog-3.x refcard.ps \
230 README TODO TAGS WHATS.NEW Projects \
231 .gdbinit COPYING $(YYFILES) \
232 copying.c Convex.notes copying.awk \
233 saber.suppress standalone.c stuff.c kdb-start.c \
234 putenv.c
235
236 # Subdirectories of gdb, which should be included in their entirety in
237 # gdb-xxx.tar.Z:
238 TARDIRS = doc # tests
239
240 # GDB "info" files, which should be included in their entirety
241 INFOFILES = gdb.info*
242
243 DEPFILES= ${TDEPFILES} ${XDEPFILES}
244
245 SOURCES=$(SFILES) $(ALLDEPFILES) $(YYFILES)
246 TAGFILES = $(SOURCES) ${HFILES} ${OPCODES} ${ALLPARAM} ${POSSLIBS}
247 TAGFILES_MAINDIR = $(SFILES_MAINDIR) $(ALLDEPFILES_MAINDIR) \
248 ${HFILES} ${OPCODES} ${ALLPARAM} ${POSSLIBS_MAINDIR}
249 TARFILES = ${TAGFILES_MAINDIR} ${OTHERS} ${REMOTE_EXAMPLES}
250
251 OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
252 values.o eval.o valops.o valarith.o valprint.o printcmd.o \
253 symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \
254 command.o utils.o expprint.o environ.o version.o \
255 copying.o $(DEPFILES) signame.o cplus-dem.o mem-break.o target.o \
256 inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \
257 buildsym.o \
258 dbxread.o coffread.o elfread.o dwarfread.o # mipsread.o
259 # xcoffexec.o xcoffread.o \
260
261 RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
262
263 TSOBS = core.o inflow.o
264
265 NTSOBS = standalone.o
266
267 TSSTART = /lib/crt0.o
268
269 NTSSTART = kdb-start.o
270
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
274
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.
277 .c.o:
278 ${CC} -c ${CFLAGS} $<
279
280 all: gdb
281
282 install: gdb
283 cp gdb $(bindir)/gdb.new
284 mv $(bindir)/gdb.new $(bindir)/gdb
285 $(M_INSTALL)
286
287 init.c: $(srcdir)/munch $(OBS) $(TSOBS)
288 $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
289
290 gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${CDEPS} init.o
291 ${CC-LD} $(LDFLAGS) -o gdb init.o $(OBS) $(TSOBS) $(ADD_FILES) \
292 $(CLIBS) $(LOADLIBES)
293
294 saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
295 #setopt load_flags $(CFLAGS) -I$(BFD_DIR) -DHOST_SYS=SUN4_SYS
296 #load ./init.c $(SFILES)
297 #unload ${srcdir}/c-exp.y ${srcdir}/m2-exp.y ${srcdir}/vx-share/*.h
298 #unload ${srcdir}/nindy-share/[A-Z]*
299 #load c-exp.tab.c m2-exp.tab.c
300 #load copying.c version.c
301 #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
302 #load ${LIBIBERTY_DIR}/*.c
303 #load ${BFD_DIR}/*.c
304 #load ${READLINE_DIR}/*.c
305 #load -ltermcap
306 ##void mcheck(a) void (*a)(); { }
307 ##void mtrace() { }
308
309
310
311 # This is useful when debugging GDB, because some Unix's don't let you run GDB
312 # on itself without copying the executable. So "make gdb1" will make
313 # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
314 # Removing gdb1 before the copy is the right thing if gdb1 is open
315 # in another process.
316 gdb1: gdb
317 rm -f gdb1
318 cp gdb gdb1
319
320 # This is a remote stub which runs under unix and starts up an
321 # inferior process. This is at least useful for debugging GDB's
322 # remote support.
323 rapp: $(RAPP_OBS)
324 rm -f rapp_init.c
325 ${srcdir}/munch ${MUNCH_DEFINE} ${RAPP_OBS} > rapp_init.c
326 ${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS)
327
328 # Support for building Makefile out of configured pieces, automatically
329 # generated dependencies, etc. alldeps.mak is a file that contains
330 # "make" variable definitions for all ALLDEPFILES, ALLDEPFILES_MAINDIR,
331 # ALLDEPFILES_SUBDIR, ALLPARAM, and ALLCONFIG, all cadged from the current
332 # contents of the xconfig and tconfig subdirectories.
333
334 alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig
335 rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp
336 for i in `ls -d ${srcdir}/tconfig/*[0-9A-Za-z] \
337 ${srcdir}/xconfig/*[0-9A-Za-z] | \
338 grep -v RCS | grep -v CVS.adm | grep -v SCCS` ; do \
339 echo $$i >>allconfig.tmp; \
340 awk <$$i ' \
341 $$1 == "TDEPFILES=" || $$1 == "XDEPFILES=" { \
342 for (i = 2; i <= NF; i++) \
343 print $$i >> "alldeps.tmp" ; \
344 } \
345 $$1 == "TM_FILE=" || $$1 == "XM_FILE=" { \
346 print $$2 >> "allparam.tmp" }' ; \
347 done
348 sort <alldeps.tmp | uniq | \
349 sed -e 's/arm-convert.o/arm-convert.s/' \
350 -e 's!^Onindy.o!nindy-share/Onindy.c!' \
351 -e 's!^nindy.o!nindy-share/nindy.c!' \
352 -e 's!ttybreak.o!nindy-share/ttybreak.c!' \
353 -e 's!ttyflush.o!nindy-share/ttyflush.c!' \
354 -e 's!xdr_ld.o!vx-share/xdr_ld.c!' \
355 -e 's!xdr_ptrace.o!vx-share/xdr_ptrace.c!' \
356 -e 's!xdr_rdb.o!vx-share/xdr_rdb.c!' \
357 -e 's!xdr_regs.o!vx-share/xdr_regs.c!' \
358 -e 's/\.o/.c/' \
359 >alldeps2.tmp
360 echo '# Start of "alldeps.mak" definitions' \
361 >>alldeps.mak;
362 echo 'ALLDEPFILES = $$(ALLDEPFILES_MAINDIR) $$(ALLDEPFILES_SUBDIR)' \
363 >>alldeps.mak;
364 grep -v / alldeps2.tmp | \
365 awk 'BEGIN {printf "ALLDEPFILES_MAINDIR="} \
366 NR == 0 {printf $$0;} \
367 NR != 0 {printf "\\\n" $$0} \
368 END {printf "\n\n"}' >>alldeps.mak;
369 grep / alldeps2.tmp | \
370 awk 'BEGIN {printf "ALLDEPFILES_SUBDIR="} \
371 NR == 0 {printf $$0;} \
372 NR != 0 {printf "\\\n" $$0} \
373 END {printf "\n\n"}' >>alldeps.mak;
374 sort <allparam.tmp | uniq | awk 'BEGIN {printf "ALLPARAM="} \
375 NR == 0 {printf $$0;} \
376 NR != 0 {printf "\\\n" $$0} \
377 END {printf "\n\n"}' >>alldeps.mak;
378 sort <allconfig.tmp | uniq | awk 'BEGIN {printf "ALLCONFIG="} \
379 NR == 0 {printf $$0;} \
380 NR != 0 {printf "\\\n" $$0} \
381 END {printf "\n\n"}' >>alldeps.mak;
382 echo '# End of "alldeps.mak" definitions' \
383 >>alldeps.mak;
384 rm -f alldeps.tmp alldeps2.tmp allparam.tmp allconfig.tmp
385
386 # The sed script makes everything which depends on {x,t}m.h depend on
387 # config.status as well, in case someone reconfigures gdb out from
388 # under an already compiled gdb.
389 depend: $(SOURCES) Makefile.in
390 @echo Ignore errors about non-existent system-supplied include files
391 @echo for systems other than the one you are using.
392 @echo "If xm.h and tm.h don't exist, the error messages saying so"
393 @echo can safely be ignored.
394 @echo Also ignore parse errors in valops.c, and any errors in
395 @echo arm-convert.s.
396 -$(GCC) -MM $(CFLAGS) -I$(BFD_DIR) \
397 `ls $(SOURCES) | grep -v '\.[hy]$$' |sort -u` >depend.tmp
398 # If running in srcdir, translate "./foo.c" into "$srcdir/foo.c" except
399 # for xm.h and tm.h. This allows the same "depend" file to be used
400 # by the various subdirectories.
401 if [ "${srcdir}" = "." ] ; then \
402 <depend.tmp sed \
403 -e 's; ./xm.h; xm.h;g' \
404 -e 's; ./tm.h; tm.h;g' \
405 -e 's; \./; $${srcdir}/;g' \
406 -e 's; vx-share/; $${srcdir}/vx-share/;g' \
407 -e 's; nindy-share/; $${srcdir}/nindy-share/;g' \
408 >depend.tm2; \
409 rm depend.tmp; \
410 mv depend.tm2 depend.tmp; \
411 fi
412 <depend.tmp sed \
413 -e 's; [xt]m.h;& config.status;g' \
414 -e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g' \
415 -e 's; $(READLINE_DIR)/; $(READLINE_DEP)/;g' \
416 -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g' \
417 -e 's; ./xm.h; xm.h config.status;g' \
418 -e 's; ./tm.h; tm.h config.status;g' \
419 >depend
420 rm depend.tmp
421
422 config.status:
423 @echo "You must configure gdb. Look at the README file for details."
424 @false
425
426 # These are not generated by "make depend" because they only are there
427 # for some machines.
428 # But these rules don't do what we want; we want to hack the foo.o: tm.h
429 # dependency to do the right thing.
430 tm-isi.h tm-sun3.h tm-news.h tm-hp300bsd.h tm-altos.h : tm-68k.h
431 tm-hp300hpux.h tm-sun2.h tm-3b1.h : tm-68k.h
432 xm-news1000.h : xm-news.h
433 xm-i386-sv32.h : xm-i386.h
434 tm-i386gas.h: tm-i386.h
435 xm-sun4os4.h : xm-sparc.h
436 tm-sun4os4.h : tm-sparc.h
437
438 kdb : $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${CDEPS}
439 rm -f init.c
440 $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(NTSOBS) > init.c
441 $(CC) $(LDFLAGS) -c init.c $(CLIBS)
442 ld -o kdb $(NTSSTART) $(OBS) $(NTSOBS) init.o $(ADD_FILES) \
443 -lc $(CLIBS)
444
445 # Put the proper machine-specific files first.
446 # createtags will edit the .o in DEPFILES into .c
447 TAGS: ${TAGFILES}
448 $(srcdir)/createtags $(TM_FILE) ${XM_FILE} $(DEPFILES) ${TAGFILES}
449 tags: TAGS
450
451 # Making distributions of GDB and friends.
452
453 # Make a directory `proto-gdb.dir' that contains an image of the GDB
454 # directory of the distribution, built up with symlinks.
455 make-proto-gdb.dir: force_update
456 $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
457 $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1
458
459 # Make a tar file containing the GDB directory of the distribution.
460 gdb.tar.Z: force_update
461 $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
462 $(MAKE) $(MFLAGS) -f Makefile.in gdb-$(VERSION).tar.Z
463
464 # Set up the GDB directory for distribution, by building all files that
465 # are products of other files.
466 setup-to-dist: force_update
467 ../configure none
468 rm -f alldeps.mak
469 $(MAKE) $(MFLAGS) alldeps.mak
470 ../configure none
471 rm -f depend
472 $(MAKE) $(MFLAGS) depend
473 ../configure none
474 (cd doc; $(MAKE) $(MFLAGS) rdl-apps.texi gdbVN.m4)
475 $(MAKE) $(MFLAGS) gdb.info
476 $(MAKE) $(MFLAGS) refcard.ps
477
478 # Build a tar file from a proto-gdb.dir.
479 gdb-$(VERSION).tar.Z: force_update
480 rm -f gdb.tar gdb-$(VERSION).tar.Z
481 $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1
482 ln -s proto-gdb.dir $(DIST)
483 tar chf - $(DIST) | compress >gdb-$(VERSION).tar.Z
484 rm -rf $(DIST) proto-gdb.dir
485
486 # Build a proto-gdb.dir after GDB has been set up for distribution.
487 # This stuff must be run in `Makefile', not `Makefile.in`; we use the makefile
488 # built in the setup-to-dist process, since it defines things like ALLCONFIG
489 # and ALLDEPFILES, that we need.
490 make-proto-gdb-1: ${TARFILES} ${TARDIRS} gdb.info
491 rm -rf proto-gdb.dir
492 mkdir proto-gdb.dir
493 cd proto-gdb.dir ; for i in ${TARFILES} ; do ln -s ../$$i . ; done
494 cd proto-gdb.dir ; ln -s ../${INFOFILES} .
495 cd proto-gdb.dir ; for i in ${TARDIRS}; do \
496 (mkdir $$i; cd $$i; \
497 ln -s ../../$$i/* .; \
498 rm -rf SCCS CVS.adm RCS); done
499 mkdir proto-gdb.dir/xconfig proto-gdb.dir/tconfig
500 cd proto-gdb.dir/tconfig ; \
501 for i in $(ALLCONFIG) ; do ln -s ../../$$i ../$$i ; done
502 mkdir proto-gdb.dir/vx-share proto-gdb.dir/nindy-share
503 cd proto-gdb.dir/tconfig ; \
504 for i in $(SFILES_SUBDIR) $(NONSRC_SUBDIR) $(ALLDEPFILES_SUBDIR); \
505 do ln -s ../../$$i ../$$i ; done
506 chmod og=u `find . -print`
507
508 clean:
509 rm -f ${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES}
510 rm -f init.c init.o version.c
511 rm -f gdb core gdb.tar gdb.tar.Z make.log
512 rm -f gdb[0-9]
513 cd $(srcdir)/doc; $(MAKE) clean
514
515 distclean: clean c-exp.tab.c m2-exp.tab.c TAGS
516 rm -f tm.h xm.h config.status
517 rm -f y.output yacc.acts yacc.tmp
518 rm -f ${TESTS} Makefile depend
519
520 realclean: clean
521 rm -f c-exp.tab.c m2-exp.tab.c TAGS
522 rm -f tm.h xm.h config.status
523 rm -f Makefile depend
524
525 STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
526
527 # Copy the object files from a particular stage into a subdirectory.
528 stage1: force
529 -mkdir stage1
530 -mv -f $(STAGESTUFF) stage1
531
532 stage2: force
533 -mkdir stage2
534 -mv -f $(STAGESTUFF) stage2
535
536 stage3: force
537 -mkdir stage3
538 -mv -f $(STAGESTUFF) stage3
539
540 against=stage2
541
542 comparison: force
543 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
544
545 de-stage1: force
546 - (cd stage1 ; mv -f * ..)
547 - rmdir stage1
548
549 de-stage2: force
550 - (cd stage2 ; mv -f * ..)
551 - rmdir stage2
552
553 de-stage3: force
554 - (cd stage3 ; mv -f * ..)
555 - rmdir stage3
556
557 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
558 $(SHELL) ./config.status
559
560 force:
561
562 # Documentation!
563 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
564 refcard.dvi : $(srcdir)/doc/refcard.tex
565 ( cd $(srcdir)/doc; $(MAKE) refcard.dvi )
566 mv $(srcdir)/doc/refcard.dvi .
567
568 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
569 refcard.ps : $(srcdir)/doc/refcard.tex
570 ( cd $(srcdir)/doc; $(MAKE) refcard.ps )
571 mv $(srcdir)/doc/refcard.ps .
572
573 # GDB MANUAL: TeX dvi file
574 gdb.dvi : $(srcdir)/doc/gdb-all.texi $(srcdir)/doc/rdl-apps.texi
575 ( cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb.dvi )
576 mv $(srcdir)/doc/gdb.dvi .
577
578 # GDB MANUAL: info file
579 gdb.info: $(srcdir)/doc/gdb-all.texi
580 ( cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb.info )
581 mv $(srcdir)/doc/gdb.info* .
582
583 $(srcdir)/doc/gdb-all.texi:
584 (cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb-all.texi)
585 $(srcdir)/doc/rdl-apps.texi:
586 (cd $(srcdir)/doc; $(MAKE) rdl-apps.texi)
587
588 # Make copying.c from COPYING
589 copying.c : COPYING copying.awk
590 awk -f copying.awk < COPYING > copying.c
591
592 version.c : Makefile.in
593 echo 'char *version = "$(VERSION)";' >version.c
594
595 # c-exp.tab.c is generated in target dir from c-exp.y if it doesn't exist
596 # in srcdir, then compiled in target dir to c-exp.tab.o.
597 c-exp.tab.o: c-exp.tab.c
598 c-exp.tab.c: $(srcdir)/c-exp.y
599 @echo 'Expect 4 shift/reduce conflicts.'
600 ${YACC} $(srcdir)/c-exp.y
601 - mv y.tab.c c-exp.tab.c
602
603 # m2-exp.tab.c is generated in target dir from m2-exp.y if it doesn't exist
604 # in srcdir, then compiled in target dir to m2-exp.tab.o.
605 m2-exp.tab.o: m2-exp.tab.c
606 m2-exp.tab.c: $(srcdir)/m2-exp.y
607 ${YACC} $(srcdir)/m2-exp.y
608 - mv y.tab.c m2-exp.tab.c
609
610 # The symbol-file readers have dependencies on BFD header files.
611 dbxread.o: ${srcdir}/dbxread.c
612 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
613
614 coffread.o: ${srcdir}/coffread.c
615 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/coffread.c
616
617 mipsread.o: ${srcdir}/mipsread.c
618 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/mipsread.c
619
620 elfread.o: ${srcdir}/elfread.c
621 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/elfread.c
622
623 xcoffread.o: ${srcdir}/xcoffread.c
624 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffread.c
625
626 # Drag in the files that are in another directory.
627
628 xdr_ld.o: ${srcdir}/vx-share/xdr_ld.c
629 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ld.c
630
631 xdr_ptrace.o: ${srcdir}/vx-share/xdr_ptrace.c
632 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ptrace.c
633
634 xdr_rdb.o: ${srcdir}/vx-share/xdr_rdb.c
635 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_rdb.c
636
637 xdr_regs.o: ${srcdir}/vx-share/xdr_regs.c
638 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_regs.c
639
640 nindy.o: ${srcdir}/nindy-share/nindy.c
641 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/nindy.c
642
643 Onindy.o: ${srcdir}/nindy-share/Onindy.c
644 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/Onindy.c
645
646 ttybreak.o: ${srcdir}/nindy-share/ttybreak.c
647 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttybreak.c
648
649 ttyflush.o: ${srcdir}/nindy-share/ttyflush.c
650 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttyflush.c
651
652 tdesc-lib/libdc.o : force_update
653 cd tdesc-lib ; ${MAKE} "SYSV_DEFINE=${SYSV_DEFINE}"
654
655 lint: $(LINTFILES)
656 $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES)
657
658 gdb.cxref: $(SFILES)
659 cxref -I. $(SFILES) >gdb.cxref
660
661 force_update :
662
663 # When used with GDB, the demangler should never look for leading
664 # underscores because GDB strips them off during symbol read-in. Thus
665 # -Dnounderscore.
666
667 cplus-dem.o : cplus-dem.c
668 ${CC} -c ${CFLAGS} -Dnounderscore \
669 `echo ${srcdir}/cplus-dem.c | sed 's,^\./,,'`
670
671 # GNU Make has an annoying habit of putting *all* the Makefile variables
672 # into the environment, unless you include this target as a circumvention.
673 # Rumor is that this will be fixed (and this target can be removed)
674 # in GNU Make 4.0.
675 .NOEXPORT:
676
677 # This is the end of "Makefile.in". When built into "Makefile"
678 # by the configure script, two things are added below this point:
679 # alldeps.mak -- defintions of all files that are used in
680 # host- or target-dependent configurations
681 # depend -- what .o files depend on what .c and .h files,
682 # for all configurations.
683
684
This page took 0.062228 seconds and 4 git commands to generate.