1 #Copyright 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
3 # This file is part of GDB.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
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.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 program_transform_name
=
22 exec_prefix = $(prefix)
23 bindir = $(exec_prefix)/bin
24 libdir = $(exec_prefix)/lib
25 tooldir
= $(libdir)/$(target_alias
)
27 datadir = $(prefix)/lib
28 mandir = $(prefix)/man
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
38 infodir = $(prefix)/info
39 includedir = $(prefix)/include
40 docdir
= $(datadir)/doc
45 INSTALL_PROGRAM
= $(INSTALL
)
46 INSTALL_DATA
= $(INSTALL
)
52 # Flags that describe where you can find the termcap library.
53 # This can be overridden in the host Makefile fragment file.
56 # System V: If you compile gdb with a compiler which uses the coff
57 # encapsulation feature (this is a function of the compiler used, NOT
58 # of the m-?.h file selected by config.gdb), you must make sure that
59 # the GNU nm is the one that is used by munch.
61 # If you are compiling with GCC, make sure that either 1) You use the
62 # -traditional flag, or 2) You have the fixed include files where GCC
63 # can reach them. Otherwise the ioctl calls in inflow.c
64 # will be incorrectly compiled. The "fixincludes" script in the gcc
65 # distribution will fix your include files up.
70 # Directory containing source files. Don't clean up the spacing,
71 # this exact string is matched for by the "configure" script.
74 # It is also possible that you will need to add -I/usr/include/sys to the
75 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
76 # is where it should be according to Posix).
78 # If you use bison instead of yacc, it needs to include the "-y" argument.
83 # where to find texinfo; GDB dist should include a recent one
84 TEXIDIR
=${srcdir}/..
/texinfo
86 # where to find makeinfo, preferably one designed for texinfo-2
89 # Set this up with gcc if you have gnu ld and the loader will print out
90 # line numbers for undefinded refs.
94 # Where is the "include" directory? Traditionally ../include or ./include
95 INCLUDE_DIR
= ${srcdir}/..
/..
/include
96 INCLUDE_DEP
= $$(INCLUDE_DIR
)
98 # Where is the source dir for the MMALLOC library? Traditionally ../mmalloc
99 # or ./mmalloc (When we want the binary library built from it, we use
100 # ${MMALLOC_DIR}${subdir}.)
101 # Note that mmalloc can still be used on systems without mmap().
102 # To use your system malloc, comment out the following defines.
103 MMALLOC_DIR
= ${srcdir}/..
/mmalloc
104 MMALLOC_DEP
= $$(MMALLOC_DIR
)
105 # To use your system malloc, uncomment MMALLOC_DISABLE.
106 #MMALLOC_DISABLE = -DNO_MMALLOC
107 # To use mmalloc but disable corruption checking, uncomment MMALLOC_CHECK
108 #MMALLOC_CHECK = -DNO_MMALLOC_CHECK
109 MMALLOC_CFLAGS
= ${MMALLOC_CHECK} ${MMALLOC_DISABLE}
111 # Where is the source dir for the READLINE library? Traditionally in .. or .
112 # (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
113 READLINE_DIR
= ${srcdir}/..
/readline
114 READLINE_DEP
= $$(READLINE_DIR
)
116 # All the includes used for CFLAGS and for lint.
117 # -I. for config files.
118 # -I${srcdir} possibly for regex.h also.
119 # -I${srcdir}/config for more generic config files.
120 INCLUDE_CFLAGS
= -I.
-I
${srcdir} -I
${srcdir}/..
-I
${srcdir}/..
/config
-I
$(INCLUDE_DIR
)
122 # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
123 # from the config/ directory.
124 GLOBAL_CFLAGS
= ${MT_CFLAGS} ${MH_CFLAGS}
125 #PROFILE_CFLAGS = -pg
127 # CFLAGS is specifically reserved for setting from the command line
128 # when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
130 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
131 INTERNAL_CFLAGS
= ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MMALLOC_CFLAGS} ${INCLUDE_CFLAGS} ${USER_CFLAGS}
134 # Perhaps should come from parent Makefile
135 VERSION
= gdbserver-4.9
.1
139 LINTFLAGS
= -I
${BFD_DIR}
141 # Host and target-dependent makefile fragments come in here.
143 # End of host and target-dependent makefile fragments
145 # All source files that go into linking GDB remote server.
147 SFILES
= $(srcdir)/low-lynx.c
$(srcdir)/low-sparc.c
$(srcdir)/low-sun3.c \
148 $(srcdir)/utils.c
$(srcdir)/server.c
$(srcdir)/remote-utils.c
150 DEPFILES
= $(GDBSERVER_DEPFILES
)
152 SOURCES
= $(SFILES
) $(ALLDEPFILES
) $(YYFILES
)
153 TAGFILES
= $(SOURCES
) ${HFILES} ${ALLPARAM} ${POSSLIBS}
155 OBS
= utils.o
$(GDBSERVER_DEPFILES
) server.o remote-utils.o
157 # Prevent Sun make from putting in the machine type. Setting
158 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
160 ${CC} -c
${INTERNAL_CFLAGS} $<
170 gdbserver
: $(OBS
) ${ADD_DEPS} ${CDEPS}
171 ${CC-LD
} $(GLOBAL_CFLAGS
) $(LDFLAGS
) -o gdbserver
$(OBS
) \
175 @echo
"You must configure gdbserver. Look at the README file for details."
178 # Put the proper machine-specific files first, so M-. on a machine
179 # specific routine gets the one for the correct machine.
180 # The xyzzy stuff below deals with empty DEPFILES
182 etags
`find ${srcdir}/config -name $(TM_FILE) -print` \
183 `find ${srcdir}/config -name ${XM_FILE} -print` \
184 `find ${srcdir}/config -name ${NAT_FILE} -print` \
185 `for i in yzzy ${DEPFILES}; do \
186 if [ x$$i != xyzzy ]; then \
187 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
193 # Making distributions of GDB and friends.
195 # Make a tar file containing the GDB directory of the distribution.
196 gdb.
tar.Z
: force_update
197 $(MAKE
) $(MFLAGS
) -f Makefile.in setup-to-dist
198 $(MAKE
) $(MFLAGS
) -f Makefile.in gdb-
$(VERSION
).
tar.Z
200 # Make a directory `proto-gdb.dir' that contains an image of the GDB
201 # directory of the distribution, built up with symlinks. Note that this
202 # make target is not directly referenced by any other rules in this makefile,
203 # it is referenced by the makefile in the parent directory.
204 make-proto-gdb.
dir: force_update
205 $(MAKE
) $(MFLAGS
) -f Makefile.in setup-to-dist
206 $(MAKE
) $(MFLAGS
) -f Makefile make-proto-gdb-1
208 # Set up the GDB source directory for distribution, by building all files that
209 # are products of other files.
210 setup-to-dist
: update-depend force_update
212 (cd doc
; $(MAKE
) $(MFLAGS
) GDBvn.texi
)
213 $(MAKE
) $(MFLAGS
) gdb.
info
214 $(MAKE
) $(MFLAGS
) refcard.ps
216 # Update the "depend" and "alldeps.mak" files in a source directory.
217 # We update alldeps.mak first, since it is used to generate the list
218 # of files to be checked for dependencies.
219 update-depend
: update-alldeps force_update
220 ..
/configure none
-norecursion
222 $(MAKE
) $(MFLAGS
) depend
224 # Update the "alldeps.mak" file in a source directory.
225 update-alldeps
: force_update
226 ..
/configure none
-norecursion
228 $(MAKE
) $(MFLAGS
) alldeps.mak
230 # Build a tar file from a proto-gdb.dir.
231 gdb-
$(VERSION
).
tar.Z
: force_update
232 rm -f gdb.
tar gdb-
$(VERSION
).
tar.Z
233 $(MAKE
) $(MFLAGS
) -f Makefile make-proto-gdb-1
234 ln
-s proto-gdb.
dir $(DIST
)
235 tar chf
- $(DIST
) | compress
>gdb-
$(VERSION
).
tar.Z
236 rm -rf
$(DIST
) proto-gdb.
dir
239 rm -f
*.o
${ADD_FILES} *~
240 rm -f init.c version.c
241 rm -f gdbserver core make.log
243 distclean: clean c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS
244 rm -f tm.h xm.h config.status
248 rm -f c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS
249 rm -f tm.h xm.h config.status
252 STAGESTUFF
=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
254 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
255 $(SHELL
) .
/config.status
260 echo
'char *version = "$(VERSION)";' >version.c
262 # GNU Make has an annoying habit of putting *all* the Makefile variables
263 # into the environment, unless you include this target as a circumvention.
264 # Rumor is that this will be fixed (and this target can be removed)
268 # GNU Make 3.63 has a different problem: it keeps tacking command line
269 # overrides onto the definition of $(MAKE). This variable setting
273 ## This is ugly, but I don't want GNU make to put these variables in
274 ## the environment. Older makes will see this as a set of targets
275 ## with no dependencies and no actions.
276 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
278 server.o
: ${srcdir}/server.c
${srcdir}/server.h
279 remote-utils.o
: ${srcdir}/remote-utils.c
${srcdir}/server.h
280 low-lynx.o
: ${srcdir}/low-lynx.c
${srcdir}/server.h
281 low-sparc.o
: $(srcdir)/low-sparc.c
$(srcdir)/server.h
282 low-sun3.o
: $(srcdir)/low-sun3.c
$(srcdir)/server.h
283 utils.o
: ${srcdir}/utils.c
${srcdir}/server.h
285 # This is the end of "Makefile.in".