Commit | Line | Data |
---|---|---|
62e859f0 | 1 | #Copyright 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. |
33cf356a SG |
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 | |
19 | prefix = /usr/local | |
20 | ||
b68b44fa | 21 | program_transform_name = |
4db3902a RP |
22 | exec_prefix = $(prefix) |
23 | bindir = $(exec_prefix)/bin | |
24 | libdir = $(exec_prefix)/lib | |
6a1f93f6 | 25 | tooldir = $(libdir)/$(target_alias) |
4db3902a | 26 | |
3e5afc2c | 27 | datadir = $(prefix)/lib |
4db3902a | 28 | mandir = $(prefix)/man |
3e5afc2c RP |
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 | |
4db3902a | 38 | infodir = $(prefix)/info |
3e5afc2c RP |
39 | includedir = $(prefix)/include |
40 | docdir = $(datadir)/doc | |
41 | ||
42 | SHELL = /bin/sh | |
43 | ||
c8fee4a5 | 44 | INSTALL = `cd $(srcdir)/..;pwd`/install.sh -c |
3e5afc2c RP |
45 | INSTALL_PROGRAM = $(INSTALL) |
46 | INSTALL_DATA = $(INSTALL) | |
5ebaf24b | 47 | INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)' |
98a7278b | 48 | INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1 |
3e5afc2c RP |
49 | |
50 | AR = ar | |
33cf356a | 51 | AR_FLAGS = qv |
3e5afc2c RP |
52 | RANLIB = ranlib |
53 | ||
33cf356a SG |
54 | # Flags that describe where you can find the termcap library. |
55 | # This can be overridden in the host Makefile fragment file. | |
56 | TERMCAP = -ltermcap | |
57 | ||
58 | # System V: If you compile gdb with a compiler which uses the coff | |
59 | # encapsulation feature (this is a function of the compiler used, NOT | |
60 | # of the m-?.h file selected by config.gdb), you must make sure that | |
61 | # the GNU nm is the one that is used by munch. | |
62 | ||
63 | # If you are compiling with GCC, make sure that either 1) You use the | |
64 | # -traditional flag, or 2) You have the fixed include files where GCC | |
65 | # can reach them. Otherwise the ioctl calls in inflow.c | |
66 | # will be incorrectly compiled. The "fixincludes" script in the gcc | |
67 | # distribution will fix your include files up. | |
68 | #CC=cc | |
69 | #CC=gcc -traditional | |
70 | GCC=gcc | |
71 | ||
72 | # Directory containing source files. Don't clean up the spacing, | |
73 | # this exact string is matched for by the "configure" script. | |
74 | srcdir = . | |
d941d8c3 | 75 | |
33cf356a SG |
76 | # It is also possible that you will need to add -I/usr/include/sys to the |
77 | # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which | |
78 | # is where it should be according to Posix). | |
79 | ||
19d0f3f4 | 80 | # If you use bison instead of yacc, it needs to include the "-y" argument. |
0b81fc43 | 81 | #BISON=bison -y |
33cf356a SG |
82 | BISON=yacc |
83 | YACC=$(BISON) | |
33cf356a | 84 | |
33cf356a | 85 | # where to find texinfo; GDB dist should include a recent one |
967007ca | 86 | TEXIDIR=${srcdir}/../texinfo |
33cf356a SG |
87 | |
88 | # where to find makeinfo, preferably one designed for texinfo-2 | |
89 | MAKEINFO=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 | |
94 | CC-LD=${CC} | |
95 | ||
96 | # Where is the "include" directory? Traditionally ../include or ./include | |
97 | INCLUDE_DIR = ${srcdir}/../include | |
98 | INCLUDE_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. | |
105 | MMALLOC_DIR = ${srcdir}/../mmalloc | |
106 | MMALLOC_DEP = $$(MMALLOC_DIR) | |
107 | MMALLOC_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 | |
112 | MMALLOC_CFLAGS = ${MMALLOC_CHECK} ${MMALLOC_DISABLE} | |
113 | ||
6f4a4fbb FF |
114 | # Where are the source and binary directories for the BFD library? |
115 | BFD_SRC_DIR = ${srcdir}/../bfd | |
116 | BFD_OBJ_DIR = ./../bfd${subdir} | |
117 | BFD_DEP = $$(BFD_SRC_DIR) | |
118 | BFD_LIB = $(BFD_OBJ_DIR)/libbfd.a | |
200a3470 | 119 | BFD_INCLUDES = -I${BFD_SRC_DIR} -I${BFD_OBJ_DIR} |
33cf356a SG |
120 | |
121 | # Where is the source dir for the READLINE library? Traditionally in .. or . | |
122 | # (For the binary library built from it, we use ${READLINE_DIR}${subdir}.) | |
123 | READLINE_DIR = ${srcdir}/../readline | |
124 | READLINE_DEP = $$(READLINE_DIR) | |
125 | RL_LIB = ./../readline${subdir}/libreadline.a | |
126 | ||
127 | # All the includes used for CFLAGS and for lint. | |
128 | # -I. for config files. | |
129 | # -I${srcdir} possibly for regex.h also. | |
1a0edbc7 | 130 | # -I${srcdir}/config for more generic config files. |
fc61e9ee | 131 | INCLUDE_CFLAGS = -I. -I${srcdir} -I${srcdir}/config \ |
68eabdd3 | 132 | -I$(INCLUDE_DIR) -I../include ${BFD_INCLUDES} |
33cf356a SG |
133 | |
134 | # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS | |
135 | # from the config/ directory. | |
136 | GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS} | |
137 | #PROFILE_CFLAGS = -pg | |
138 | ||
139 | # CFLAGS is specifically reserved for setting from the command line | |
140 | # when running make. I.E. "make USER_CFLAGS=-Wmissing-prototypes". | |
141 | CFLAGS = -g | |
142 | # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. | |
143 | INTERNAL_CFLAGS = ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MMALLOC_CFLAGS} ${INCLUDE_CFLAGS} ${USER_CFLAGS} | |
144 | # None of the things in CFLAGS will do any harm, and on some systems | |
d40309c7 | 145 | # (e.g. SunOS4) it is important to use the MH_CFLAGS. |
33cf356a SG |
146 | LDFLAGS = $(CFLAGS) |
147 | ||
148 | # Where is the "-liberty" library, containing getopt and obstack? | |
149 | LIBIBERTY_DIR = ${srcdir}/../libiberty | |
150 | LIBIBERTY = ./../libiberty${subdir}/libiberty.a | |
151 | ||
1e4f3c20 KR |
152 | # Where is the "-lopcodes" library, with (some of) the opcode tables and |
153 | # disassemblers? | |
154 | OPCODES = ./../opcodes${subdir}/libopcodes.a | |
155 | ||
33cf356a | 156 | # The config/mh-* file must define REGEX and REGEX1 on USG machines. |
31d16514 | 157 | # If your system is missing alloca(), or, more likely, it's there but |
33cf356a | 158 | # it doesn't work, define ALLOCA & ALLOCA1 too. |
33cf356a SG |
159 | |
160 | # Libraries and corresponding dependencies for compiling gdb. | |
161 | # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs. | |
162 | # TERMCAP comes after readline, since readline depends on it. | |
5b40415c JK |
163 | # If you have the Cygnus libraries installed, |
164 | # you can use 'CLIBS=${INSTALLED_LIBS}' 'CDEPS=' | |
165 | INSTALLED_LIBS=-lbfd -lreadline ${TERMCAP} -lopcodes -lmmalloc \ | |
166 | -liberty ${XM_CLIBS} ${TM_CLIBS} ${NAT_CLIBS} | |
d39fbfe3 FF |
167 | CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${OPCODES} ${MMALLOC_LIB} \ |
168 | ${LIBIBERTY} ${XM_CLIBS} ${TM_CLIBS} ${NAT_CLIBS} | |
d40309c7 | 169 | CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${NAT_CDEPS} \ |
d39fbfe3 | 170 | ${BFD_LIB} ${RL_LIB} ${OPCODES} ${MMALLOC_LIB} ${LIBIBERTY} |
33cf356a | 171 | |
d39fbfe3 FF |
172 | ADD_FILES = ${REGEX} ${ALLOCA} ${XM_ADD_FILES} ${TM_ADD_FILES} \ |
173 | ${NAT_ADD_FILES} | |
174 | ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES} \ | |
175 | ${NAT_ADD_FILES} | |
33cf356a | 176 | |
ce13daa7 | 177 | VERSION = 4.9.2 |
33cf356a SG |
178 | DIST=gdb |
179 | ||
180 | LINT=/usr/5bin/lint | |
53f0969b | 181 | LINTFLAGS= ${BFD_INCLUDES} |
33cf356a | 182 | |
e7d3b7d1 RS |
183 | RUNTEST=runtest |
184 | RUNTESTFLAGS= | |
6fcb280e | 185 | |
fd382d28 JK |
186 | # This is ser-unix.o for any system which supports a v7/BSD/SYSV/POSIX |
187 | # interface to the serial port. Hopefully if get ported to OS/2, VMS, | |
188 | # etc., then there will be (as part of the C library or perhaps as | |
189 | # part of libiberty) a POSIX interface. But at least for now the | |
190 | # host-dependent makefile fragment might need to use something else | |
191 | # besides ser-unix.o | |
bd91ddd1 | 192 | SER_HARDWIRE=ser-unix.o |
fd382d28 | 193 | |
33cf356a SG |
194 | # Host and target-dependent makefile fragments come in here. |
195 | #### | |
196 | # End of host and target-dependent makefile fragments | |
197 | ||
ef131e13 | 198 | FLAGS_TO_PASS = \ |
2fcc38b8 FF |
199 | "prefix=$(prefix)" \ |
200 | "exec_prefix=$(exec_prefix)" \ | |
ef131e13 JG |
201 | "against=$(against)" \ |
202 | "AR=$(AR)" \ | |
203 | "AR_FLAGS=$(AR_FLAGS)" \ | |
204 | "CC=$(CC)" \ | |
205 | "CFLAGS=$(CFLAGS)" \ | |
aecc5459 ILT |
206 | "CHILLFLAGS=$(CHILLFLAGS)" \ |
207 | "CHILL=$(CHILL)" \ | |
208 | "CHILL_LIB=$(CHILL_LIB)" \ | |
aecc5459 ILT |
209 | "CXX=$(CXX)" \ |
210 | "CXXFLAGS=$(CXXFLAGS)" \ | |
ef131e13 JG |
211 | "RANLIB=$(RANLIB)" \ |
212 | "MAKEINFO=$(MAKEINFO)" \ | |
213 | "INSTALL=$(INSTALL)" \ | |
214 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ | |
215 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
e7d3b7d1 RS |
216 | "RUNTEST=$(RUNTEST)" \ |
217 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ | |
ef131e13 JG |
218 | "BISON=$(BISON)" |
219 | ||
aecc5459 ILT |
220 | # Flags that we pass when building the testsuite. |
221 | ||
222 | CC_FOR_TARGET = ` \ | |
223 | if [ -f $${rootme}/../gcc/Makefile ] ; then \ | |
224 | echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \ | |
225 | else \ | |
226 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
227 | echo $(CC); \ | |
228 | else \ | |
229 | t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ | |
230 | fi; \ | |
231 | fi` | |
232 | ||
233 | CXX = gcc | |
234 | ||
235 | CXX_FOR_TARGET = ` \ | |
236 | if [ -f $${rootme}/../gcc/Makefile ] ; then \ | |
237 | echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \ | |
238 | else \ | |
239 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
240 | echo $(CXX); \ | |
241 | else \ | |
242 | t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ | |
243 | fi; \ | |
244 | fi` | |
245 | ||
aecc5459 ILT |
246 | CHILLFLAGS = $(CFLAGS) |
247 | CHILL = gcc | |
248 | CHILL_FOR_TARGET = ` \ | |
249 | if [ -f $${rootme}/../gcc/Makefile ] ; then \ | |
250 | echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -L$${rootme}/../chillrt/; \ | |
251 | else \ | |
252 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
253 | echo $(CC); \ | |
254 | else \ | |
255 | t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ | |
256 | fi; \ | |
257 | fi` | |
258 | CHILL_LIB = -lchill | |
1fa66e36 | 259 | |
0b96ed06 FF |
260 | # The use of $$(x_FOR_TARGET) reduces the command line length by not |
261 | # duplicating the lengthy definition. | |
aecc5459 ILT |
262 | TARGET_FLAGS_TO_PASS = \ |
263 | "prefix=$(prefix)" \ | |
264 | "exec_prefix=$(exec_prefix)" \ | |
265 | "against=$(against)" \ | |
0b96ed06 FF |
266 | 'CC=$$(CC_FOR_TARGET)' \ |
267 | "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ | |
aecc5459 | 268 | "CFLAGS=$(CFLAGS)" \ |
aecc5459 | 269 | "CHILLFLAGS=$(CHILLFLAGS)" \ |
0b96ed06 FF |
270 | 'CHILL=$$(CHILL_FOR_TARGET)' \ |
271 | "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \ | |
aecc5459 | 272 | "CHILL_LIB=$(CHILL_LIB)" \ |
0b96ed06 FF |
273 | 'CXX=$$(CXX_FOR_TARGET)' \ |
274 | "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ | |
aecc5459 ILT |
275 | "CXXFLAGS=$(CXXFLAGS)" \ |
276 | "MAKEINFO=$(MAKEINFO)" \ | |
277 | "INSTALL=$(INSTALL)" \ | |
278 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ | |
279 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
e7d3b7d1 RS |
280 | "RUNTEST=$(RUNTEST)" \ |
281 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ | |
aecc5459 ILT |
282 | "BISON=$(BISON)" |
283 | ||
5287eacd | 284 | # All source files that go into linking GDB. |
2531303c FF |
285 | # Source files which are included via a config/*/* Makefile fragment should |
286 | # *not* be specified here; they're in "ALLDEPFILES". | |
5287eacd FF |
287 | # Neither should links made at configuration time be specified here, since |
288 | # SFILES is used in building the distribution archive. | |
289 | ||
24c2857c JK |
290 | SFILES = ${srcdir}/blockframe.c ${srcdir}/breakpoint.c ${srcdir}/buildsym.c \ |
291 | ${srcdir}/c-exp.y ${srcdir}/c-lang.c ${srcdir}/c-typeprint.c \ | |
292 | ${srcdir}/c-valprint.c ${srcdir}/ch-exp.y ${srcdir}/ch-lang.c \ | |
293 | ${srcdir}/ch-typeprint.c ${srcdir}/ch-valprint.c ${srcdir}/coffread.c \ | |
294 | ${srcdir}/command.c ${srcdir}/complaints.c ${srcdir}/core.c \ | |
295 | ${srcdir}/cp-valprint.c ${srcdir}/dbxread.c ${srcdir}/demangle.c \ | |
296 | ${srcdir}/dwarfread.c ${srcdir}/elfread.c ${srcdir}/environ.c \ | |
297 | ${srcdir}/eval.c ${srcdir}/expprint.c ${srcdir}/findvar.c \ | |
298 | ${srcdir}/gdbtypes.c \ | |
299 | ${srcdir}/infcmd.c ${srcdir}/inflow.c ${srcdir}/infrun.c \ | |
5287eacd FF |
300 | ${srcdir}/language.c ${srcdir}/putenv.c ${srcdir}/m2-exp.y \ |
301 | ${srcdir}/m2-lang.c ${srcdir}/m2-typeprint.c \ | |
24c2857c JK |
302 | ${srcdir}/m2-valprint.c ${srcdir}/main.c ${srcdir}/maint.c \ |
303 | ${srcdir}/mem-break.c ${srcdir}/minsyms.c ${srcdir}/mipsread.c \ | |
304 | ${srcdir}/objfiles.c ${srcdir}/parse.c ${srcdir}/printcmd.c \ | |
305 | ${srcdir}/remote.c ${srcdir}/source.c ${srcdir}/stabsread.c \ | |
306 | ${srcdir}/stack.c \ | |
307 | ${srcdir}/symfile.c ${srcdir}/symmisc.c ${srcdir}/symtab.c \ | |
308 | ${srcdir}/target.c ${srcdir}/typeprint.c ${srcdir}/utils.c \ | |
309 | ${srcdir}/valarith.c \ | |
310 | ${srcdir}/valops.c ${srcdir}/valprint.c ${srcdir}/values.c \ | |
bd91ddd1 | 311 | ${srcdir}/serial.c ${srcdir}/ser-unix.c |
2531303c FF |
312 | |
313 | # Files that are not source code, but need to go into gdb-$(VERSION).tar.Z. | |
24c2857c JK |
314 | NONSRC = ${srcdir}/Makefile.in ${srcdir}/depend ${srcdir}/alldeps.mak \ |
315 | ${srcdir}/munch ${srcdir}/configure.in \ | |
6e50aeb4 FF |
316 | ${srcdir}/ChangeLog ${srcdir}/ChangeLog-9091 ${srcdir}/ChangeLog-92 \ |
317 | ${srcdir}/ChangeLog-3.x \ | |
24c2857c JK |
318 | ${srcdir}/gdb.1 ${srcdir}/refcard.ps ${srcdir}/README ${srcdir}/TODO \ |
319 | TAGS ${srcdir}/NEWS ${srcdir}/Projects ${srcdir}/.gdbinit \ | |
320 | ${srcdir}/COPYING $(YYFILES) ${srcdir}/copying.c \ | |
321 | ${srcdir}/copying.awk \ | |
322 | ${srcdir}/saber.suppress ${srcdir}/standalone.c ${srcdir}/stuff.c \ | |
5287eacd | 323 | ${srcdir}/kdb-start.c ${srcdir}/gcc.patch \ |
2531303c FF |
324 | ${srcdir}/nindy-share/Makefile ${srcdir}/nindy-share/VERSION \ |
325 | ${srcdir}/nindy-share/README ${srcdir}/vx-share/README \ | |
d8aaff82 | 326 | ${srcdir}/29k-share/README \ |
2531303c FF |
327 | ${srcdir}/config/convex/Convex.notes |
328 | ||
33cf356a SG |
329 | # All source files that lint should look at |
330 | LINTFILES = $(SFILES) $(YYFILES) init.c | |
331 | ||
332 | # Any additional files specified on these lines should also be added to | |
2531303c | 333 | # the NONSRC definition, so they go in the tar files. |
33cf356a SG |
334 | SFILES_STAND = $(SFILES) standalone.c |
335 | SFILES_KGDB = $(SFILES) stuff.c kdb-start.c | |
336 | ||
1a0edbc7 | 337 | # Header files that are not named in config/*/* Makefile fragments go here. |
24c2857c JK |
338 | HFILES = ${srcdir}/breakpoint.h ${srcdir}/buildsym.h ${srcdir}/call-cmds.h \ |
339 | ${srcdir}/command.h ${srcdir}/defs.h ${srcdir}/environ.h \ | |
340 | ${srcdir}/expression.h ${srcdir}/frame.h ${srcdir}/gdbcmd.h \ | |
341 | ${srcdir}/gdbcore.h ${srcdir}/gdbtypes.h ${srcdir}/gdb-stabs.h \ | |
342 | ${srcdir}/inferior.h ${srcdir}/language.h ${srcdir}/minimon.h \ | |
343 | ${srcdir}/objfiles.h ${srcdir}/parser-defs.h \ | |
344 | ${srcdir}/partial-stab.h ${srcdir}/serial.h ${srcdir}/signals.h \ | |
345 | ${srcdir}/solib.h ${srcdir}/symfile.h ${srcdir}/symtab.h \ | |
346 | ${srcdir}/stabsread.h ${srcdir}/target.h ${srcdir}/terminal.h \ | |
347 | ${srcdir}/typeprint.h ${srcdir}/xcoffsolib.h ${srcdir}/value.h \ | |
348 | ${srcdir}/c-lang.h ${srcdir}/ch-lang.h ${srcdir}/m2-lang.h \ | |
349 | ${srcdir}/complaints.h ${srcdir}/ns32k-opcode.h ${srcdir}/valprint.h \ | |
350 | ${srcdir}/config/m68k/tm-m68k.h ${srcdir}/config/pa/tm-hppa.h \ | |
351 | ${srcdir}/config/i960/tm-i960.h ${srcdir}/config/sparc/tm-sparc.h \ | |
352 | ${srcdir}/config/tm-sunos.h \ | |
353 | ${srcdir}/config/tm-sysv4.h ${srcdir}/config/m68k/xm-m68k.h \ | |
354 | ${srcdir}/config/sparc/xm-sparc.h \ | |
355 | ${srcdir}/config/xm-sysv4.h ${srcdir}/config/vax/xm-vax.h \ | |
d8aaff82 | 356 | ${srcdir}/config/nm-trash.h ${srcdir}/29k-share/udi/udiids.h \ |
fd382d28 | 357 | ${srcdir}/29k-share/udi/udiphcfg.h ${srcdir}/29k-share/udi/udiphunix.h \ |
2531303c FF |
358 | ${srcdir}/29k-share/udi/udiproc.h ${srcdir}/29k-share/udi/udipt29k.h \ |
359 | ${srcdir}/29k-share/udi/udiptcfg.h ${srcdir}/29k-share/udi/udisoc.h \ | |
360 | ${srcdir}/29k-share/udi_soc ${srcdir}/nindy-share/b.out.h \ | |
361 | ${srcdir}/nindy-share/block_io.h ${srcdir}/nindy-share/coff.h \ | |
362 | ${srcdir}/nindy-share/demux.h ${srcdir}/nindy-share/env.h \ | |
363 | ${srcdir}/nindy-share/stop.h ${srcdir}/nindy-share/ttycntl.h \ | |
364 | ${srcdir}/vx-share/dbgRpcLib.h ${srcdir}/vx-share/ptrace.h \ | |
365 | ${srcdir}/vx-share/vxTypes.h ${srcdir}/vx-share/vxWorks.h \ | |
366 | ${srcdir}/vx-share/wait.h ${srcdir}/vx-share/xdr_ld.h \ | |
367 | ${srcdir}/vx-share/xdr_ptrace.h ${srcdir}/vx-share/xdr_rdb.h | |
368 | ||
369 | # GDB "info" files, which should be included in their entirety | |
370 | INFOFILES = gdb.info* | |
33cf356a | 371 | |
22473f72 | 372 | REMOTE_EXAMPLES = m68k-stub.c i386-stub.c sparc-stub.c rem-multi.shar |
33cf356a | 373 | |
24c2857c | 374 | POSSLIBS = ${srcdir}/regex.c ${srcdir}/regex.h ${srcdir}/alloca.c |
33cf356a SG |
375 | |
376 | TESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c | |
377 | ||
33cf356a SG |
378 | # Subdirectories of gdb, which should be included in their entirety in |
379 | # gdb-xxx.tar.Z: | |
f4ed8840 | 380 | TARDIRS = doc sparclite # tests |
33cf356a | 381 | |
fd382d28 JK |
382 | # {X,T,NAT}DEPFILES are something of a pain in that it's hard to |
383 | # default their values the way we do for SER_HARDWIRE; in the future | |
384 | # maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other | |
385 | # variables analogous to SER_HARDWIRE which get defaulted in this | |
386 | # Makefile.in | |
387 | ||
388 | DEPFILES = ${TDEPFILES} ${XDEPFILES} ${SER_HARDWIRE} ${NATDEPFILES} | |
33cf356a | 389 | |
2531303c | 390 | SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) |
33cf356a | 391 | TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS} |
2531303c FF |
392 | |
393 | TARFILES = ${SFILES} ${HFILES} ${NONSRC} ${ALLDEPFILES} $(ALLCONFIG) \ | |
0f0834c5 | 394 | $(ALLPARAM) $(INFOFILES) ${POSSLIBS} ${REMOTE_EXAMPLES} |
33cf356a | 395 | |
327f7197 | 396 | OBS = version.o main.o blockframe.o breakpoint.o findvar.o stack.o source.o \ |
33cf356a | 397 | values.o eval.o valops.o valarith.o valprint.o printcmd.o \ |
17cb669f | 398 | symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \ |
327f7197 | 399 | command.o utils.o expprint.o environ.o gdbtypes.o \ |
3402b1cf | 400 | copying.o $(DEPFILES) mem-break.o target.o \ |
00cea52f | 401 | putenv.o parse.o language.o $(YYOBJ) \ |
781fa085 | 402 | buildsym.o objfiles.o minsyms.o maint.o demangle.o \ |
f4ed8840 | 403 | dbxread.o coffread.o elfread.o dwarfread.o mipsread.o \ |
a8a69e63 FF |
404 | stabsread.o core.o c-lang.o ch-lang.o m2-lang.o complaints.o \ |
405 | typeprint.o c-typeprint.o ch-typeprint.o m2-typeprint.o \ | |
4e772f44 | 406 | c-valprint.o cp-valprint.o ch-valprint.o m2-valprint.o \ |
fd382d28 | 407 | serial.o |
33cf356a SG |
408 | |
409 | RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES) | |
410 | ||
c9c23412 | 411 | TSOBS = inflow.o |
33cf356a SG |
412 | |
413 | NTSOBS = standalone.o | |
414 | ||
415 | TSSTART = /lib/crt0.o | |
416 | ||
417 | NTSSTART = kdb-start.o | |
418 | ||
aecc5459 | 419 | SUBDIRS = doc testsuite |
33cf356a SG |
420 | |
421 | # For now, shortcut the "configure GDB for fewer languages" stuff. | |
e58de8a2 FF |
422 | YYFILES = c-exp.tab.c m2-exp.tab.c ch-exp.tab.c |
423 | YYOBJ = c-exp.tab.o m2-exp.tab.o ch-exp.tab.o | |
33cf356a SG |
424 | |
425 | # Prevent Sun make from putting in the machine type. Setting | |
426 | # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1. | |
427 | .c.o: | |
428 | ${CC} -c ${INTERNAL_CFLAGS} $< | |
429 | ||
430 | all: gdb | |
0139c441 | 431 | @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do |
6fcb280e | 432 | |
80c8fd72 | 433 | installcheck: |
e7d3b7d1 | 434 | check: force |
0139c441 | 435 | @rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=check DODIRS=testsuite subdir_do |
b396a969 | 436 | info dvi: force |
0139c441 | 437 | @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do |
33cf356a | 438 | install-info: force |
0139c441 | 439 | @$(MAKE) $(FLAGS_TO_PASS) DO=install-info "DODIRS=$(SUBDIRS)" subdir_do |
33cf356a | 440 | clean-info: force |
0139c441 | 441 | @$(MAKE) $(FLAGS_TO_PASS) DO=clean-info "DODIRS=$(SUBDIRS)" subdir_do |
33cf356a SG |
442 | |
443 | gdb.z:gdb.1 | |
444 | nroff -man $(srcdir)/gdb.1 | col -b > gdb.t | |
445 | pack gdb.t ; rm -f gdb.t | |
446 | mv gdb.t.z gdb.z | |
447 | ||
702c0ff7 JK |
448 | # Traditionally this depends on "all". But it is probably more useful |
449 | # not to; for example, if the user has made some trivial change to a | |
450 | # source file and doesn't care about rebuilding or just wants to save the | |
451 | # time it takes for make to check that all is up to date. | |
452 | install: | |
98a7278b DZ |
453 | $(INSTALL_XFORM) gdb $(bindir)/gdb |
454 | $(INSTALL_XFORM1) $(srcdir)/gdb.1 $(man1dir)/gdb.1 | |
b68b44fa | 455 | $(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$$n.1 |
33cf356a | 456 | $(M_INSTALL) |
0139c441 | 457 | @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do |
33cf356a SG |
458 | |
459 | init.c: $(srcdir)/munch $(OBS) $(TSOBS) | |
460 | $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c | |
461 | ||
462 | gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${CDEPS} init.o | |
463 | ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdb \ | |
464 | init.o $(OBS) $(TSOBS) $(ADD_FILES) $(CLIBS) $(LOADLIBES) | |
465 | ||
466 | saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c | |
53f0969b | 467 | #setopt load_flags $(CFLAGS) ${BFD_INCLUDES} -DHOST_SYS=SUN4_SYS |
33cf356a | 468 | #load ./init.c $(SFILES) |
b076b3f8 FF |
469 | #unload ${srcdir}/c-exp.y ${srcdir}/m2-exp.y ${srcdir}/ch-exp.y |
470 | #unload ${srcdir}/vx-share/*.h | |
33cf356a | 471 | #unload ${srcdir}/nindy-share/[A-Z]* |
e58de8a2 | 472 | #load c-exp.tab.c m2-exp.tab.c ch-exp.tab.c |
33cf356a | 473 | #load copying.c version.c |
1e4f3c20 | 474 | #load ../opcodes/libopcodes.a |
33cf356a SG |
475 | #load ../libiberty/libiberty.a |
476 | #load ../bfd/libbfd.a | |
477 | #load ../readline/libreadline.a | |
478 | #load ../mmalloc/libmmalloc.a | |
479 | #load -ltermcap | |
480 | #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'` | |
481 | echo "Load .c corresponding to:" $(DEPFILES) | |
482 | ||
483 | ||
484 | # This is useful when debugging GDB, because some Unix's don't let you run GDB | |
485 | # on itself without copying the executable. So "make gdb1" will make | |
486 | # gdb and put a copy in gdb1, and you can run it with "gdb gdb1". | |
487 | # Removing gdb1 before the copy is the right thing if gdb1 is open | |
488 | # in another process. | |
489 | gdb1: gdb | |
490 | rm -f gdb1 | |
491 | cp gdb gdb1 | |
492 | ||
493 | # This is a remote stub which runs under unix and starts up an | |
494 | # inferior process. This is at least useful for debugging GDB's | |
495 | # remote support. | |
496 | rapp: $(RAPP_OBS) | |
497 | rm -f rapp_init.c | |
498 | ${srcdir}/munch ${MUNCH_DEFINE} ${RAPP_OBS} > rapp_init.c | |
499 | ${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS) | |
500 | ||
501 | # Support for building Makefile out of configured pieces, automatically | |
502 | # generated dependencies, etc. alldeps.mak is a file that contains | |
2531303c FF |
503 | # "make" variable definitions for all ALLDEPFILES, ALLPARAM, and ALLCONFIG, |
504 | # all cadged from the current contents of the config subtree. | |
33cf356a | 505 | |
fd382d28 JK |
506 | # using sort and uniq is not a violation of the GNU coding standards |
507 | # because this rule is not part of building and installing GDB. | |
2531303c FF |
508 | alldeps.mak: force |
509 | rm -f alldeps.mak alldeps*.tmp allparam*.tmp allconfig*.tmp | |
24c2857c | 510 | for i in `(cd ${srcdir}; find config -name '*.m[ht]' -print)` ; do \ |
33cf356a | 511 | echo $$i >>allconfig.tmp; \ |
24c2857c | 512 | awk <${srcdir}/$$i ' \ |
d40309c7 | 513 | $$1 == "TDEPFILES=" || $$1 == "XDEPFILES=" \ |
fd382d28 | 514 | || $$1 == "NATDEPFILES=" || $$1 == "SER_HARDWIRE=" { \ |
33cf356a SG |
515 | for (i = 2; i <= NF; i++) \ |
516 | print $$i >> "alldeps.tmp" ; \ | |
517 | } \ | |
f4ed8840 | 518 | $$1 == "TM_FILE=" || $$1 == "XM_FILE=" || $$1 == "NAT_FILE=" { \ |
33cf356a SG |
519 | print $$2 >> "allparam.tmp" }' ; \ |
520 | done | |
521 | sort <alldeps.tmp | uniq | \ | |
522 | sed -e 's/arm-convert.o/arm-convert.s/' \ | |
523 | -e 's!^Onindy.o!nindy-share/Onindy.c!' \ | |
524 | -e 's!^nindy.o!nindy-share/nindy.c!' \ | |
525 | -e 's!ttybreak.o!nindy-share/ttybreak.c!' \ | |
526 | -e 's!ttyflush.o!nindy-share/ttyflush.c!' \ | |
527 | -e 's!xdr_ld.o!vx-share/xdr_ld.c!' \ | |
528 | -e 's!xdr_ptrace.o!vx-share/xdr_ptrace.c!' \ | |
529 | -e 's!xdr_rdb.o!vx-share/xdr_rdb.c!' \ | |
6881fb6d | 530 | -e 's!udr.o!29k-share/udi/udr.c!' \ |
6881fb6d | 531 | -e 's!udip2soc.o!29k-share/udi/udip2soc.c!' \ |
2531303c FF |
532 | -e '/..\/sim\//d' \ |
533 | -e '/..\/opcodes\//d' \ | |
33cf356a SG |
534 | -e 's/\.o/.c/' \ |
535 | >alldeps2.tmp | |
1a0edbc7 | 536 | for i in `cat allparam.tmp` ; do \ |
24c2857c JK |
537 | (cd ${srcdir} ; \ |
538 | find config -name $$i -print ) >>allparam2.tmp ; \ | |
1a0edbc7 | 539 | done |
2531303c FF |
540 | echo '# Start of "alldeps.mak" definitions' >>alldeps.mak; |
541 | sort <alldeps2.tmp | uniq | awk 'BEGIN {printf "ALLDEPFILES="} \ | |
24c2857c JK |
542 | NR == 0 {printf "$${srcdir}/" $$0;} \ |
543 | NR != 0 {printf "\\\n" "$${srcdir}/" $$0} \ | |
2531303c | 544 | END {printf "\n\n"}' >>alldeps.mak; |
1a0edbc7 | 545 | sort <allparam2.tmp | uniq | awk 'BEGIN {printf "ALLPARAM="} \ |
24c2857c JK |
546 | NR == 0 {printf "$${srcdir}/" $$0;} \ |
547 | NR != 0 {printf "\\\n" "$${srcdir}/" $$0} \ | |
2531303c | 548 | END {printf "\n\n"}' >>alldeps.mak; |
33cf356a | 549 | sort <allconfig.tmp | uniq | awk 'BEGIN {printf "ALLCONFIG="} \ |
24c2857c JK |
550 | NR == 0 {printf "$${srcdir}/" $$0;} \ |
551 | NR != 0 {printf "\\\n" "$${srcdir}/" $$0} \ | |
2531303c FF |
552 | END {printf "\n\n"}' >>alldeps.mak; |
553 | echo '# End of "alldeps.mak" definitions' >>alldeps.mak; | |
554 | rm -f alldeps*.tmp allparam*.tmp allconfig*.tmp | |
33cf356a | 555 | |
33cf356a SG |
556 | depend: $(SOURCES) Makefile.in |
557 | @echo Ignore errors about non-existent system-supplied include files | |
558 | @echo for systems other than the one you are using. | |
ee7e82fe | 559 | @echo Also ignore any errors in arm-convert.s. |
53f0969b FF |
560 | -$(GCC) -MM -nostdinc -I/usr/include ${BFD_INCLUDES} \ |
561 | -I${READLINE_DIR} $(INTERNAL_CFLAGS) \ | |
3402b1cf | 562 | `ls $(SOURCES) | grep -v '\.[hy]$$' | \ |
33cf356a | 563 | sort -u` >depend.tmp |
31d16514 | 564 | #BEGIN COMMENTED OUT CODE -- this should now be taken care of below. |
33cf356a | 565 | # If running in srcdir, translate "./foo.c" into "$srcdir/foo.c" except |
b6113cc4 | 566 | # for xm.h, tm.h and nm.h. This allows the same "depend" file to be used |
33cf356a | 567 | # by the various subdirectories. |
31d16514 JK |
568 | # if [ "${srcdir}" = "." ] ; then \ |
569 | # <depend.tmp sed \ | |
570 | # -e 's; ./xm.h; xm.h;g' \ | |
571 | # -e 's; ./tm.h; tm.h;g' \ | |
572 | # -e 's; ./nm.h; nm.h;g' \ | |
573 | # -e 's; \./; $${srcdir}/;g' \ | |
574 | # -e 's; vx-share/; $${srcdir}/vx-share/;g' \ | |
575 | # -e 's; nindy-share/; $${srcdir}/nindy-share/;g' \ | |
576 | # -e 's; 29k-share/; $${srcdir}/29k-share/;g' \ | |
577 | # >depend.tm2; \ | |
578 | # rm depend.tmp; \ | |
579 | # mv depend.tm2 depend.tmp; \ | |
580 | # fi | |
581 | #END COMMENTED OUT CODE | |
582 | # Make everything which depends on {x,t,n}m.h depend on config.status as | |
583 | # well, in case someone reconfigures gdb out from under an already | |
584 | # compiled gdb. | |
585 | # | |
586 | # Translate SRCDIR/foo.c to $srcdir/foo.c. This allows this "depend" file | |
587 | # to be used by any dir, or included in a distribution. It's possible | |
588 | # we should write the generated copy into SRCDIR like "make headers" does | |
589 | # in bfd. We do not try to quote the regexp, so if SRCDIR/ is "./" it will | |
590 | # also match any single character followed by "/". This is OK. | |
33cf356a | 591 | <depend.tmp sed \ |
33cf356a SG |
592 | -e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g' \ |
593 | -e 's; $(READLINE_DIR)/; $(READLINE_DEP)/;g' \ | |
594 | -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g' \ | |
3ef6f604 | 595 | -e 's; $(INCLUDE_DEP)/bfd\.h; $$(BFD_OBJ_DIR)/../include/bfd.h;g' \ |
31d16514 JK |
596 | -e 's; \./xm.h; xm.h config.status;g' \ |
597 | -e 's; \./tm.h; tm.h config.status;g' \ | |
598 | -e 's; \./nm.h; nm.h config.status;g' \ | |
599 | -e 's; ${srcdir}/; $${srcdir}/;g' \ | |
600 | -e 's; vx-share/; $${srcdir}/vx-share/;g' \ | |
601 | -e 's; nindy-share/; $${srcdir}/nindy-share/;g' \ | |
602 | -e 's; 29k-share/; $${srcdir}/29k-share/;g' \ | |
5b8462fa | 603 | >depend.tm3; |
67d2bd1a | 604 | # OK, get your sed manual out. This script makes the rules in |
5b8462fa JK |
605 | # depend explicitly state the rule, rather than relying on VPATH |
606 | # or a .c.o implicit rule. This is needed for Sun make, and should | |
67d2bd1a FF |
607 | # be portable to any make worthy of the name. |
608 | # There is one exception: the *.tab.c files can exist either in srcdir | |
609 | # or in ., so make sure not to use an explicit rule for them. | |
31d16514 | 610 | # |
53f0969b FF |
611 | # Adding -I${BFD_SRC_DIR} and -I${BFD_OBJ_DIR}/../include is required for all |
612 | # the files which use BFD internals. This is because some bfd include files | |
613 | # are in the source directory, and some (bfd.h for example) are generated in | |
614 | # a sibling include directory of the bfd build directory. | |
31d16514 JK |
615 | # Adding -I${READLINE_DIR} is required because the readline header files |
616 | # are in readline not in include. They probably should be moved. | |
5b8462fa JK |
617 | <depend.tm3 sed \ |
618 | -e '/:/h' \ | |
619 | -e '/\\$$/b end' \ | |
620 | -e 'p' \ | |
621 | -e 'g' \ | |
67d2bd1a | 622 | -e '/:.*\.tab\.c/d' \ |
5b8462fa | 623 | -e 's/.*:\(.*\.c\).*/ $${CC} -c $${INTERNAL_CFLAGS} \1/' \ |
53f0969b FF |
624 | -e 's;$${srcdir}/xcoffread.c;$${BFD_INCLUDES} &;' \ |
625 | -e 's;$${srcdir}/xcoffexec.c;$${BFD_INCLUDES} &;' \ | |
626 | -e 's;$${srcdir}/paread.c;$${BFD_INCLUDES} &;' \ | |
627 | -e 's;$${srcdir}/stabsread.c;$${BFD_INCLUDES} &;' \ | |
628 | -e 's;$${srcdir}/dwarfread.c;$${BFD_INCLUDES} &;' \ | |
629 | -e 's;$${srcdir}/elfread.c;$${BFD_INCLUDES} &;' \ | |
630 | -e 's;$${srcdir}/mipsread.c;$${BFD_INCLUDES} &;' \ | |
631 | -e 's;$${srcdir}/coffread.c;$${BFD_INCLUDES} &;' \ | |
632 | -e 's;$${srcdir}/dbxread.c;$${BFD_INCLUDES} &;' \ | |
31d16514 | 633 | -e 's;$${srcdir}/main.c;-I$${READLINE_DIR} &;' \ |
5b8462fa JK |
634 | -e ': end' \ |
635 | >depend.tm4; | |
636 | mv depend.tm4 depend | |
31d16514 | 637 | # rm depend.tm? |
33cf356a SG |
638 | |
639 | config.status: | |
640 | @echo "You must configure gdb. Look at the README file for details." | |
641 | @false | |
642 | ||
ef131e13 JG |
643 | # This checks the configure.in file versus the config/ directory. |
644 | config-check: config-check-hosts config-check-targets | |
645 | config-check-hosts: | |
646 | grep gdb_host= ${srcdir}/configure.in | \ | |
647 | sed -e 's/.*gdb_host=//' -e 's/ ;;$$/.mh/' | sort -u >HOSTconf.o | |
648 | (cd ${srcdir}/config; ls *.mh) >HOSTdir.o | |
649 | diff -u HOSTconf.o HOSTdir.o | |
650 | ||
651 | config-check-targets: | |
652 | grep gdb_target= ${srcdir}/configure.in | \ | |
653 | sed -e 's/.*gdb_target=//' -e 's/ ;;$$/.mh/' | sort -u >TARGconf.o | |
654 | (cd ${srcdir}/config; ls *.mt) >TARGdir.o | |
655 | diff -u HOSTconf.o HOSTdir.o | |
656 | ||
33cf356a SG |
657 | # These are not generated by "make depend" because they only are there |
658 | # for some machines. | |
659 | # But these rules don't do what we want; we want to hack the foo.o: tm.h | |
660 | # dependency to do the right thing. | |
2225eb85 FF |
661 | tm-isi.h tm-sun3.h tm-news.h tm-hp300bsd.h tm-altos.h: tm-m68k.h |
662 | tm-hp300hpux.h tm-sun2.h tm-3b1.h: tm-m68k.h | |
33cf356a SG |
663 | xm-news1000.h: xm-news.h |
664 | xm-i386-sv32.h: xm-i386.h | |
665 | tm-i386gas.h: tm-i386.h | |
666 | xm-sun4os4.h: xm-sparc.h | |
667 | tm-sun4os4.h: tm-sparc.h | |
668 | xm-vaxult.h: xm-vax.h | |
669 | xm-vaxbsd.h: xm-vax.h | |
670 | ||
2531303c | 671 | kdb: $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${CDEPS} |
33cf356a SG |
672 | rm -f init.c |
673 | $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(NTSOBS) > init.c | |
674 | $(CC) $(LDFLAGS) -c init.c $(CLIBS) | |
675 | ld -o kdb $(NTSSTART) $(OBS) $(NTSOBS) init.o $(ADD_FILES) \ | |
676 | -lc $(CLIBS) | |
677 | ||
8d57a263 JK |
678 | # Put the proper machine-specific files first, so M-. on a machine |
679 | # specific routine gets the one for the correct machine. | |
db7c818b | 680 | # The xyzzy stuff below deals with empty DEPFILES |
2531303c | 681 | TAGS: ${TAGFILES} |
24c2857c JK |
682 | etags `find ${srcdir}/config -name $(TM_FILE) -print` \ |
683 | `find ${srcdir}/config -name ${XM_FILE} -print` \ | |
684 | `find ${srcdir}/config -name ${NAT_FILE} -print` \ | |
db7c818b JK |
685 | `for i in yzzy ${DEPFILES}; do \ |
686 | if [ x$$i != xyzzy ]; then \ | |
687 | echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \ | |
688 | fi; \ | |
689 | done` \ | |
24c2857c | 690 | ${TAGFILES} |
33cf356a SG |
691 | tags: TAGS |
692 | ||
693 | # Making distributions of GDB and friends. | |
694 | ||
33cf356a SG |
695 | # Make a tar file containing the GDB directory of the distribution. |
696 | gdb.tar.Z: force_update | |
697 | $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist | |
698 | $(MAKE) $(MFLAGS) -f Makefile.in gdb-$(VERSION).tar.Z | |
699 | ||
2531303c FF |
700 | # Make a directory `proto-gdb.dir' that contains an image of the GDB |
701 | # directory of the distribution, built up with symlinks. Note that this | |
702 | # make target is not directly referenced by any other rules in this makefile, | |
703 | # it is referenced by the makefile in the parent directory. | |
704 | make-proto-gdb.dir: force_update | |
705 | $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist | |
706 | $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1 | |
707 | ||
708 | # Set up the GDB source directory for distribution, by building all files that | |
709 | # are products of other files. | |
710 | setup-to-dist: update-depend force_update | |
711 | ../configure none | |
712 | (cd doc; $(MAKE) $(MFLAGS) GDBvn.texi) | |
713 | $(MAKE) $(MFLAGS) gdb.info | |
714 | $(MAKE) $(MFLAGS) refcard.ps | |
22473f72 JG |
715 | |
716 | # Update the "depend" and "alldeps.mak" files in a source directory. | |
717 | # We update alldeps.mak first, since it is used to generate the list | |
718 | # of files to be checked for dependencies. | |
719 | update-depend: update-alldeps force_update | |
b3d4dd73 | 720 | ../configure none -norecursion |
6f4a4fbb FF |
721 | (cd ../bfd; ../configure sun4 -norecursion; rm -f stmp-bfd.h) |
722 | (cd ../bfd; $(MAKE) $(MFLAGS) bfd.h) | |
33cf356a SG |
723 | rm -f depend |
724 | $(MAKE) $(MFLAGS) depend | |
22473f72 | 725 | |
2531303c FF |
726 | # Update the "alldeps.mak" file in a source directory. |
727 | update-alldeps: force_update | |
728 | ../configure none -norecursion | |
729 | rm -f alldeps.mak | |
730 | $(MAKE) $(MFLAGS) alldeps.mak | |
33cf356a SG |
731 | |
732 | # Build a tar file from a proto-gdb.dir. | |
733 | gdb-$(VERSION).tar.Z: force_update | |
734 | rm -f gdb.tar gdb-$(VERSION).tar.Z | |
2531303c | 735 | $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1 |
33cf356a SG |
736 | ln -s proto-gdb.dir $(DIST) |
737 | tar chf - $(DIST) | compress >gdb-$(VERSION).tar.Z | |
738 | rm -rf $(DIST) proto-gdb.dir | |
739 | ||
740 | # Build a proto-gdb.dir after GDB has been set up for distribution. | |
741 | # This stuff must be run in `Makefile', not `Makefile.in`; we use the makefile | |
742 | # built in the setup-to-dist process, since it defines things like ALLCONFIG | |
743 | # and ALLDEPFILES, that we need. | |
744 | make-proto-gdb-1: ${TARFILES} ${TARDIRS} gdb.info | |
745 | rm -rf proto-gdb.dir | |
746 | mkdir proto-gdb.dir | |
2531303c FF |
747 | rootme=`pwd`/ ; export rootme ; \ |
748 | for i in `echo ${TARDIRS}`; do \ | |
749 | (cd proto-gdb.dir ; \ | |
750 | mkdir -p $$i; \ | |
751 | cd $$i; \ | |
752 | ln -s $${rootme}/$$i/* .; \ | |
753 | rm -rf SCCS CVS CVS.adm RCS config.status; \ | |
754 | if test -f Makefile.in; then rm Makefile; else true; fi;); \ | |
755 | done ; \ | |
756 | for i in `echo ${TARFILES}`; do \ | |
757 | (cd proto-gdb.dir ; \ | |
758 | dir=`dirname $$i`; \ | |
759 | if test -d $$dir; then true; else mkdir -p $$dir; fi; \ | |
760 | ln -s $${rootme}/$$i $$i;); \ | |
761 | done | |
33cf356a SG |
762 | chmod og=u `find . -print` |
763 | ||
97e72c06 FF |
764 | # Build a proto-testsuite.dir. |
765 | make-proto-testsuite.dir: force_update | |
766 | rm -rf proto-testsuite.dir | |
767 | mkdir proto-testsuite.dir | |
768 | rootme=`pwd`/ ; export rootme ; \ | |
769 | for i in `find testsuite -type f -print`; do \ | |
770 | (cd proto-testsuite.dir ; \ | |
771 | dir=`dirname $$i`; \ | |
772 | if test -d $$dir; then true; else mkdir -p $$dir; fi; \ | |
773 | ln -s $${rootme}/$$i $$i;); \ | |
774 | done | |
775 | find proto-testsuite.dir -name Makefile -exec rm {} \; | |
776 | find proto-testsuite.dir -name config.status -exec rm {} \; | |
777 | ||
33cf356a | 778 | clean: |
4e772f44 | 779 | @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do |
33cf356a SG |
780 | rm -f *.o ${ADD_FILES} *~ |
781 | rm -f init.c version.c | |
2531303c | 782 | rm -f gdb core make.log |
33cf356a | 783 | rm -f gdb[0-9] |
33cf356a | 784 | |
39d4639b JK |
785 | # This used to depend on c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS |
786 | # I believe this is wrong; the makefile standards for distclean just | |
787 | # describe removing files; the only sort of "re-create a distribution" | |
788 | # functionality described is if the distributed files are unmodified. | |
789 | distclean: clean | |
4e772f44 | 790 | @$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(SUBDIRS)" subdir_do |
39d4639b | 791 | rm -f nm.h tm.h xm.h config.status |
33cf356a SG |
792 | rm -f y.output yacc.acts yacc.tmp |
793 | rm -f ${TESTS} Makefile depend | |
33cf356a SG |
794 | |
795 | realclean: clean | |
4e772f44 | 796 | @$(MAKE) $(FLAGS_TO_PASS) DO=realclean "DODIRS=$(SUBDIRS)" subdir_do |
e58de8a2 | 797 | rm -f c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS |
39d4639b JK |
798 | rm -f nm.h tm.h xm.h config.status |
799 | rm -f y.output yacc.acts yacc.tmp | |
800 | rm -f ${TESTS} Makefile depend | |
33cf356a SG |
801 | |
802 | STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb | |
803 | ||
804 | subdir_do: force | |
805 | @for i in $(DODIRS); do \ | |
6f4a4fbb | 806 | if [ -f ./$$i/Makefile ] ; then \ |
33cf356a | 807 | if (cd ./$$i; \ |
ef131e13 | 808 | $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \ |
33cf356a SG |
809 | else exit 1 ; fi ; \ |
810 | else true ; fi ; \ | |
811 | done | |
d941d8c3 | 812 | |
33cf356a SG |
813 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) |
814 | $(SHELL) ./config.status | |
d941d8c3 | 815 | |
33cf356a | 816 | force: |
d941d8c3 | 817 | |
33cf356a SG |
818 | # Documentation! |
819 | # GDB QUICK REFERENCE (TeX dvi file, CM fonts) | |
2b21d8aa | 820 | refcard.dvi: |
ef131e13 | 821 | ( cd ./doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS) ) |
33cf356a | 822 | mv ./doc/refcard.dvi . |
d941d8c3 | 823 | |
33cf356a | 824 | # GDB QUICK REFERENCE (PostScript output, common PS fonts) |
2b21d8aa | 825 | refcard.ps: |
ef131e13 | 826 | ( cd ./doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS) ) |
33cf356a | 827 | mv ./doc/refcard.ps . |
d941d8c3 | 828 | |
33cf356a | 829 | # GDB MANUAL: TeX dvi file |
259d1dea | 830 | gdb.dvi: |
2b21d8aa | 831 | ( cd ./doc; $(MAKE) gdb.dvi $(FLAGS_TO_PASS) ) |
33cf356a | 832 | mv ./doc/gdb.dvi . |
d941d8c3 | 833 | |
33cf356a | 834 | # GDB MANUAL: info file |
259d1dea | 835 | gdb.info: |
24b88ae8 | 836 | ( cd ./doc; $(MAKE) gdb.info $(FLAGS_TO_PASS) ) |
33cf356a | 837 | mv ./doc/gdb.info* . |
d941d8c3 | 838 | |
33cf356a SG |
839 | # Make copying.c from COPYING |
840 | copying.c: ${srcdir}/COPYING ${srcdir}/copying.awk | |
841 | awk -f ${srcdir}/copying.awk < ${srcdir}/COPYING > copying.c | |
d941d8c3 | 842 | |
33cf356a SG |
843 | version.c: Makefile |
844 | echo 'char *version = "$(VERSION)";' >version.c | |
90494078 RP |
845 | echo 'char *host_canonical = "$(host_canonical)";' >> version.c |
846 | echo 'char *target_canonical = "$(target_canonical)";' >> version.c | |
d941d8c3 | 847 | |
33cf356a SG |
848 | # c-exp.tab.c is generated in target dir from c-exp.y if it doesn't exist |
849 | # in srcdir, then compiled in target dir to c-exp.tab.o. | |
f4ed8840 JG |
850 | # ././c-exp.tab.c is so the command argument will never match $(srcdir)/c-exp.y |
851 | # (some "makes" rewrite the VPATH into command arguments if they match deps). | |
9aa44833 SG |
852 | # Remove bogus decls for malloc/realloc/free which conflict with everything |
853 | # else. | |
33cf356a | 854 | c-exp.tab.o: c-exp.tab.c |
f4ed8840 | 855 | c-exp.tab.c: $(srcdir)/c-exp.y $(srcdir)/Makefile.in |
33cf356a | 856 | @echo 'Expect 4 shift/reduce conflicts.' |
3717e95b | 857 | ${YACC} ${YFLAGS} $(srcdir)/c-exp.y |
9aa44833 SG |
858 | -sed -e '/extern.*malloc/d' \ |
859 | -e '/extern.*realloc/d' \ | |
860 | -e '/extern.*free/d' \ | |
e58de8a2 | 861 | -e '/include.*malloc.h/d' \ |
e35843d4 FF |
862 | -e 's/malloc/xmalloc/g' \ |
863 | -e 's/realloc/xrealloc/g' \ | |
39d4639b | 864 | < y.tab.c > c-exp.new |
9aa44833 | 865 | -rm y.tab.c |
39d4639b | 866 | mv c-exp.new ././c-exp.tab.c |
d941d8c3 | 867 | |
e58de8a2 FF |
868 | # ch-exp.tab.c is generated in target dir from ch-exp.y if it doesn't exist |
869 | # in srcdir, then compiled in target dir to ch-exp.tab.o. | |
870 | # Remove bogus decls for malloc/realloc/free which conflict with everything | |
871 | # else. | |
872 | ch-exp.tab.o: ch-exp.tab.c | |
f4ed8840 | 873 | ch-exp.tab.c: $(srcdir)/ch-exp.y $(srcdir)/Makefile.in |
3717e95b | 874 | ${YACC} ${YFLAGS} $(srcdir)/ch-exp.y |
e58de8a2 FF |
875 | -sed -e '/extern.*malloc/d' \ |
876 | -e '/extern.*realloc/d' \ | |
877 | -e '/extern.*free/d' \ | |
878 | -e '/include.*malloc.h/d' \ | |
879 | -e 's/malloc/xmalloc/g' \ | |
880 | -e 's/realloc/xrealloc/g' \ | |
39d4639b | 881 | < y.tab.c > ch-exp.new |
e58de8a2 | 882 | -rm y.tab.c |
39d4639b | 883 | mv ch-exp.new ././ch-exp.tab.c |
e58de8a2 | 884 | |
33cf356a SG |
885 | # m2-exp.tab.c is generated in target dir from m2-exp.y if it doesn't exist |
886 | # in srcdir, then compiled in target dir to m2-exp.tab.o. | |
e58de8a2 FF |
887 | # Remove bogus decls for malloc/realloc/free which conflict with everything |
888 | # else. | |
33cf356a | 889 | m2-exp.tab.o: m2-exp.tab.c |
f4ed8840 | 890 | m2-exp.tab.c: $(srcdir)/m2-exp.y $(srcdir)/Makefile.in |
3717e95b | 891 | ${YACC} ${YFLAGS} $(srcdir)/m2-exp.y |
9aa44833 SG |
892 | -sed -e '/extern.*malloc/d' \ |
893 | -e '/extern.*realloc/d' \ | |
894 | -e '/extern.*free/d' \ | |
e58de8a2 | 895 | -e '/include.*malloc.h/d' \ |
e35843d4 FF |
896 | -e 's/malloc/xmalloc/g' \ |
897 | -e 's/realloc/xrealloc/g' \ | |
39d4639b | 898 | < y.tab.c > m2-exp.new |
9aa44833 | 899 | -rm y.tab.c |
39d4639b JK |
900 | mv m2-exp.new ././m2-exp.tab.c |
901 | ||
902 | # These files are updated atomically, so make never has to remove them | |
903 | .PRECIOUS: m2-exp.tab.c ch-exp.tab.c c-exp.tab.c | |
d941d8c3 | 904 | |
33cf356a SG |
905 | lint: $(LINTFILES) |
906 | $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \ | |
907 | `echo ${DEPFILES} | sed 's/\.o /\.c /g' | |
d941d8c3 | 908 | |
33cf356a SG |
909 | gdb.cxref: $(SFILES) |
910 | cxref -I. $(SFILES) >gdb.cxref | |
d941d8c3 | 911 | |
33cf356a | 912 | force_update: |
d941d8c3 | 913 | |
33cf356a SG |
914 | # GNU Make has an annoying habit of putting *all* the Makefile variables |
915 | # into the environment, unless you include this target as a circumvention. | |
916 | # Rumor is that this will be fixed (and this target can be removed) | |
917 | # in GNU Make 4.0. | |
918 | .NOEXPORT: | |
d941d8c3 | 919 | |
aecc5459 ILT |
920 | # GNU Make 3.63 has a different problem: it keeps tacking command line |
921 | # overrides onto the definition of $(MAKE). This variable setting | |
922 | # will remove them. | |
923 | MAKEOVERRIDES= | |
924 | ||
58bb1e76 ILT |
925 | ## This is ugly, but I don't want GNU make to put these variables in |
926 | ## the environment. Older makes will see this as a set of targets | |
927 | ## with no dependencies and no actions. | |
928 | unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET : | |
58bb1e76 | 929 | |
33cf356a SG |
930 | # This is the end of "Makefile.in". When built into "Makefile" |
931 | # by the configure script, two things are added below this point: | |
97e72c06 | 932 | # alldeps.mak -- definitions of all files that are used in |
33cf356a SG |
933 | # host- or target-dependent configurations |
934 | # depend -- what .o files depend on what .c and .h files, | |
935 | # for all configurations. |