5ec73b46a7726078deece31f7640575d2055ee4c
[deliverable/binutils-gdb.git] / gdb / Makefile.in
1 #Copyright (C) 1989, 1990, 1991, 1992 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 prefix = /usr/local
20
21 program_prefix =
22 exec_prefix = $(prefix)
23 bindir = $(exec_prefix)/bin
24 libdir = $(exec_prefix)/lib
25
26 datadir = $(prefix)/lib
27 mandir = $(prefix)/man
28 man1dir = $(mandir)/man1
29 man2dir = $(mandir)/man2
30 man3dir = $(mandir)/man3
31 man4dir = $(mandir)/man4
32 man5dir = $(mandir)/man5
33 man6dir = $(mandir)/man6
34 man7dir = $(mandir)/man7
35 man8dir = $(mandir)/man8
36 man9dir = $(mandir)/man9
37 infodir = $(prefix)/info
38 includedir = $(prefix)/include
39 docdir = $(datadir)/doc
40
41 SHELL = /bin/sh
42
43 INSTALL = install -c
44 INSTALL_PROGRAM = $(INSTALL)
45 INSTALL_DATA = $(INSTALL)
46
47 AR = ar
48 AR_FLAGS = qv
49 RANLIB = ranlib
50
51 # Flags that describe where you can find the termcap library.
52 # This can be overridden in the host Makefile fragment file.
53 TERMCAP = -ltermcap
54
55 # System V: If you compile gdb with a compiler which uses the coff
56 # encapsulation feature (this is a function of the compiler used, NOT
57 # of the m-?.h file selected by config.gdb), you must make sure that
58 # the GNU nm is the one that is used by munch.
59
60 # If you are compiling with GCC, make sure that either 1) You use the
61 # -traditional flag, or 2) You have the fixed include files where GCC
62 # can reach them. Otherwise the ioctl calls in inflow.c
63 # will be incorrectly compiled. The "fixincludes" script in the gcc
64 # distribution will fix your include files up.
65 #CC=cc
66 #CC=gcc -traditional
67 GCC=gcc
68
69 # Directory containing source files. Don't clean up the spacing,
70 # this exact string is matched for by the "configure" script.
71 srcdir = .
72
73 # It is also possible that you will need to add -I/usr/include/sys to the
74 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
75 # is where it should be according to Posix).
76
77 BISON=bison -y
78 BISONFLAGS=
79 YACC=$(BISON) $(BISONFLAGS)
80 # YACC=yacc
81 MAKE=make
82
83 # Documentation (gdb.dvi) needs either GNU m4 or SysV m4;
84 # Berkeley/Sun don't have quite enough.
85 #M4=/usr/5bin/m4
86 M4=gm4
87
88 # where to find texinfo; GDB dist should include a recent one
89 TEXIDIR=${srcdir}/../texinfo/fsf
90
91 # where to find makeinfo, preferably one designed for texinfo-2
92 MAKEINFO=makeinfo
93
94 # Set this up with gcc if you have gnu ld and the loader will print out
95 # line numbers for undefinded refs.
96 #CC-LD=gcc -static
97 CC-LD=${CC}
98
99 # Where is the "include" directory? Traditionally ../include or ./include
100 INCLUDE_DIR = ${srcdir}/../include
101 INCLUDE_DEP = $$(INCLUDE_DIR)
102
103 # Where is the source dir for the MMALLOC library? Traditionally ../mmalloc
104 # or ./mmalloc (When we want the binary library built from it, we use
105 # ${MMALLOC_DIR}${subdir}.)
106 # Note that mmalloc can still be used on systems without mmap().
107 # To use your system malloc, comment out the following defines.
108 MMALLOC_DIR = ${srcdir}/../mmalloc
109 MMALLOC_DEP = $$(MMALLOC_DIR)
110 MMALLOC_LIB = ./../mmalloc${subdir}/libmmalloc.a
111 # To use your system malloc, uncomment MMALLOC_DISABLE.
112 #MMALLOC_DISABLE = -DNO_MMALLOC
113 # To use mmalloc but disable corruption checking, uncomment MMALLOC_CHECK
114 #MMALLOC_CHECK = -DNO_MMALLOC_CHECK
115 MMALLOC_CFLAGS = ${MMALLOC_CHECK} ${MMALLOC_DISABLE}
116
117 # Where is the source dir for the BFD library? Traditionally ../bfd or ./bfd
118 # (When we want the binary library built from it, we use ${BFD_DIR}${subdir}.)
119 BFD_DIR = ${srcdir}/../bfd
120 BFD_DEP = $$(BFD_DIR)
121 BFD_LIB = ./../bfd${subdir}/libbfd.a
122
123 # Where is the source dir for the READLINE library? Traditionally in .. or .
124 # (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
125 READLINE_DIR = ${srcdir}/../readline
126 READLINE_DEP = $$(READLINE_DIR)
127 RL_LIB = ./../readline${subdir}/libreadline.a
128
129 # All the includes used for CFLAGS and for lint.
130 # -I. for config files.
131 # -I${srcdir} possibly for regex.h also.
132 INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR) -I$(READLINE_DIR)
133
134 # {X,T}M_CFLAGS, if defined, has system-dependent CFLAGS.
135 # CFLAGS for GDB
136 GLOBAL_CFLAGS = ${TM_CFLAGS} ${XM_CFLAGS}
137 #PROFILE_CFLAGS = -pg
138
139 # CFLAGS is specifically reserved for setting from the command line
140 # when running make. I.E. "make USER_CFLAGS=-Wmissing-prototypes".
141 CFLAGS = -g
142 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
143 INTERNAL_CFLAGS = ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MMALLOC_CFLAGS} ${INCLUDE_CFLAGS} ${USER_CFLAGS}
144 # None of the things in CFLAGS will do any harm, and on some systems
145 # (e.g. SunOS4) it is important to use the M_CFLAGS.
146 LDFLAGS = $(CFLAGS)
147
148 # Where is the "-liberty" library, containing getopt and obstack?
149 LIBIBERTY_DIR = ${srcdir}/../libiberty
150 LIBIBERTY = ./../libiberty${subdir}/libiberty.a
151
152 # The config/mh-* file must define REGEX and REGEX1 on USG machines.
153 # If your sysyem is missing alloca(), or, more likely, it's there but
154 # it doesn't work, define ALLOCA & ALLOCA1 too.
155 # If your system is missing putenv(), add putenv.c to XM_ADD_FILES.
156
157 # Libraries and corresponding dependencies for compiling gdb.
158 # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
159 # TERMCAP comes after readline, since readline depends on it.
160 CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${MMALLOC_LIB} ${LIBIBERTY} \
161 ${XM_CLIBS} ${TM_CLIBS}
162 CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${MMALLOC_LIB} ${LIBIBERTY} \
163 ${RL_LIB} ${MMALLOC_LIB}
164
165 ADD_FILES = ${REGEX} ${ALLOCA} ${XM_ADD_FILES} ${TM_ADD_FILES}
166 ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES}
167
168 VERSION = 4.5.3
169 DIST=gdb
170
171 LINT=/usr/5bin/lint
172 LINTFLAGS= -I${BFD_DIR}
173
174 # Select demangler to use.
175 DEMANGLER=cplus-dem
176
177 # Select options to use when compiling ${DEMANGLER}.c. The default is no
178 # options, which is correct for most targets, and also defaults to g++ style
179 # demangling. For other demangling styles, such as the Annotated C++
180 # Reference Manual (section 7.2.1c) style, set this define in the target-
181 # dependent makefile fragment.
182 DEMANGLE_OPTS=
183
184 # Host and target-dependent makefile fragments come in here.
185 ####
186 # End of host and target-dependent makefile fragments
187
188 # Source files in the main directory.
189 # Files which are included via a config/* Makefile fragment
190 # should *not* be specified here; they're in "ALLDEPFILES".
191 SFILES_MAINDIR = \
192 blockframe.c breakpoint.c command.c core.c \
193 environ.c eval.c expprint.c findvar.c infcmd.c inflow.c infrun.c \
194 main.c printcmd.c gdbtypes.c \
195 remote.c source.c stack.c symmisc.c symtab.c symfile.c \
196 utils.c valarith.c valops.c valprint.c values.c c-exp.y m2-exp.y \
197 ${DEMANGLER}.c mem-break.c target.c inftarg.c \
198 dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c \
199 ieee-float.c language.c parse.c buildsym.c objfiles.c \
200 minsyms.c mipsread.c
201
202 # Source files in subdirectories (which will be handled separately by
203 # 'make gdb.tar.Z').
204 # Files which are included via a config/* Makefile fragment
205 # should *not* be specified here; they're in "ALLDEPFILES".
206 SFILES_SUBDIR = \
207 ${srcdir}/vx-share/dbgRpcLib.h \
208 ${srcdir}/vx-share/ptrace.h \
209 ${srcdir}/vx-share/reg.h \
210 ${srcdir}/vx-share/vxTypes.h \
211 ${srcdir}/vx-share/vxWorks.h \
212 ${srcdir}/vx-share/wait.h \
213 ${srcdir}/vx-share/xdr_ld.h \
214 ${srcdir}/vx-share/xdr_ptrace.h \
215 ${srcdir}/vx-share/xdr_rdb.h \
216 ${srcdir}/vx-share/xdr_regs.h \
217 ${srcdir}/nindy-share/b.out.h \
218 ${srcdir}/nindy-share/block_io.h \
219 ${srcdir}/nindy-share/coff.h \
220 ${srcdir}/nindy-share/demux.h \
221 ${srcdir}/nindy-share/env.h \
222 ${srcdir}/nindy-share/stop.h \
223 ${srcdir}/nindy-share/ttycntl.h \
224 ${srcdir}/29k-share/include/coff.h \
225 ${srcdir}/29k-share/include/error.h \
226 ${srcdir}/29k-share/include/macros.h \
227 ${srcdir}/29k-share/include/main.h \
228 ${srcdir}/29k-share/include/memspcs.h \
229 ${srcdir}/29k-share/include/miniint.h \
230 ${srcdir}/29k-share/udi/udiphcfg.h \
231 ${srcdir}/29k-share/udi/udiphsun.h \
232 ${srcdir}/29k-share/udi/udiproc.h \
233 ${srcdir}/29k-share/udi/udipt29k.h \
234 ${srcdir}/29k-share/udi/udiptcfg.h \
235 ${srcdir}/29k-share/udi/udisoc.h
236
237 # Non-source files in subdirs, that should go into gdb.tar.Z.
238 NONSRC_SUBDIR = \
239 ${srcdir}/nindy-share/Makefile \
240 ${srcdir}/nindy-share/VERSION
241
242 # All source files that go into linking GDB, except config-specified files.
243 SFILES = $(SFILES_MAINDIR) $(SFILES_SUBDIR)
244
245 # All source files that lint should look at
246 LINTFILES = $(SFILES) $(YYFILES) init.c
247
248 # Any additional files specified on these lines should also be added to
249 # the OTHERS = definition below, so they go in the tar files.
250 SFILES_STAND = $(SFILES) standalone.c
251 SFILES_KGDB = $(SFILES) stuff.c kdb-start.c
252
253 # Header files that are not named in config/* Makefile fragments go here.
254 HFILES= breakpoint.h buildsym.h call-cmds.h command.h defs.h environ.h \
255 expression.h frame.h gdbcmd.h gdbcore.h gdbtypes.h \
256 ieee-float.h inferior.h minimon.h objfiles.h partial-stab.h \
257 signals.h symfile.h symtab.h solib.h xcoffsolib.h \
258 target.h terminal.h tm-68k.h tm-i960.h tm-sunos.h tm-sysv4.h \
259 xm-m68k.h xm-sysv4.h language.h parser-defs.h value.h xm-vax.h
260
261 REMOTE_EXAMPLES = m68k-stub.c i386-stub.c rem-multi.shar
262
263 POSSLIBS_MAINDIR = regex.c regex.h alloca.c
264 POSSLIBS = $(POSSLIBS_MAINDIR)
265
266 TESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c
267
268 OTHERS = Makefile.in depend alldeps.mak createtags munch configure.in \
269 ChangeLog ChangeLog-9091 ChangeLog-3.x gdb.1 refcard.ps \
270 README TODO TAGS WHATS.NEW Projects \
271 .gdbinit COPYING $(YYFILES) \
272 copying.c Convex.notes copying.awk \
273 saber.suppress standalone.c stuff.c kdb-start.c \
274 putenv.c
275
276 # Subdirectories of gdb, which should be included in their entirety in
277 # gdb-xxx.tar.Z:
278 TARDIRS = doc # tests
279
280 # GDB "info" files, which should be included in their entirety
281 INFOFILES = gdb.info*
282
283 DEPFILES= ${TDEPFILES} ${XDEPFILES}
284
285 SOURCES=$(SFILES) $(ALLDEPFILES) $(YYFILES)
286 TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
287 TAGFILES_MAINDIR = $(SFILES_MAINDIR) $(ALLDEPFILES_MAINDIR) \
288 ${HFILES} ${ALLPARAM} ${POSSLIBS_MAINDIR}
289 TARFILES = ${TAGFILES_MAINDIR} ${OTHERS} ${REMOTE_EXAMPLES}
290
291 OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
292 values.o eval.o valops.o valarith.o valprint.o printcmd.o \
293 symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \
294 command.o utils.o expprint.o environ.o version.o gdbtypes.o \
295 copying.o $(DEPFILES) ${DEMANGLER}.o mem-break.o target.o \
296 inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \
297 buildsym.o objfiles.o minsyms.o \
298 dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o
299
300 RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
301
302 TSOBS = core.o inflow.o
303
304 NTSOBS = standalone.o
305
306 TSSTART = /lib/crt0.o
307
308 NTSSTART = kdb-start.o
309
310 SUBDIRS = doc
311
312 # For now, shortcut the "configure GDB for fewer languages" stuff.
313 YYFILES = c-exp.tab.c m2-exp.tab.c
314 YYOBJ = c-exp.tab.o m2-exp.tab.o
315
316 # Prevent Sun make from putting in the machine type. Setting
317 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
318 .c.o:
319 ${CC} -c ${INTERNAL_CFLAGS} $<
320
321 all: gdb
322 $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)"
323 check:
324 info: force
325 $(MAKE) subdir_do DO=info "DODIRS=$(SUBDIRS)" "MAKEINFO=$(MAKEINFO)"
326 install-info: force
327 $(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)"
328 clean-info: force
329 $(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)"
330
331 gdb.z:gdb.1
332 nroff -man $(srcdir)/gdb.1 | col -b > gdb.t
333 pack gdb.t ; rm -f gdb.t
334 mv gdb.t.z gdb.z
335
336 install: gdb
337 $(INSTALL_PROGRAM) gdb $(bindir)/$(program_prefix)gdb
338 $(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$(program_prefix)gdb.1
339 $(M_INSTALL)
340 $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)"
341
342 init.c: $(srcdir)/munch $(OBS) $(TSOBS)
343 $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
344
345 gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${CDEPS} init.o
346 ${CC-LD} $(LDFLAGS) -o gdb init.o $(OBS) $(TSOBS) $(ADD_FILES) \
347 $(CLIBS) $(LOADLIBES)
348
349 saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
350 #setopt load_flags $(CFLAGS) -I$(BFD_DIR) -DHOST_SYS=SUN4_SYS
351 #load ./init.c $(SFILES)
352 #unload ${srcdir}/c-exp.y ${srcdir}/m2-exp.y ${srcdir}/vx-share/*.h
353 #unload ${srcdir}/nindy-share/[A-Z]*
354 #load c-exp.tab.c m2-exp.tab.c
355 #load copying.c version.c
356 #load ../libiberty/libiberty.a
357 #load ../bfd/libbfd.a
358 #load ../readline/libreadline.a
359 #load ../mmalloc/libmmalloc.a
360 #load -ltermcap
361 #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
362 echo "Load .c corresponding to:" $(DEPFILES)
363
364
365 # This is useful when debugging GDB, because some Unix's don't let you run GDB
366 # on itself without copying the executable. So "make gdb1" will make
367 # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
368 # Removing gdb1 before the copy is the right thing if gdb1 is open
369 # in another process.
370 gdb1: gdb
371 rm -f gdb1
372 cp gdb gdb1
373
374 # This is a remote stub which runs under unix and starts up an
375 # inferior process. This is at least useful for debugging GDB's
376 # remote support.
377 rapp: $(RAPP_OBS)
378 rm -f rapp_init.c
379 ${srcdir}/munch ${MUNCH_DEFINE} ${RAPP_OBS} > rapp_init.c
380 ${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS)
381
382 # Support for building Makefile out of configured pieces, automatically
383 # generated dependencies, etc. alldeps.mak is a file that contains
384 # "make" variable definitions for all ALLDEPFILES, ALLDEPFILES_MAINDIR,
385 # ALLDEPFILES_SUBDIR, ALLPARAM, and ALLCONFIG, all cadged from the current
386 # contents of the config subdirectory.
387
388 alldeps.mak: ${srcdir}/config
389 rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp
390 for i in `ls -d ${srcdir}/config/*.m[ht]` ; do \
391 echo $$i >>allconfig.tmp; \
392 awk <$$i ' \
393 $$1 == "TDEPFILES=" || $$1 == "XDEPFILES=" { \
394 for (i = 2; i <= NF; i++) \
395 print $$i >> "alldeps.tmp" ; \
396 } \
397 $$1 == "TM_FILE=" || $$1 == "XM_FILE=" { \
398 print $$2 >> "allparam.tmp" }' ; \
399 done
400 sort <alldeps.tmp | uniq | \
401 sed -e 's/arm-convert.o/arm-convert.s/' \
402 -e 's!^Onindy.o!nindy-share/Onindy.c!' \
403 -e 's!^nindy.o!nindy-share/nindy.c!' \
404 -e 's!ttybreak.o!nindy-share/ttybreak.c!' \
405 -e 's!ttyflush.o!nindy-share/ttyflush.c!' \
406 -e 's!xdr_ld.o!vx-share/xdr_ld.c!' \
407 -e 's!xdr_ptrace.o!vx-share/xdr_ptrace.c!' \
408 -e 's!xdr_rdb.o!vx-share/xdr_rdb.c!' \
409 -e 's!xdr_regs.o!vx-share/xdr_regs.c!' \
410 -e 's!udr.o!29k-share/udi/udr.c!' \
411 -e 's!yank.o!29k-share/dfe/yank.c!' \
412 -e 's!udip2soc.o!29k-share/udi/udip2soc.c!' \
413 -e 's!mini2udi.o!29k-share/dfe/mini2udi.c!' \
414 -e 's/\.o/.c/' \
415 >alldeps2.tmp
416 echo '# Start of "alldeps.mak" definitions' \
417 >>alldeps.mak;
418 echo 'ALLDEPFILES = $$(ALLDEPFILES_MAINDIR) $$(ALLDEPFILES_SUBDIR)' \
419 >>alldeps.mak;
420 grep -v / alldeps2.tmp | \
421 awk 'BEGIN {printf "ALLDEPFILES_MAINDIR="} \
422 NR == 0 {printf $$0;} \
423 NR != 0 {printf "\\\n" $$0} \
424 END {printf "\n\n"}' >>alldeps.mak;
425 grep / alldeps2.tmp | \
426 awk 'BEGIN {printf "ALLDEPFILES_SUBDIR="} \
427 NR == 0 {printf $$0;} \
428 NR != 0 {printf "\\\n" $$0} \
429 END {printf "\n\n"}' >>alldeps.mak;
430 sort <allparam.tmp | uniq | awk 'BEGIN {printf "ALLPARAM="} \
431 NR == 0 {printf $$0;} \
432 NR != 0 {printf "\\\n" $$0} \
433 END {printf "\n\n"}' >>alldeps.mak;
434 sort <allconfig.tmp | uniq | awk 'BEGIN {printf "ALLCONFIG="} \
435 NR == 0 {printf $$0;} \
436 NR != 0 {printf "\\\n" $$0} \
437 END {printf "\n\n"}' >>alldeps.mak;
438 echo '# End of "alldeps.mak" definitions' \
439 >>alldeps.mak;
440 rm -f alldeps.tmp alldeps2.tmp allparam.tmp allconfig.tmp
441
442 # The sed script makes everything which depends on {x,t}m.h depend on
443 # config.status as well, in case someone reconfigures gdb out from
444 # under an already compiled gdb.
445 depend: $(SOURCES) Makefile.in
446 @echo Ignore errors about non-existent system-supplied include files
447 @echo for systems other than the one you are using.
448 @echo Also ignore parse errors in valops.c, and any errors in
449 @echo arm-convert.s.
450 touch xm.h tm.h
451 -$(GCC) -MM -nostdinc -I/usr/include $(CFLAGS) -I$(BFD_DIR) \
452 $(INCLUDE_CFLAGS) `ls $(SOURCES) | grep -v '\.[hy]$$' | \
453 sort -u` >depend.tmp
454 # If running in srcdir, translate "./foo.c" into "$srcdir/foo.c" except
455 # for xm.h and tm.h. This allows the same "depend" file to be used
456 # by the various subdirectories.
457 if [ "${srcdir}" = "." ] ; then \
458 <depend.tmp sed \
459 -e 's; ./xm.h; xm.h;g' \
460 -e 's; ./tm.h; tm.h;g' \
461 -e 's; \./; $${srcdir}/;g' \
462 -e 's; vx-share/; $${srcdir}/vx-share/;g' \
463 -e 's; nindy-share/; $${srcdir}/nindy-share/;g' \
464 -e 's; 29k-share/; $${srcdir}/29k-share/;g' \
465 >depend.tm2; \
466 rm depend.tmp; \
467 mv depend.tm2 depend.tmp; \
468 fi
469 <depend.tmp sed \
470 -e 's; [xt]m.h;& config.status;g' \
471 -e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g' \
472 -e 's; $(READLINE_DIR)/; $(READLINE_DEP)/;g' \
473 -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g' \
474 -e 's; ./xm.h; xm.h config.status;g' \
475 -e 's; ./tm.h; tm.h config.status;g' \
476 >depend
477 rm depend.tmp
478
479 config.status:
480 @echo "You must configure gdb. Look at the README file for details."
481 @false
482
483 # These are not generated by "make depend" because they only are there
484 # for some machines.
485 # But these rules don't do what we want; we want to hack the foo.o: tm.h
486 # dependency to do the right thing.
487 tm-isi.h tm-sun3.h tm-news.h tm-hp300bsd.h tm-altos.h: tm-68k.h
488 tm-hp300hpux.h tm-sun2.h tm-3b1.h: tm-68k.h
489 xm-news1000.h: xm-news.h
490 xm-i386-sv32.h: xm-i386.h
491 tm-i386gas.h: tm-i386.h
492 xm-sun4os4.h: xm-sparc.h
493 tm-sun4os4.h: tm-sparc.h
494 xm-vaxult.h: xm-vax.h
495 xm-vaxbsd.h: xm-vax.h
496
497 kdb: $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${CDEPS}
498 rm -f init.c
499 $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(NTSOBS) > init.c
500 $(CC) $(LDFLAGS) -c init.c $(CLIBS)
501 ld -o kdb $(NTSSTART) $(OBS) $(NTSOBS) init.o $(ADD_FILES) \
502 -lc $(CLIBS)
503
504 # Put the proper machine-specific files first.
505 # createtags will edit the .o in DEPFILES into .c
506 TAGS: ${TAGFILES}
507 $(srcdir)/createtags $(TM_FILE) ${XM_FILE} $(DEPFILES) ${TAGFILES}
508 tags: TAGS
509
510 # Making distributions of GDB and friends.
511
512 # Make a directory `proto-gdb.dir' that contains an image of the GDB
513 # directory of the distribution, built up with symlinks.
514 make-proto-gdb.dir: force_update
515 $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
516 $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1
517
518 # Make a tar file containing the GDB directory of the distribution.
519 gdb.tar.Z: force_update
520 $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
521 $(MAKE) $(MFLAGS) -f Makefile.in gdb-$(VERSION).tar.Z
522
523 # Set up the GDB directory for distribution, by building all files that
524 # are products of other files.
525 setup-to-dist: force_update
526 ../configure none
527 rm -f alldeps.mak
528 $(MAKE) $(MFLAGS) alldeps.mak
529 ../configure none
530 rm -f depend
531 $(MAKE) $(MFLAGS) depend
532 ../configure none
533 (cd doc; $(MAKE) $(MFLAGS) gdbVN.m4)
534 $(MAKE) $(MFLAGS) gdb.info
535 $(MAKE) $(MFLAGS) refcard.ps
536
537 # Build a tar file from a proto-gdb.dir.
538 gdb-$(VERSION).tar.Z: force_update
539 rm -f gdb.tar gdb-$(VERSION).tar.Z
540 $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1
541 ln -s proto-gdb.dir $(DIST)
542 tar chf - $(DIST) | compress >gdb-$(VERSION).tar.Z
543 rm -rf $(DIST) proto-gdb.dir
544
545 # Build a proto-gdb.dir after GDB has been set up for distribution.
546 # This stuff must be run in `Makefile', not `Makefile.in`; we use the makefile
547 # built in the setup-to-dist process, since it defines things like ALLCONFIG
548 # and ALLDEPFILES, that we need.
549 make-proto-gdb-1: ${TARFILES} ${TARDIRS} gdb.info
550 rm -rf proto-gdb.dir
551 mkdir proto-gdb.dir
552 cd proto-gdb.dir ; for i in ${TARFILES} ; do ln -s ../$$i . ; done
553 cd proto-gdb.dir ; ln -s ../${INFOFILES} .
554 cd proto-gdb.dir ; for i in ${TARDIRS}; do \
555 mkdir $$i; cd $$i; \
556 ln -s ../../$$i/* .; \
557 rm -rf SCCS CVS.adm RCS config.status; \
558 if test -f Makefile.in; then rm Makefile; else true; fi; done
559 mkdir proto-gdb.dir/config
560 cd proto-gdb.dir/config ; \
561 for i in $(ALLCONFIG) ; do ln -s ../../$$i ../$$i ; done
562 mkdir proto-gdb.dir/vx-share proto-gdb.dir/nindy-share \
563 proto-gdb.dir/29k-share
564 mkdir proto-gdb.dir/29k-share/include proto-gdb.dir/29k-share/udi
565 mkdir proto-gdb.dir/29k-share/dfe
566 cd proto-gdb.dir/config ; \
567 for i in $(SFILES_SUBDIR) $(NONSRC_SUBDIR) $(ALLDEPFILES_SUBDIR); \
568 do ln -s ../../$$i ../$$i ; done
569 chmod og=u `find . -print`
570
571 clean:
572 rm -f *.o ${ADD_FILES} *~
573 rm -f init.c version.c
574 rm -f gdb core gdb.tar gdb.tar.Z make.log
575 rm -f gdb[0-9]
576 @$(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)"
577
578 distclean: clean c-exp.tab.c m2-exp.tab.c TAGS
579 rm -f tm.h xm.h config.status
580 rm -f y.output yacc.acts yacc.tmp
581 rm -f ${TESTS} Makefile depend
582 @$(MAKE) subdir_do DO=distclean "DODIRS=$(SUBDIRS)"
583
584 realclean: clean
585 rm -f c-exp.tab.c m2-exp.tab.c TAGS
586 rm -f tm.h xm.h config.status
587 rm -f Makefile depend
588 @$(MAKE) subdir_do DO=realclean "DODIRS=$(SUBDIRS)"
589
590 STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
591
592 subdir_do: force
593 @for i in $(DODIRS); do \
594 if [ -d ./$$i ] ; then \
595 if (cd ./$$i; \
596 $(MAKE) \
597 "against=$(against)" \
598 "AR=$(AR)" \
599 "AR_FLAGS=$(AR_FLAGS)" \
600 "CC=$(CC)" \
601 "CFLAGS=$(CFLAGS)" \
602 "RANLIB=$(RANLIB)" \
603 "MAKEINFO=$(MAKEINFO)" \
604 "INSTALL=$(INSTALL)" \
605 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
606 "INSTALL_DATA=$(INSTALL_DATA)" \
607 "BISON=$(BISON)" $(DO)) ; then true ; \
608 else exit 1 ; fi ; \
609 else true ; fi ; \
610 done
611
612 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
613 $(SHELL) ./config.status
614
615 force:
616
617 # Documentation!
618 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
619 refcard.dvi: $(srcdir)/doc/refcard.tex
620 ( cd ./doc; $(MAKE) refcard.dvi )
621 mv ./doc/refcard.dvi .
622
623 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
624 refcard.ps: $(srcdir)/doc/refcard.tex
625 ( cd ./doc; $(MAKE) refcard.ps )
626 mv ./doc/refcard.ps .
627
628 # GDB MANUAL: TeX dvi file
629 gdb.dvi: ./doc/gdb-all.texi
630 ( cd ./doc; $(MAKE) M4=$(M4) gdb.dvi )
631 mv ./doc/gdb.dvi .
632
633 # GDB MANUAL: info file
634 gdb.info: ./doc/gdb-all.texi
635 ( cd ./doc; $(MAKE) M4=$(M4) gdb.info )
636 mv ./doc/gdb.info* .
637
638 ./doc/gdb-all.texi:
639 (cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb-all.texi)
640
641 # Make copying.c from COPYING
642 copying.c: ${srcdir}/COPYING ${srcdir}/copying.awk
643 awk -f ${srcdir}/copying.awk < ${srcdir}/COPYING > copying.c
644
645 version.c: Makefile.in
646 echo 'char *version = "$(VERSION)";' >version.c
647
648 # c-exp.tab.c is generated in target dir from c-exp.y if it doesn't exist
649 # in srcdir, then compiled in target dir to c-exp.tab.o.
650 c-exp.tab.o: c-exp.tab.c
651 c-exp.tab.c: $(srcdir)/c-exp.y
652 @echo 'Expect 4 shift/reduce conflicts.'
653 ${YACC} $(srcdir)/c-exp.y
654 -mv y.tab.c c-exp.tab.c
655
656 # m2-exp.tab.c is generated in target dir from m2-exp.y if it doesn't exist
657 # in srcdir, then compiled in target dir to m2-exp.tab.o.
658 m2-exp.tab.o: m2-exp.tab.c
659 m2-exp.tab.c: $(srcdir)/m2-exp.y
660 ${YACC} $(srcdir)/m2-exp.y
661 -mv y.tab.c m2-exp.tab.c
662
663 # The symbol-file readers have dependencies on BFD header files.
664 dbxread.o: ${srcdir}/dbxread.c
665 ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
666
667 coffread.o: ${srcdir}/coffread.c
668 ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/coffread.c
669
670 mipsread.o: ${srcdir}/mipsread.c
671 ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/mipsread.c
672
673 elfread.o: ${srcdir}/elfread.c
674 ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/elfread.c
675
676 dwarfread.o: ${srcdir}/dwarfread.c
677 ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dwarfread.c
678
679 xcoffread.o: ${srcdir}/xcoffread.c
680 ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffread.c
681
682 xcoffexec.o: ${srcdir}/xcoffexec.c
683 ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffexec.c
684
685 # Drag in the files that are in another directory.
686
687 xdr_ld.o: ${srcdir}/vx-share/xdr_ld.c
688 ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_ld.c
689
690 xdr_ptrace.o: ${srcdir}/vx-share/xdr_ptrace.c
691 ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_ptrace.c
692
693 xdr_rdb.o: ${srcdir}/vx-share/xdr_rdb.c
694 ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_rdb.c
695
696 xdr_regs.o: ${srcdir}/vx-share/xdr_regs.c
697 ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_regs.c
698
699 nindy.o: ${srcdir}/nindy-share/nindy.c
700 ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/nindy.c
701
702 Onindy.o: ${srcdir}/nindy-share/Onindy.c
703 ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/Onindy.c
704
705 ttybreak.o: ${srcdir}/nindy-share/ttybreak.c
706 ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/ttybreak.c
707
708 ttyflush.o: ${srcdir}/nindy-share/ttyflush.c
709 ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/ttyflush.c
710
711 udr.o: ${srcdir}/29k-share/udi/udr.c
712 ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/29k-share/udi/udr.c
713
714 udip2soc.o: ${srcdir}/29k-share/udi/udip2soc.c
715 ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/29k-share/udi/udip2soc.c
716
717 mini2udi.o: ${srcdir}/29k-share/dfe/mini2udi.c
718 ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/29k-share/dfe/mini2udi.c
719
720 yank.o: ${srcdir}/29k-share/dfe/yank.c
721 ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/29k-share/dfe/yank.c
722
723 lint: $(LINTFILES)
724 $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
725 `echo ${DEPFILES} | sed 's/\.o /\.c /g'
726
727 gdb.cxref: $(SFILES)
728 cxref -I. $(SFILES) >gdb.cxref
729
730 force_update:
731
732 # Generate the demangler linked in with gdb. Also create a standalone
733 # demangler if so desired ("make demangle").
734
735 ${DEMANGLER}.o: ${DEMANGLER}.c
736 ${CC} -c ${INTERNAL_CFLAGS} ${DEMANGLE_OPTS} \
737 `echo ${srcdir}/${DEMANGLER}.c | sed 's,^\./,,'`
738
739 demangle: ${DEMANGLER}.c
740 ${CC} -o $@ -DMAIN ${INTERNAL_CFLAGS} ${DEMANGLE_OPTS} \
741 `echo ${srcdir}/${DEMANGLER}.c | sed 's,^\./,,'`
742
743 # GNU Make has an annoying habit of putting *all* the Makefile variables
744 # into the environment, unless you include this target as a circumvention.
745 # Rumor is that this will be fixed (and this target can be removed)
746 # in GNU Make 4.0.
747 .NOEXPORT:
748
749 # This is the end of "Makefile.in". When built into "Makefile"
750 # by the configure script, two things are added below this point:
751 # alldeps.mak -- defintions of all files that are used in
752 # host- or target-dependent configurations
753 # depend -- what .o files depend on what .c and .h files,
754 # for all configurations.
755
756
This page took 0.042015 seconds and 3 git commands to generate.