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