1 #Copyright 1989, 1990, 1991, 1992, 1993, 1994 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
44 INSTALL
= `cd $(srcdir)/../..;pwd`/install.sh
-c
45 INSTALL_PROGRAM
= $(INSTALL
)
46 INSTALL_DATA
= $(INSTALL
)
47 INSTALL_XFORM
= $(INSTALL
) -t
='$(program_transform_name)'
48 INSTALL_XFORM1
= $(INSTALL_XFORM
) -b
=.1
51 if [ -f ../../gcc/xgcc ] ; then \
52 if [ -f ../../newlib/Makefile ] ; then \
53 echo ../../gcc/xgcc -B../../gcc/ -idirafter ../newlib/targ-include -idirafter $${rootsrc}/../newlib/libc/include -nostdinc -L../../../newlib -B../../../newlib/; \
55 echo ../../gcc/xgcc -B../../gcc/; \
58 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
61 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
65 NLMCONV_FOR_TARGET
= ` \
66 if [ -f ../../binutils/nlmconv ] ; then \
67 echo ../../binutils/nlmconv; \
69 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
72 t='$(program_transform_name)'; echo nlmconv | sed -e '' $$t; \
80 # System V: If you compile gdb with a compiler which uses the coff
81 # encapsulation feature (this is a function of the compiler used, NOT
82 # of the m-?.h file selected by config.gdb), you must make sure that
83 # the GNU nm is the one that is used by munch.
85 # If you are compiling with GCC, make sure that either 1) You use the
86 # -traditional flag, or 2) You have the fixed include files where GCC
87 # can reach them. Otherwise the ioctl calls in inflow.c
88 # will be incorrectly compiled. The "fixincludes" script in the gcc
89 # distribution will fix your include files up.
94 # Directory containing source files. Don't clean up the spacing,
95 # this exact string is matched for by the "configure" script.
98 # It is also possible that you will need to add -I/usr/include/sys to the
99 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
100 # is where it should be according to Posix).
102 # where to find texinfo; GDB dist should include a recent one
103 TEXIDIR
=${srcdir}/..
/texinfo
105 # where to find makeinfo, preferably one designed for texinfo-2
108 # Set this up with gcc if you have gnu ld and the loader will print out
109 # line numbers for undefinded refs.
113 # Where is the "include" directory? Traditionally ../include or ./include
114 INCLUDE_DIR
= ${srcdir}/..
/..
/include
115 INCLUDE_DEP
= $$(INCLUDE_DIR
)
117 # All the includes used for CFLAGS and for lint.
118 # -I. for config files.
119 # -I${srcdir} possibly for regex.h also.
120 # -I${srcdir}/config for more generic config files.
121 INCLUDE_CFLAGS
= -I.
-I
${srcdir} -I
${srcdir}/..
-I
${srcdir}/..
/config
-I
$(INCLUDE_DIR
)
123 # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
124 # from the config/ directory.
125 GLOBAL_CFLAGS
= ${MT_CFLAGS} ${MH_CFLAGS}
126 #PROFILE_CFLAGS = -pg
128 # CFLAGS is specifically reserved for setting from the command line
129 # when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
131 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
132 INTERNAL_CFLAGS
= ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${USER_CFLAGS}
135 # Perhaps should come from parent Makefile
136 VERSION
= gdbserve-4.12
140 LINTFLAGS
= -I
${BFD_DIR}
142 # Host and target-dependent makefile fragments come in here.
144 # End of host and target-dependent makefile fragments
146 # All source files that go into linking GDB remote server.
148 DEPFILES
= $(GDBSERVE_DEPFILES
)
150 SOURCES
= $(ALLDEPFILES
)
151 TAGFILES
= $(SOURCES
) ${HFILES} ${ALLPARAM} ${POSSLIBS}
153 # Prevent Sun make from putting in the machine type. Setting
154 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
156 ${CC_FOR_TARGET} -c
${INTERNAL_CFLAGS} $<
159 ${CC_FOR_TARGET} -c
${INTERNAL_CFLAGS} $<
163 # Traditionally "install" depends on "all". But it may be useful
164 # not to; for example, if the user has made some trivial change to a
165 # source file and doesn't care about rebuilding or just wants to save the
166 # time it takes for make to check that all is up to date.
167 # install-only is intended to address that need.
168 install: all install-only
170 $(INSTALL_XFORM
) gdbserve.nlm
$(bindir)/gdbserve.nlm
173 rm -f
$(bindir)/gdbserve.nlm
181 gdbserve.nlm
: gdbserve.O
$(srcdir)/gdbserve.def
182 ${NLMCONV_FOR_TARGET} -T
$(srcdir)/gdbserve.def
184 gdbserve.O
: prelude.o gdbserve.o
$(TDEPFILES
)
185 ${CC_FOR_TARGET} $(LDFLAGS
) -r
-o gdbserve.O prelude.o gdbserve.o
${TDEPFILES}
188 @echo
"You must configure gdbserver. Look at the README file for details."
191 # Put the proper machine-specific files first, so M-. on a machine
192 # specific routine gets the one for the correct machine.
193 # The xyzzy stuff below deals with empty DEPFILES
195 etags
`find ${srcdir}/../config -name $(TM_FILE) -print` \
196 `find ${srcdir}/../config -name ${XM_FILE} -print` \
197 `find ${srcdir}/../config -name ${NAT_FILE} -print` \
198 `for i in yzzy ${DEPFILES}; do \
199 if [ x$$i != xyzzy ]; then \
200 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
207 rm -f
*.o
${ADD_FILES} *~
208 rm -f gdbserve.O gdbserve.nlm core make.log
210 distclean: clean TAGS
219 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
220 $(SHELL
) .
/config.status
224 # GNU Make has an annoying habit of putting *all* the Makefile variables
225 # into the environment, unless you include this target as a circumvention.
226 # Rumor is that this will be fixed (and this target can be removed)
230 # GNU Make 3.63 has a different problem: it keeps tacking command line
231 # overrides onto the definition of $(MAKE). This variable setting
235 # This is the end of "Makefile.in".