*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / Makefile.dist
CommitLineData
dd3b648e
RP
1##Copyright (C) 1989-1991 Free Software Foundation, Inc.
2
3# This file is part of GDB.
4
5# GDB 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 1, or (at your option)
8# any later version.
9
10# GDB 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 GDB; see the file COPYING. If not, write to
17# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18
e73dbe5d 19# Destination directory of the software tree build
912e0732
RP
20destdir = /usr/local
21
e73dbe5d 22# Place to install binaries in the destination tree.
912e0732 23bindir=$(destdir)/bin
dd3b648e
RP
24
25# System V: If you compile gdb with a compiler which uses the coff
26# encapsulation feature (this is a function of the compiler used, NOT
27# of the m-?.h file selected by config.gdb), you must make sure that
28# the GNU nm is the one that is used by munch.
29
30# If you are compiling with GCC, make sure that either 1) You use the
31# -traditional flag, or 2) You have the fixed include files where GCC
17563ca1 32# can reach them. Otherwise the ioctl calls in inflow.c
dd3b648e
RP
33# will be incorrectly compiled. The "fixincludes" script in the gcc
34# distribution will fix your include files up.
35#CC=cc
36#CC=gcc -traditional
37GCC=gcc
38
39VPATH=$(srcdir)
40
41# It is also possible that you will need to add -I/usr/include/sys to the
42# CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
43# is where it should be according to Posix).
44
45YACC=bison -y
46# YACC=yacc
47SHELL=/bin/sh
48MAKE=make
72f6386b
RP
49# We need either GNU m4 or SysV m4; Berkeley/Sun don't have quite enough.
50#M4=gm4
51M4=/usr/5bin/m4
dd3b648e
RP
52
53# Set this up with gcc if you have gnu ld and the loader will print out
54# line numbers for undefinded refs.
55#CC-LD=gcc -static
56CC-LD=${CC}
57
58# define this to be "gmalloc.o" if you want to use the gnu malloc routine
59# (useful for debugging memory allocation problems in gdb). To use your
60# system malloc, uncomment the following two lines.
61#GNU_MALLOC =
62#MALLOC_CFLAGS = -DNO_MALLOC_CHECK
3f2e006b 63GNU_MALLOC = gmalloc.o mcheck.o mtrace.o
dd3b648e
RP
64MALLOC_CFLAGS =
65
66# Where is the "include" directory? Traditionally ../include or ./include
67INCLUDE_DIR = ${srcdir}/../include
68INCLUDE_DEP = $$(INCLUDE_DIR)
69
77ac9392
JG
70# Where is the source dir for the BFD library? Traditionally ../bfd or ./bfd
71# (When we want the binary library built from it, we use ${BFD_DIR}${subdir}.)
dd3b648e
RP
72BFD_DIR = ${srcdir}/../bfd
73BFD_DEP = $$(BFD_DIR)
e73dbe5d 74BFD_LIB = $(BFD_DIR)${subdir}/libbfd.a
dd3b648e 75
e73dbe5d
JG
76# Where is the source dir for the READLINE library? Traditionally in .. or .
77# (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
78READLINE_DIR = ${srcdir}/../readline
79READLINE_DEP = $$(READLINE_DIR)
80RL_LIB = $(READLINE_DIR)${subdir}/libreadline.a
beff312e 81
dd3b648e
RP
82# All the includes used for CFLAGS and for lint.
83# -I. for config files.
63989338 84# -I${srcdir} possibly for regex.h also.
beff312e 85INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR) -I$(READLINE_DIR) -I${srcdir}/vx-share
dd3b648e
RP
86
87# {X,T}M_CFLAGS, if defined, has system-dependent CFLAGS.
17563ca1 88# CFLAGS for GDB
dd3b648e
RP
89GLOBAL_CFLAGS = -g ${TM_CFLAGS} ${XM_CFLAGS}
90#PROFILE_CFLAGS = -pg
91
92CFLAGS = ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MALLOC_CFLAGS} ${INCLUDE_CFLAGS}
93# None of the things in CFLAGS will do any harm, and on some systems
94# (e.g. SunOS4) it is important to use the M_CFLAGS.
95LDFLAGS = $(CFLAGS)
96
63989338 97# Where is the "-liberty" library, containing getopt and obstack?
5594d534
JG
98LIBIBERTY_DIR = ${srcdir}/../libiberty
99LIBIBERTY = ${LIBIBERTY_DIR}${subdir}/libiberty.a
dd3b648e
RP
100
101# Flags that describe where you can find the termcap library.
102# You may need to make other arrangements for USG.
103TERMCAP = -ltermcap
104
e73dbe5d 105# The xconfig file must define REGEX and REGEX1 on USG machines.
dd3b648e 106# If your sysyem is missing alloca(), or, more likely, it's there but
e73dbe5d 107# it doesn't work, define ALLOCA & ALLOCA1 too.
17563ca1 108# If your system is missing putenv(), add putenv.c to XM_ADD_FILES.
dd3b648e 109
e73dbe5d
JG
110# Libraries and corresponding dependencies for compiling gdb.
111# {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
112# TERMCAP comes last, since readline depends on it.
113CLIBS = $(XM_CLIBS) ${TM_CLIBS} ${BFD_LIB} ${LIBIBERTY} ${RL_LIB} ${TERMCAP}
114CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${LIBIBERTY} ${RL_LIB}
dd3b648e 115
17563ca1
JG
116ADD_FILES = ${REGEX} ${ALLOCA} ${GNU_MALLOC} ${XM_ADD_FILES} ${TM_ADD_FILES}
117ADD_DEPS = ${REGEX1} ${ALLOCA1} ${GNU_MALLOC} ${XM_ADD_FILES} ${TM_ADD_FILES}
dd3b648e 118
6281dfd5 119VERSION = 3.95
dd3b648e
RP
120DIST=gdb-$(VERSION)
121
122LINT=/usr/5bin/lint
123LINTFLAGS=
124
125# Source files in the main directory.
126# Files which are included via a tconfig/* or xconfig/* file
127# should *not* be specified here; they're in "ALLDEPFILES".
128SFILES_MAINDIR = \
129 blockframe.c breakpoint.c command.c core.c \
130 environ.c eval.c expprint.c findvar.c infcmd.c inflow.c infrun.c \
131 main.c printcmd.c \
132 remote.c source.c stack.c symmisc.c symtab.c symfile.c \
133 utils.c valarith.c valops.c valprint.c values.c expread.y \
134 signame.c cplus-dem.c mem-break.c target.c inftarg.c \
135 dbxread.c coffread.c \
136 ieee-float.c
137
138# Source files in subdirectories (which will be handled separately by
139# 'make gdb.tar.Z').
140# Files which are included via a tconfig/* or xconfig/* file
141# should *not* be specified here; they're in "ALLDEPFILES".
142SFILES_SUBDIR = \
143 ${srcdir}/vx-share/dbgRpcLib.h \
144 ${srcdir}/vx-share/ptrace.h \
145 ${srcdir}/vx-share/reg.h \
146 ${srcdir}/vx-share/vxTypes.h \
147 ${srcdir}/vx-share/vxWorks.h \
148 ${srcdir}/vx-share/wait.h \
149 ${srcdir}/vx-share/xdr_ld.h \
150 ${srcdir}/vx-share/xdr_ptrace.h \
151 ${srcdir}/vx-share/xdr_rdb.h \
152 ${srcdir}/vx-share/xdr_regs.h \
153 ${srcdir}/nindy-share/Makefile \
154 ${srcdir}/nindy-share/VERSION \
155 ${srcdir}/nindy-share/b.out.h \
156 ${srcdir}/nindy-share/block_io.h \
157 ${srcdir}/nindy-share/coff.h \
158 ${srcdir}/nindy-share/demux.h \
159 ${srcdir}/nindy-share/env.h \
160 ${srcdir}/nindy-share/stop.h \
161 ${srcdir}/nindy-share/ttycntl.h
162
163# All source files that go into linking GDB, except config-specified files.
164SFILES = $(SFILES_MAINDIR) $(SFILES_SUBDIR)
165
166# All source files that lint should look at
167LINTFILES = $(SFILES) expread.tab.c init.c
168
169# Any additional files specified on these lines should also be added to
170# the OTHERS = definition below, so they go in the tar files.
171SFILES_STAND = $(SFILES) standalone.c
172SFILES_KGDB = $(SFILES) stuff.c kdb-start.c
173
174# Header files that are not named in tconfig/* or xconfig/* go here.
175HFILES= breakpoint.h command.h defs.h environ.h \
176 expression.h frame.h gdbcmd.h gdbcore.h \
177 getpagesize.h ieee-float.h inferior.h param-no-tm.h param.h \
178 signals.h signame.h symfile.h symtab.h \
179 target.h tdesc.h terminal.h tm-68k.h tm-i960.h tm-sunos.h \
180 value.h
181
e73dbe5d
JG
182# Header files for machine opcode tables.
183# when OPCODE_DIR changes to ../include, remove the whole $(OPCODES)
184# business, since they will be included in the separate includes tar file
185# rather than in the gdb tar file.
186OPCODE_DIR =
187OPCODES = $(OPCODE_DIR)pn-opcode.h $(OPCODE_DIR)np1-opcode.h \
188 $(OPCODE_DIR)sparc-opcode.h $(OPCODE_DIR)vax-opcode.h \
189 $(OPCODE_DIR)m68k-opcode.h $(OPCODE_DIR)ns32k-opcode.h \
190 $(OPCODE_DIR)convx-opcode.h $(OPCODE_DIR)pyr-opcode.h \
17563ca1
JG
191 $(OPCODE_DIR)mips-opcode.h $(OPCODE_DIR)am29k-opcode.h \
192 $(OPCODE_DIR)arm-opcode.h $(OPCODE_DIR)m88k-opcode.h \
193 $(OPCODE_DIR)tahoe-opcode.h
dd3b648e 194
17563ca1 195REMOTE_EXAMPLES = m68k-stub.c i386-stub.c rem-multi.shar
dd3b648e 196
3f2e006b
JG
197MALLOCSRC = gmalloc.c mcheck.c mtrace.c mtrace.awk \
198 ansidecl.h stdlib.h gmalloc.h stddef.h
dd3b648e 199
63989338
JG
200POSSLIBS_MAINDIR = regex.c regex.h alloca.c $(MALLOCSRC)
201POSSLIBS = $(POSSLIBS_MAINDIR)
dd3b648e
RP
202
203TESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c
204
d6cbb709 205# tdesc-lib cannot be named simply tdesc, because if it were, GNU make
dd3b648e
RP
206# would try to make it from tdesc.c.
207# tdesc-lib removed from the list due to Motorola copyrights...gnu@cygnus.com
3f2e006b 208OTHERS = Makefile.dist depend alldeps.mak Makefile.sdir \
dd3b648e
RP
209 createtags munch config.gdb config.status \
210 ChangeLog ChangeLog-3.x \
d6cbb709 211 README TODO TAGS WHATS.NEW Projects \
17563ca1 212 .gdbinit COPYING expread.tab.c \
d6cbb709 213 copying.c Convex.notes copying.awk \
dd3b648e 214 saber.suppress standalone.c stuff.c kdb-start.c \
d6cbb709
JG
215 putenv.c
216
217# Subdirectories of gdb, which should be included in their entirety in
218# gdb-xxx.tar.Z:
219TARDIRS = doc hp-include # tests
dd3b648e
RP
220
221DEPFILES= ${TDEPFILES} ${XDEPFILES}
222
223SOURCES=$(SFILES) $(ALLDEPFILES)
224TAGFILES = $(SOURCES) ${HFILES} ${OPCODES} ${ALLPARAM} ${POSSLIBS}
225TAGFILES_MAINDIR = $(SFILES_MAINDIR) $(ALLDEPFILES_MAINDIR) \
226 ${HFILES} ${OPCODES} ${ALLPARAM} ${POSSLIBS_MAINDIR}
227TARFILES = ${TAGFILES_MAINDIR} ${OTHERS} ${REMOTE_EXAMPLES}
228
229OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
230 values.o eval.o valops.o valarith.o valprint.o printcmd.o \
231 symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \
232 command.o utils.o expread.o expprint.o environ.o version.o \
233 copying.o $(DEPFILES) signame.o cplus-dem.o mem-break.o target.o \
31ef19fc 234 inftarg.o ieee-float.o putenv.o \
dd3b648e
RP
235 dbxread.o coffread.o # mipsread.o
236
237RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
238
239TSOBS = core.o inflow.o
240
241NTSOBS = standalone.o
242
243TSSTART = /lib/crt0.o
244
245NTSSTART = kdb-start.o
246
dd3b648e
RP
247# Prevent Sun make from putting in the machine type. Setting
248# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
249.c.o:
250 ${CC} -c ${CFLAGS} $<
251
252all: gdb
253
254install: gdb
255 cp gdb $(bindir)/gdb.new
256 mv $(bindir)/gdb.new $(bindir)/gdb
257 $(M_INSTALL)
258
259init.c: $(srcdir)/munch $(MUNCH_DEFINE) $(OBS) $(TSOBS)
260 $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
261
e73dbe5d 262gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${CDEPS} init.o
dd3b648e 263 ${CC-LD} $(LDFLAGS) -o gdb init.o $(OBS) $(TSOBS) $(ADD_FILES) \
e73dbe5d 264 $(CLIBS)
dd3b648e 265
63989338 266saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
5594d534 267 #setopt load_flags $(CFLAGS) -I$(BFD_DIR) -DHOST_SYS=SUN4_SYS
dd3b648e 268 #load ./init.c $(SFILES)
5594d534
JG
269 #unload ${srcdir}/expread.y ${srcdir}/vx-share/*.h
270 #unload ${srcdir}/nindy-share/[A-Z]*
17563ca1 271 #load ${srcdir}/expread.tab.c
dd3b648e 272 #load copying.c version.c
dd3b648e 273 #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
5594d534
JG
274 #load ${LIBIBERTY_DIR}/*.c
275 #load ${BFD_DIR}/*.c
e73dbe5d 276 #load ${READLINE_DIR}/*.c
5594d534 277 #load -ltermcap
dd3b648e 278 ##void mcheck(a) void (*a)(); { }
5594d534 279 ##void mtrace() { }
dd3b648e
RP
280
281
282
283# This is useful when debugging GDB, because some Unix's don't let you run GDB
284# on itself without copying the executable. So "make gdb1" will make
285# gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
286# Removing gdb1 before the copy is the right thing if gdb1 is open
287# in another process.
288gdb1: gdb
289 rm -f gdb1
290 cp gdb gdb1
291
292# This is a remote stub which runs under unix and starts up an
293# inferior process. This is at least useful for debugging GDB's
294# remote support.
295rapp: $(RAPP_OBS)
296 rm -f rapp_init.c
297 ${srcdir}/munch ${RAPP_OBS} > rapp_init.c
298 ${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS)
299
e73dbe5d
JG
300# Support for building Makefile out of configured pieces, automatically
301# generated dependencies, etc.
302Makefiles= Makefile.sdir $(M_MAKEFILE) \
303 ${srcdir}/alldeps.mak ${srcdir}/Makefile.dist
dd3b648e 304
e73dbe5d
JG
305MAKE_MAKEFILE= echo "M_MAKEFILE=$(M_MAKEFILE)" | \
306 cat - ${Makefiles} ${srcdir}/depend > Makefile
dd3b648e 307
e73dbe5d
JG
308Makefile: $(Makefiles)
309 $(MAKE_MAKEFILE)
dd3b648e 310
e73dbe5d 311alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig
dd3b648e
RP
312 rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp
313 for i in `ls -d ${srcdir}/tconfig/*[0-9A-Za-z] \
d6cbb709
JG
314 ${srcdir}/xconfig/*[0-9A-Za-z] | \
315 grep -v RCS | grep -v CVS.adm | grep -v SCCS` ; do \
dd3b648e
RP
316 echo $$i >>allconfig.tmp; \
317 awk <$$i ' \
318 $$1 == "TDEPFILES=" || $$1 == "XDEPFILES=" { \
319 for (i = 2; i <= NF; i++) \
320 print $$i >> "alldeps.tmp" ; \
321 } \
322 $$1 == "TM_FILE=" || $$1 == "XM_FILE=" { \
323 print $$2 >> "allparam.tmp" }' ; \
324 done
325 sort <alldeps.tmp | uniq | \
326 sed -e 's/arm-convert.o/arm-convert.s/' \
327 -e 's!^Onindy.o!nindy-share/Onindy.c!' \
328 -e 's!^nindy.o!nindy-share/nindy.c!' \
329 -e 's!ttybreak.o!nindy-share/ttybreak.c!' \
330 -e 's!ttyflush.o!nindy-share/ttyflush.c!' \
331 -e 's!xdr_ld.o!vx-share/xdr_ld.c!' \
332 -e 's!xdr_ptrace.o!vx-share/xdr_ptrace.c!' \
333 -e 's!xdr_rdb.o!vx-share/xdr_rdb.c!' \
334 -e 's!xdr_regs.o!vx-share/xdr_regs.c!' \
335 -e 's/\.o/.c/' \
336 >alldeps2.tmp
337 echo 'ALLDEPFILES = $$(ALLDEPFILES_MAINDIR) $$(ALLDEPFILES_SUBDIR)' \
338 >>alldeps.mak;
339 grep -v / alldeps2.tmp | \
340 awk 'BEGIN {printf "ALLDEPFILES_MAINDIR="} \
341 NR == 0 {printf $$0;} \
342 NR != 0 {printf "\\\n" $$0} \
343 END {printf "\n\n"}' >>alldeps.mak;
344 grep / alldeps2.tmp | \
345 awk 'BEGIN {printf "ALLDEPFILES_SUBDIR="} \
346 NR == 0 {printf $$0;} \
347 NR != 0 {printf "\\\n" $$0} \
348 END {printf "\n\n"}' >>alldeps.mak;
349 sort <allparam.tmp | uniq | awk 'BEGIN {printf "ALLPARAM="} \
350 NR == 0 {printf $$0;} \
351 NR != 0 {printf "\\\n" $$0} \
352 END {printf "\n\n"}' >>alldeps.mak;
353 sort <allconfig.tmp | uniq | awk 'BEGIN {printf "ALLCONFIG="} \
354 NR == 0 {printf $$0;} \
355 NR != 0 {printf "\\\n" $$0} \
356 END {printf "\n\n"}' >>alldeps.mak;
357 rm -f alldeps.tmp alldeps2.tmp allparam.tmp allconfig.tmp
358
359# The sed script makes everything which depends on {x,t}m.h depend on
360# config.status as well, in case someone reconfigures gdb out from
361# under an already compiled gdb.
362depend: $(SOURCES) Makefile.dist
363 @echo Ignore errors about non-existent system-supplied include files
364 @echo for systems other than the one you are using.
365 @echo "If xm.h and tm.h don't exist, the error messages saying so"
366 @echo can safely be ignored.
367 @echo Also ignore parse errors in valops.c, and any errors in
368 @echo arm-convert.s.
e73dbe5d
JG
369 -$(GCC) -MM $(CFLAGS) -I$(BFD_DIR) \
370 `ls $(SOURCES) | grep -v \.h$$ |sort -u` >depend.tmp
dd3b648e
RP
371 <depend.tmp sed -e 's/ [xt]m.h/& config.status/g' \
372 -e 's; vx-share/; $${srcdir}/vx-share/;g' \
373 -e 's; nindy-share/; $${srcdir}/nindy-share/;g' \
374 -e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g' \
e73dbe5d 375 -e 's; $(READLINE_DIR)/; $(READLINE_DEP)/;g' \
dd3b648e 376 -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g' \
dd3b648e 377 -e 's; \./; $${srcdir}/;g' \
e73dbe5d
JG
378 >depend
379 $(MAKE_MAKEFILE)
dd3b648e
RP
380 rm depend.tmp
381
382config.status:
383 @echo "You must configure gdb. Look at the README file for details."
384 @false
385
386# These are not generated by "make depend" because they only are there
387# for some machines.
a416228b
JK
388# But these rules don't do what we want; we want to hack the foo.o: tm.h
389# dependency to do the right thing.
dd3b648e
RP
390tm-isi.h tm-sun3.h tm-news.h tm-hp300bsd.h tm-altos.h : tm-68k.h
391tm-hp300hpux.h tm-sun2.h tm-3b1.h : tm-68k.h
392xm-news1000.h : xm-news.h
393xm-i386-sv32.h : xm-i386.h
394tm-i386gas.h: tm-i386.h
395xm-sun4os4.h : xm-sparc.h
396tm-sun4os4.h : tm-sparc.h
397
e73dbe5d 398kdb : $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${CDEPS}
dd3b648e
RP
399 rm -f init.c
400 $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(NTSOBS) > init.c
401 $(CC) $(LDFLAGS) -c init.c $(CLIBS)
402 ld -o kdb $(NTSSTART) $(OBS) $(NTSOBS) init.o $(ADD_FILES) \
e73dbe5d 403 -lc $(CLIBS)
dd3b648e
RP
404
405# Put the proper machine-specific files first.
406# createtags will edit the .o in DEPFILES into .c
407TAGS: ${TAGFILES}
408 $(srcdir)/createtags $(TM_FILE) ${XM_FILE} $(DEPFILES) ${TAGFILES}
409tags: TAGS
410
411# FIXME: Get alldeps.mak up to date, config.gdb none, THEN make gdb.tar.Z!
d6cbb709 412gdb.tar.Z: ${TARFILES} ${TARDIRS}
dd3b648e 413 rm -f gdb.tar; rm -rf $(DIST)
dd3b648e
RP
414 mkdir $(DIST)
415 cd $(DIST) ; for i in ${TARFILES} ; do ln -s ../$$i . ; done
d6cbb709
JG
416 cd $(DIST); for i in ${TARDIRS}; do \
417 (mkdir $$i; cd $$i; \
418 ln -s ../../$$i/* .; \
419 rm -rf SCCS CVS.adm RCS); done
dd3b648e
RP
420 mkdir $(DIST)/xconfig ${DIST}/tconfig
421 cd $(DIST)/tconfig ; \
422 for i in $(ALLCONFIG) ; do ln -s ../../$$i ../$$i ; done
423 mkdir $(DIST)/vx-share $(DIST)/nindy-share
424 cd $(DIST)/tconfig ; \
425 for i in $(SFILES_SUBDIR) $(ALLDEPFILES_SUBDIR); \
426 do ln -s ../../$$i ../$$i ; done
427 tar chf - $(DIST) | compress >gdb.tar.Z
428 rm -rf $(DIST)
429
430clean:
431 rm -f ${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES}
432 rm -f init.c init.o version.c
433 rm -f gdb core gdb.tar gdb.tar.Z make.log
434 rm -f gdb[0-9]
72f6386b 435 rm -f gdb.dvi gdb-all*
dd3b648e
RP
436
437distclean: clean expread.tab.c TAGS
438 rm -f tm.h xm.h config.status
439 rm -f y.output yacc.acts yacc.tmp
440 rm -f ${TESTS} Makefile
441
442realclean: clean
443 rm -f expread.tab.c TAGS
444 rm -f tm.h xm.h config.status
445 rm -f Makefile
446
72f6386b
RP
447gdb-all.texinfo: ${srcdir}/doc/gdb.texinfo
448 ${M4} $(srcdir)/doc/pretex.m4 $(srcdir)/doc/none.m4 $(srcdir)/doc/all.m4 $(srcdir)/doc/gdb.texinfo >gdb-all.texinfo
449
17563ca1
JG
450gdb.dvi : gdb-all.texinfo ${READLINE_DIR}/inc-readline.texinfo \
451 ${READLINE_DIR}/inc-history.texinfo
72f6386b
RP
452 tex gdb-all.texinfo
453 texindex gdb-all.??
454 tex gdb-all.texinfo
455 mv gdb-all.dvi gdb.dvi
456 rm -f gdb-all.?? gdb-all.???
457
458# This should work eventually, but we're using texinfo2, and many makeinfo's
459# can't cope with all the markup. In the meantime, we distribute the info
460# files as formatted by the elisp texinfo2 code.
461#gdb.info: gdb-all.texinfo
462# makeinfo gdb-all.texinfo
dd3b648e
RP
463
464# Make copying.c from COPYING
465copying.c : COPYING copying.awk
466 awk -f copying.awk < COPYING > copying.c
467
468version.c : Makefile.dist
469 echo 'char *version = "$(VERSION)";' >version.c
470
471${srcdir}/expread.tab.c : $(srcdir)/expread.y
472 @echo 'Expect 4 shift/reduce conflict.'
473 ${YACC} $(srcdir)/expread.y
474 mv y.tab.c ${srcdir}/expread.tab.c
475
476expread.o : ${srcdir}/expread.tab.c defs.h param.h symtab.h \
477 frame.h expression.h
478 $(CC) -c ${CFLAGS} `echo ${srcdir}/expread.tab.c | sed 's,^\./,,'`
479 mv expread.tab.o expread.o
480
481# dbxread, coffread, mipsread have dependencies on BFD header files.
482dbxread.o: ${srcdir}/dbxread.c
483 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
484
485coffread.o: ${srcdir}/coffread.c
486 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/coffread.c
487
488mipsread.o: ${srcdir}/mipsread.c
489 ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/mipsread.c
490
491# Drag in the files that are in another directory.
492
dd3b648e
RP
493xdr_ld.o: ${srcdir}/vx-share/xdr_ld.c
494 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ld.c
495
496xdr_ptrace.o: ${srcdir}/vx-share/xdr_ptrace.c
497 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ptrace.c
498
499xdr_rdb.o: ${srcdir}/vx-share/xdr_rdb.c
500 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_rdb.c
501
502xdr_regs.o: ${srcdir}/vx-share/xdr_regs.c
503 ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_regs.c
504
505nindy.o: ${srcdir}/nindy-share/nindy.c
506 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/nindy.c
507
508Onindy.o: ${srcdir}/nindy-share/Onindy.c
509 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/Onindy.c
510
511ttybreak.o: ${srcdir}/nindy-share/ttybreak.c
512 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttybreak.c
513
514ttyflush.o: ${srcdir}/nindy-share/ttyflush.c
515 ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttyflush.c
516
517tdesc-lib/libdc.o : force_update
518 cd tdesc-lib ; ${MAKE} "SYSV_DEFINE=${SYSV_DEFINE}"
519
dd3b648e
RP
520lint: $(LINTFILES)
521 $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES)
522
523gdb.cxref: $(SFILES)
524 cxref -I. $(SFILES) >gdb.cxref
525
526force_update :
527
e1ce8aa5
JK
528# When used with GDB, the demangler should never look for leading
529# underscores because GDB strips them off during symbol read-in. Thus
530# -Dnounderscore.
531
dd3b648e 532cplus-dem.o : cplus-dem.c
e1ce8aa5
JK
533 ${CC} -c ${CFLAGS} -Dnounderscore \
534 `echo ${srcdir}/cplus-dem.c | sed 's,^\./,,'`
This page took 0.051151 seconds and 4 git commands to generate.