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