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