]> Git Repo - binutils.git/blame - gdb/Makefile.in
Fix miscellaneous comparisons of integer with NULL that elicit compiler
[binutils.git] / gdb / Makefile.in
CommitLineData
3e5afc2c
RP
1##Copyright (C) 1989-1991 Free Software Foundation, Inc.
2
3# This file is part of GDB.
4
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19prefix = /usr/local
20
21bindir = $(prefix)/bin
22datadir = $(prefix)/lib
23libdir = $(prefix)/lib
24mandir = $(datadir)/man
25man1dir = $(mandir)/man1
26man2dir = $(mandir)/man2
27man3dir = $(mandir)/man3
28man4dir = $(mandir)/man4
29man5dir = $(mandir)/man5
30man6dir = $(mandir)/man6
31man7dir = $(mandir)/man7
32man8dir = $(mandir)/man8
33man9dir = $(mandir)/man9
34infodir = $(prefix)/info
35includedir = $(prefix)/include
36docdir = $(datadir)/doc
37
38SHELL = /bin/sh
39
40INSTALL = install -c
41INSTALL_PROGRAM = $(INSTALL)
42INSTALL_DATA = $(INSTALL)
43
44AR = ar
45AR_FLAGS = qv
46RANLIB = ranlib
47
48#### Host, target, and site specific Makefile fragments come in here.
49###
50
51# Host and target-dependent makefile fragments come in here.
52####
53# End of host and target-dependent makefile fragments
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 = .
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
77BISON=bison -y
78BISONFLAGS=
79YACC=$(BISON) $(BISONFLAGS)
80# YACC=yacc
81MAKE=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
86M4=gm4
87
88# where to find texinfo; GDB dist should include a recent one
89TEXIDIR=${srcdir}/../texinfo/fsf
90
91# where to find makeinfo, preferably one designed for texinfo-2
92MAKEINFO=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
97CC-LD=${CC}
98
99# define this to be "gmalloc.o" if you want to use the gnu malloc routine
100# (useful for debugging memory allocation problems in gdb). To use your
101# system malloc, uncomment the following two lines.
102#GNU_MALLOC =
103#MALLOC_CFLAGS = -DNO_MALLOC_CHECK
104GNU_MALLOC = gmalloc.o mcheck.o mtrace.o
105MALLOC_CFLAGS =
106
107# Where is the "include" directory? Traditionally ../include or ./include
108INCLUDE_DIR = ${srcdir}/../include
109INCLUDE_DEP = $$(INCLUDE_DIR)
110
111# Where is the source dir for the BFD library? Traditionally ../bfd or ./bfd
112# (When we want the binary library built from it, we use ${BFD_DIR}${subdir}.)
113BFD_DIR = ${srcdir}/../bfd
114BFD_DEP = $$(BFD_DIR)
115BFD_LIB = $(unsubdir)/../bfd${subdir}/libbfd.a
116
117# Where is the source dir for the READLINE library? Traditionally in .. or .
118# (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
119READLINE_DIR = ${srcdir}/../readline
120READLINE_DEP = $$(READLINE_DIR)
121RL_LIB = $(unsubdir)/../readline${subdir}/libreadline.a
122
123# All the includes used for CFLAGS and for lint.
124# -I. for config files.
125# -I${srcdir} possibly for regex.h also.
126INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR) -I$(READLINE_DIR) -I${srcdir}/vx-share
127
128# {X,T}M_CFLAGS, if defined, has system-dependent CFLAGS.
129# CFLAGS for GDB
130MINUS_G=-g
131GLOBAL_CFLAGS = ${MINUS_G} ${TM_CFLAGS} ${XM_CFLAGS}
132#PROFILE_CFLAGS = -pg
133
134CFLAGS = ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MALLOC_CFLAGS} ${INCLUDE_CFLAGS}
135# None of the things in CFLAGS will do any harm, and on some systems
136# (e.g. SunOS4) it is important to use the M_CFLAGS.
137LDFLAGS = $(CFLAGS)
138
139# Where is the "-liberty" library, containing getopt and obstack?
140LIBIBERTY_DIR = ${srcdir}/../libiberty
141LIBIBERTY = $(unsubdir)/../libiberty${subdir}/libiberty.a
142
143# Flags that describe where you can find the termcap library.
144# You may need to make other arrangements for USG.
145TERMCAP = -ltermcap
146
147# The config/mh-* file must define REGEX and REGEX1 on USG machines.
148# If your sysyem is missing alloca(), or, more likely, it's there but
149# it doesn't work, define ALLOCA & ALLOCA1 too.
150# If your system is missing putenv(), add putenv.c to XM_ADD_FILES.
151
152# Libraries and corresponding dependencies for compiling gdb.
153# {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
154# TERMCAP comes after readline, since readline depends on it.
155CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${LIBIBERTY} ${XM_CLIBS} ${TM_CLIBS}
156CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${LIBIBERTY} ${RL_LIB}
157
158ADD_FILES = ${REGEX} ${ALLOCA} ${GNU_MALLOC} ${XM_ADD_FILES} ${TM_ADD_FILES}
159ADD_DEPS = ${REGEX1} ${ALLOCA1} ${GNU_MALLOC} ${XM_ADD_FILES} ${TM_ADD_FILES}
160
161VERSION = 4.3
162DIST=gdb
163
164LINT=/usr/5bin/lint
165LINTFLAGS= -I${BFD_DIR}
166
167# Source files in the main directory.
168# Files which are included via a config/* Makefile fragment
169# should *not* be specified here; they're in "ALLDEPFILES".
170SFILES_MAINDIR = \
171 blockframe.c breakpoint.c command.c core.c \
172 environ.c eval.c expprint.c findvar.c infcmd.c inflow.c infrun.c \
173 main.c printcmd.c \
174 remote.c source.c stack.c symmisc.c symtab.c symfile.c \
175 utils.c valarith.c valops.c valprint.c values.c c-exp.y m2-exp.y \
176 signame.c cplus-dem.c mem-break.c target.c inftarg.c \
177 dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c \
178 ieee-float.c language.c parse.c buildsym.c
179
180# Source files in subdirectories (which will be handled separately by
181# 'make gdb.tar.Z').
182# Files which are included via a config/* Makefile fragment
183# should *not* be specified here; they're in "ALLDEPFILES".
184SFILES_SUBDIR = \
185 ${srcdir}/vx-share/dbgRpcLib.h \
186 ${srcdir}/vx-share/ptrace.h \
187 ${srcdir}/vx-share/reg.h \
188 ${srcdir}/vx-share/vxTypes.h \
189 ${srcdir}/vx-share/vxWorks.h \
190 ${srcdir}/vx-share/wait.h \
191 ${srcdir}/vx-share/xdr_ld.h \
192 ${srcdir}/vx-share/xdr_ptrace.h \
193 ${srcdir}/vx-share/xdr_rdb.h \
194 ${srcdir}/vx-share/xdr_regs.h \
195 ${srcdir}/nindy-share/b.out.h \
196 ${srcdir}/nindy-share/block_io.h \
197 ${srcdir}/nindy-share/coff.h \
198 ${srcdir}/nindy-share/demux.h \
199 ${srcdir}/nindy-share/env.h \
200 ${srcdir}/nindy-share/stop.h \
201 ${srcdir}/nindy-share/ttycntl.h
202
203# Non-source files in subdirs, that should go into gdb.tar.Z.
204NONSRC_SUBDIR = \
205 ${srcdir}/nindy-share/Makefile \
206 ${srcdir}/nindy-share/VERSION
207
208# All source files that go into linking GDB, except config-specified files.
209SFILES = $(SFILES_MAINDIR) $(SFILES_SUBDIR)
210
211# All source files that lint should look at
212LINTFILES = $(SFILES) $(YYFILES) init.c
213
214# Any additional files specified on these lines should also be added to
215# the OTHERS = definition below, so they go in the tar files.
216SFILES_STAND = $(SFILES) standalone.c
217SFILES_KGDB = $(SFILES) stuff.c kdb-start.c
218
219# Header files that are not named in config/* Makefile fragments go here.
220HFILES= breakpoint.h buildsym.h command.h defs.h environ.h \
221 expression.h frame.h gdbcmd.h gdbcore.h \
222 ieee-float.h inferior.h minimon.h \
223 signals.h signame.h symfile.h symtab.h \
224 target.h terminal.h tm-68k.h tm-i960.h tm-sunos.h tm-svr4.h \
225 xm-m68k.h xm-svr4.h language.h parser-defs.h value.h
226
227# Header files for machine opcode tables.
228# when OPCODE_DIR changes to ../include, remove the whole $(OPCODES)
229# business, since they will be put into the GDB release files by somebody else.
230OPCODE_DIR =
231OPCODES = $(OPCODE_DIR)pn-opcode.h $(OPCODE_DIR)np1-opcode.h \
232 $(OPCODE_DIR)sparc-opcode.h $(OPCODE_DIR)vax-opcode.h \
233 $(OPCODE_DIR)m68k-opcode.h $(OPCODE_DIR)ns32k-opcode.h \
234 $(OPCODE_DIR)convx-opcode.h $(OPCODE_DIR)pyr-opcode.h \
235 $(OPCODE_DIR)mips-opcode.h $(OPCODE_DIR)am29k-opcode.h \
236 $(OPCODE_DIR)arm-opcode.h $(OPCODE_DIR)m88k-opcode.h \
237 $(OPCODE_DIR)tahoe-opcode.h $(OPCODE_DIR)rs6k-opcode.h
238
239REMOTE_EXAMPLES = m68k-stub.c i386-stub.c rem-multi.shar
240
241MALLOCSRC = gmalloc.c mcheck.c mtrace.c mtrace.awk \
242 ansidecl.h gmalloc.h
243
244POSSLIBS_MAINDIR = regex.c regex.h alloca.c $(MALLOCSRC)
245POSSLIBS = $(POSSLIBS_MAINDIR)
246
247TESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c
248
249OTHERS = Makefile.in depend alldeps.mak createtags munch configure.in \
250 ChangeLog ChangeLog-3.x gdb.1 refcard.ps \
251 README TODO TAGS WHATS.NEW Projects \
252 .gdbinit COPYING $(YYFILES) \
253 copying.c Convex.notes copying.awk \
254 saber.suppress standalone.c stuff.c kdb-start.c \
255 putenv.c
256
257# Subdirectories of gdb, which should be included in their entirety in
258# gdb-xxx.tar.Z:
259TARDIRS = doc # tests
260
261# GDB "info" files, which should be included in their entirety
262INFOFILES = gdb.info*
263
264DEPFILES= ${TDEPFILES} ${XDEPFILES}
265
266SOURCES=$(SFILES) $(ALLDEPFILES) $(YYFILES)
267TAGFILES = $(SOURCES) ${HFILES} ${OPCODES} ${ALLPARAM} ${POSSLIBS}
268TAGFILES_MAINDIR = $(SFILES_MAINDIR) $(ALLDEPFILES_MAINDIR) \
269 ${HFILES} ${OPCODES} ${ALLPARAM} ${POSSLIBS_MAINDIR}
270TARFILES = ${TAGFILES_MAINDIR} ${OTHERS} ${REMOTE_EXAMPLES}
271
272OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
273 values.o eval.o valops.o valarith.o valprint.o printcmd.o \
274 symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \
275 command.o utils.o expprint.o environ.o version.o \
276 copying.o $(DEPFILES) signame.o cplus-dem.o mem-break.o target.o \
277 inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \
278 buildsym.o \
279 dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o # mipsread.o
280
281RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
282
283TSOBS = core.o inflow.o
284
285NTSOBS = standalone.o
286
287TSSTART = /lib/crt0.o
288
289NTSSTART = kdb-start.o
290
291SUBDIRS = doc
292
293# For now, shortcut the "configure GDB for fewer languages" stuff.
294YYFILES = c-exp.tab.c m2-exp.tab.c
295YYOBJ = c-exp.tab.o m2-exp.tab.o
296
297# Prevent Sun make from putting in the machine type. Setting
298# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
299.c.o:
300 ${CC} -c ${CFLAGS} $<
301
302all: gdb
303 $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)"
304info: force
305 $(MAKE) subdir_do DO=info "DODIRS=$(SUBDIRS)"
306install-info: force
307 $(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)"
308clean-info: force
309 $(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)"
310
311gdb.z:gdb.1
312 nroff -man $(srcdir)/gdb.1 | col -b > gdb.t
313 pack gdb.t ; rm -f gdb.t
314 mv gdb.t.z gdb.z
315
316install: gdb
317 $(INSTALL_PROGRAM) gdb $(bindir)/gdb
318 $(M_INSTALL)
319 $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)"
320
321init.c: $(srcdir)/munch $(OBS) $(TSOBS)
322 $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
323
324gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${CDEPS} init.o
325 ${CC-LD} $(LDFLAGS) -o gdb init.o $(OBS) $(TSOBS) $(ADD_FILES) \
326 $(CLIBS) $(LOADLIBES)
327
328saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
329 #setopt load_flags $(CFLAGS) -I$(BFD_DIR) -DHOST_SYS=SUN4_SYS
330 #load ./init.c $(SFILES)
331 #unload ${srcdir}/c-exp.y ${srcdir}/m2-exp.y ${srcdir}/vx-share/*.h
332 #unload ${srcdir}/nindy-share/[A-Z]*
333 #load c-exp.tab.c m2-exp.tab.c
334 #load copying.c version.c
335 #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
336 #load ${LIBIBERTY_DIR}/*.c
337 #load ${BFD_DIR}/*.c
338 #load ${READLINE_DIR}/*.c
339 #load -ltermcap
340 ##void mcheck(a) void (*a)(); { }
341 ##void mtrace() { }
342
343
344
345# This is useful when debugging GDB, because some Unix's don't let you run GDB
346# on itself without copying the executable. So "make gdb1" will make
347# gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
348# Removing gdb1 before the copy is the right thing if gdb1 is open
349# in another process.
350gdb1: gdb
351 rm -f gdb1
352 cp gdb gdb1
353
354# This is a remote stub which runs under unix and starts up an
355# inferior process. This is at least useful for debugging GDB's
356# remote support.
357rapp: $(RAPP_OBS)
358 rm -f rapp_init.c
359 ${srcdir}/munch ${MUNCH_DEFINE} ${RAPP_OBS} > rapp_init.c
360 ${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS)
361
362# Support for building Makefile out of configured pieces, automatically
363# generated dependencies, etc. alldeps.mak is a file that contains
364# "make" variable definitions for all ALLDEPFILES, ALLDEPFILES_MAINDIR,
365# ALLDEPFILES_SUBDIR, ALLPARAM, and ALLCONFIG, all cadged from the current
366# contents of the config subdirectory.
367
368alldeps.mak: ${srcdir}/config
369 rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp
370 for i in `ls -d ${srcdir}/config/m[ht]-*` ; do \
371 echo $$i >>allconfig.tmp; \
372 awk <$$i ' \
373 $$1 == "TDEPFILES=" || $$1 == "XDEPFILES=" { \
374 for (i = 2; i <= NF; i++) \
375 print $$i >> "alldeps.tmp" ; \
376 } \
377 $$1 == "TM_FILE=" || $$1 == "XM_FILE=" { \
378 print $$2 >> "allparam.tmp" }' ; \
379 done
380 sort <alldeps.tmp | uniq | \
381 sed -e 's/arm-convert.o/arm-convert.s/' \
382 -e 's!^Onindy.o!nindy-share/Onindy.c!' \
383 -e 's!^nindy.o!nindy-share/nindy.c!' \
384 -e 's!ttybreak.o!nindy-share/ttybreak.c!' \
385 -e 's!ttyflush.o!nindy-share/ttyflush.c!' \
386 -e 's!xdr_ld.o!vx-share/xdr_ld.c!' \
387 -e 's!xdr_ptrace.o!vx-share/xdr_ptrace.c!' \
388 -e 's!xdr_rdb.o!vx-share/xdr_rdb.c!' \
389 -e 's!xdr_regs.o!vx-share/xdr_regs.c!' \
390 -e 's/\.o/.c/' \
391 >alldeps2.tmp
392 echo '# Start of "alldeps.mak" definitions' \
393 >>alldeps.mak;
394 echo 'ALLDEPFILES = $$(ALLDEPFILES_MAINDIR) $$(ALLDEPFILES_SUBDIR)' \
395 >>alldeps.mak;
396 grep -v / alldeps2.tmp | \
397 awk 'BEGIN {printf "ALLDEPFILES_MAINDIR="} \
398 NR == 0 {printf $$0;} \
399 NR != 0 {printf "\\\n" $$0} \
400 END {printf "\n\n"}' >>alldeps.mak;
401 grep / alldeps2.tmp | \
402 awk 'BEGIN {printf "ALLDEPFILES_SUBDIR="} \
403 NR == 0 {printf $$0;} \
404 NR != 0 {printf "\\\n" $$0} \
405 END {printf "\n\n"}' >>alldeps.mak;
406 sort <allparam.tmp | uniq | awk 'BEGIN {printf "ALLPARAM="} \
407 NR == 0 {printf $$0;} \
408 NR != 0 {printf "\\\n" $$0} \
409 END {printf "\n\n"}' >>alldeps.mak;
410 sort <allconfig.tmp | uniq | awk 'BEGIN {printf "ALLCONFIG="} \
411 NR == 0 {printf $$0;} \
412 NR != 0 {printf "\\\n" $$0} \
413 END {printf "\n\n"}' >>alldeps.mak;
414 echo '# End of "alldeps.mak" definitions' \
415 >>alldeps.mak;
416 rm -f alldeps.tmp alldeps2.tmp allparam.tmp allconfig.tmp
417
418# The sed script makes everything which depends on {x,t}m.h depend on
419# config.status as well, in case someone reconfigures gdb out from
420# under an already compiled gdb.
421depend: $(SOURCES) Makefile.in
422 @echo Ignore errors about non-existent system-supplied include files
423 @echo for systems other than the one you are using.
424 @echo "If xm.h and tm.h don't exist, the error messages saying so"
425 @echo can safely be ignored.
426 @echo Also ignore parse errors in valops.c, and any errors in
427 @echo arm-convert.s.
428 -$(GCC) -MM $(CFLAGS) -I$(BFD_DIR) \
429 `ls $(SOURCES) | grep -v '\.[hy]$$' |sort -u` >depend.tmp
430# If running in srcdir, translate "./foo.c" into "$srcdir/foo.c" except
431# for xm.h and tm.h. This allows the same "depend" file to be used
432# by the various subdirectories.
433 if [ "${srcdir}" = "." ] ; then \
434 <depend.tmp sed \
435 -e 's; ./xm.h; xm.h;g' \
436 -e 's; ./tm.h; tm.h;g' \
437 -e 's; \./; $${srcdir}/;g' \
438 -e 's; vx-share/; $${srcdir}/vx-share/;g' \
439 -e 's; nindy-share/; $${srcdir}/nindy-share/;g' \
440 >depend.tm2; \
441 rm depend.tmp; \
442 mv depend.tm2 depend.tmp; \
443 fi
444 <depend.tmp sed \
445 -e 's; [xt]m.h;& config.status;g' \
446 -e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g' \
447 -e 's; $(READLINE_DIR)/; $(READLINE_DEP)/;g' \
448 -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g' \
449 -e 's; ./xm.h; xm.h config.status;g' \
450 -e 's; ./tm.h; tm.h config.status;g' \
451 >depend
452 rm depend.tmp
453
454config.status:
455 @echo "You must configure gdb. Look at the README file for details."
456 @false
457
458# These are not generated by "make depend" because they only are there
459# for some machines.
460# But these rules don't do what we want; we want to hack the foo.o: tm.h
461# dependency to do the right thing.
462tm-isi.h tm-sun3.h tm-news.h tm-hp300bsd.h tm-altos.h: tm-68k.h
463tm-hp300hpux.h tm-sun2.h tm-3b1.h: tm-68k.h
464xm-news1000.h: xm-news.h
465xm-i386-sv32.h: xm-i386.h
466tm-i386gas.h: tm-i386.h
467xm-sun4os4.h: xm-sparc.h
468tm-sun4os4.h: tm-sparc.h
469
470kdb: $(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
479TAGS: ${TAGFILES}
480 $(srcdir)/createtags $(TM_FILE) ${XM_FILE} $(DEPFILES) ${TAGFILES}
481tags: 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.
487make-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.
492gdb.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.
498setup-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.
511gdb-$(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.
522make-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
540clean:
541 rm -f ${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES}
542 rm -f init.c init.o 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
547distclean: 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
553realclean: 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
559STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
560
561subdir_do: force
562 for i in $(DODIRS); do \
563 if [ -d $(unsubdir)/$$i ] ; then \
564 if (cd $(unsubdir)/$$i$(subdir); \
565 $(MAKE) \
566 "against=$(against)" \
567 "AR=$(AR)" \
568 "AR_FLAGS=$(AR_FLAGS)" \
569 "CC=$(CC)" \
570 "RANLIB=$(RANLIB)" \
571 "BISON=$(BISON)" $(DO)) ; then true ; \
572 else exit 1 ; fi ; \
573 else true ; fi ; \
574 done
575
576# Copy the object files from a particular stage into a subdirectory.
577stage1: force
578 -mkdir stage1
579 -mv -f $(STAGESTUFF) stage1
580 $(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)"
581
582stage2: force
583 -mkdir stage2
584 -mv -f $(STAGESTUFF) stage2
585 $(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)"
586
587stage3: force
588 -mkdir stage3
589 -mv -f $(STAGESTUFF) stage3
590 $(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)"
591
592against=stage2
593
594comparison: force
595 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
596 $(MAKE) subdir_do DO=comparison "DODIRS=$(SUBDIRS)"
597
598de-stage1: force
599 -(cd stage1 ; mv -f * ..)
600 -rmdir stage1
601 $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)"
602
603de-stage2: force
604 -(cd stage2 ; mv -f * ..)
605 -rmdir stage2
606 $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)"
607
608de-stage3: force
609 -(cd stage3 ; mv -f * ..)
610 -rmdir stage3
611 $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)"
612
613Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
614 $(SHELL) ./config.status
615
616force:
617
618# Documentation!
619# GDB QUICK REFERENCE (TeX dvi file, CM fonts)
620refcard.dvi: $(srcdir)/doc/refcard.tex
621 ( cd $(unsubdir)/doc; $(MAKE) refcard.dvi )
622 mv $(unsubdir)/doc/refcard.dvi .
623
624# GDB QUICK REFERENCE (PostScript output, common PS fonts)
625refcard.ps: $(srcdir)/doc/refcard.tex
626 ( cd $(unsubdir)/doc; $(MAKE) refcard.ps )
627 mv $(unsubdir)/doc/refcard.ps .
628
629# GDB MANUAL: TeX dvi file
630gdb.dvi: $(unsubdir)/doc/gdb-all.texi
631 ( cd $(unsubdir)/doc; $(MAKE) M4=$(M4) gdb.dvi )
632 mv $(unsubdir)/doc/gdb.dvi .
633
634# GDB MANUAL: info file
635gdb.info: $(unsubdir)/doc/gdb-all.texi
636 ( cd $(unsubdir)/doc; $(MAKE) M4=$(M4) gdb.info )
637 mv $(unsubdir)/doc/gdb.info* .
638
639$(unsubdir)/doc/gdb-all.texi:
640 (cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb-all.texi)
641
642# Make copying.c from COPYING
643copying.c: ${srcdir}/COPYING ${srcdir}/copying.awk
644 awk -f ${srcdir}/copying.awk < ${srcdir}/COPYING > copying.c
645
646version.c: Makefile.in
647 echo 'char *version = "$(VERSION)";' >version.c
648
649# c-exp.tab.c is generated in target dir from c-exp.y if it doesn't exist
650# in srcdir, then compiled in target dir to c-exp.tab.o.
651c-exp.tab.o: c-exp.tab.c
652c-exp.tab.c: $(srcdir)/c-exp.y
653 @echo 'Expect 4 shift/reduce conflicts.'
654 ${YACC} $(srcdir)/c-exp.y
655 -mv y.tab.c c-exp.tab.c
656
657# m2-exp.tab.c is generated in target dir from m2-exp.y if it doesn't exist
658# in srcdir, then compiled in target dir to m2-exp.tab.o.
659m2-exp.tab.o: m2-exp.tab.c
660m2-exp.tab.c: $(srcdir)/m2-exp.y
661 ${YACC} $(srcdir)/m2-exp.y
662 -mv y.tab.c m2-exp.tab.c
663
664# The symbol-file readers have dependencies on BFD header files.
665dbxread.o: ${srcdir}/dbxread.c
666 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
667
668coffread.o: ${srcdir}/coffread.c
669 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/coffread.c
670
671mipsread.o: ${srcdir}/mipsread.c
672 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/mipsread.c
673
674elfread.o: ${srcdir}/elfread.c
675 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/elfread.c
676
677xcoffread.o: ${srcdir}/xcoffread.c
678 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffread.c
679
680xcoffexec.o: ${srcdir}/xcoffexec.c
681 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffexec.c
682
683# Drag in the files that are in another directory.
684
685xdr_ld.o: ${srcdir}/vx-share/xdr_ld.c
686 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ld.c
687
688xdr_ptrace.o: ${srcdir}/vx-share/xdr_ptrace.c
689 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ptrace.c
690
691xdr_rdb.o: ${srcdir}/vx-share/xdr_rdb.c
692 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_rdb.c
693
694xdr_regs.o: ${srcdir}/vx-share/xdr_regs.c
695 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_regs.c
696
697nindy.o: ${srcdir}/nindy-share/nindy.c
698 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/nindy.c
699
700Onindy.o: ${srcdir}/nindy-share/Onindy.c
701 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/Onindy.c
702
703ttybreak.o: ${srcdir}/nindy-share/ttybreak.c
704 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttybreak.c
705
706ttyflush.o: ${srcdir}/nindy-share/ttyflush.c
707 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttyflush.c
708
709lint: $(LINTFILES)
710 $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
711 `echo ${DEPFILES} | sed 's/\.o /\.c /g'
712
713gdb.cxref: $(SFILES)
714 cxref -I. $(SFILES) >gdb.cxref
715
716force_update:
717
718# When used with GDB, the demangler should never look for leading
719# underscores because GDB strips them off during symbol read-in. Thus
720# -Dnounderscore.
721
722cplus-dem.o: cplus-dem.c
723 ${CC} -c ${CFLAGS} -Dnounderscore \
724 `echo ${srcdir}/cplus-dem.c | sed 's,^\./,,'`
725
726# GNU Make has an annoying habit of putting *all* the Makefile variables
727# into the environment, unless you include this target as a circumvention.
728# Rumor is that this will be fixed (and this target can be removed)
729# in GNU Make 4.0.
730.NOEXPORT:
731
732# This is the end of "Makefile.in". When built into "Makefile"
733# by the configure script, two things are added below this point:
734# alldeps.mak -- defintions of all files that are used in
735# host- or target-dependent configurations
736# depend -- what .o files depend on what .c and .h files,
737# for all configurations.
738
739
This page took 0.098817 seconds and 4 git commands to generate.