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