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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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)/share
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
43 INSTALL
= `cd $(srcdir)/../..;pwd`/install.sh
-c
44 INSTALL_PROGRAM
= $(INSTALL
)
45 INSTALL_DATA
= $(INSTALL
)
46 INSTALL_XFORM
= $(INSTALL
) -t
='$(program_transform_name)'
47 INSTALL_XFORM1
= $(INSTALL_XFORM
) -b
=.1
53 # If you are compiling with GCC, make sure that either 1) You use the
54 # -traditional flag, or 2) You have the fixed include files where GCC
55 # can reach them. Otherwise the ioctl calls in inflow.c
56 # will be incorrectly compiled. The "fixincludes" script in the gcc
57 # distribution will fix your include files up.
62 # Directory containing source files. Don't clean up the spacing,
63 # this exact string is matched for by the "configure" script.
66 # It is also possible that you will need to add -I/usr/include/sys to the
67 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
68 # is where it should be according to Posix).
70 # Set this up with gcc if you have gnu ld and the loader will print out
71 # line numbers for undefinded refs.
75 # Where is the "include" directory? Traditionally ../include or ./include
76 INCLUDE_DIR
= ${srcdir}/..
/..
/include
77 INCLUDE_DEP
= $$(INCLUDE_DIR
)
79 # Where is the source dir for the MMALLOC library? Traditionally ../mmalloc
80 # or ./mmalloc (When we want the binary library built from it, we use
81 # ${MMALLOC_DIR}${subdir}.)
82 # Note that mmalloc can still be used on systems without mmap().
83 # To use your system malloc, comment out the following defines.
84 MMALLOC_DIR
= ${srcdir}/..
/..
/mmalloc
85 MMALLOC_DEP
= $$(MMALLOC_DIR
)
86 # To use your system malloc, uncomment MMALLOC_DISABLE.
87 #MMALLOC_DISABLE = -DNO_MMALLOC
88 # To use mmalloc but disable corruption checking, uncomment MMALLOC_CHECK
89 #MMALLOC_CHECK = -DNO_MMALLOC_CHECK
90 MMALLOC_CFLAGS
= ${MMALLOC_CHECK} ${MMALLOC_DISABLE} -I
${MMALLOC_DIR}
92 # Where are the BFD library?
94 BFD
= $(BFD_DIR
)/libbfd.a
95 BFD_SRC
= $(srcdir)/$(BFD_DIR
)
96 BFD_CFLAGS
= -I
$(BFD_DIR
) -I
$(BFD_SRC
)
98 # Where is the source dir for the READLINE library? Traditionally in .. or .
99 # (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
100 READLINE_DIR
= ${srcdir}/..
/readline
101 READLINE_DEP
= $$(READLINE_DIR
)
103 # All the includes used for CFLAGS and for lint.
104 # -I. for config files.
105 # -I${srcdir} possibly for regex.h also.
106 # -I${srcdir}/config for more generic config files.
107 INCLUDE_CFLAGS
= -I.
-I
${srcdir} -I
${srcdir}/..
-I
${srcdir}/..
/config
-I
$(INCLUDE_DIR
)
109 # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
110 # from the config/ directory.
111 GLOBAL_CFLAGS
= ${MT_CFLAGS} ${MH_CFLAGS}
112 #PROFILE_CFLAGS = -pg
114 # CFLAGS is specifically reserved for setting from the command line
115 # when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
117 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
118 INTERNAL_CFLAGS
= ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} \
119 ${BFD_CFLAGS} ${MMALLOC_CFLAGS} ${INCLUDE_CFLAGS}
121 # LDFLAGS is specifically reserved for setting from the command line
124 # Perhaps should come from parent Makefile
125 VERSION
= gdbserver-4.12
.3
129 LINTFLAGS
= $(BFD_CFLAGS
)
131 # Host and target-dependent makefile fragments come in here.
133 # End of host and target-dependent makefile fragments
135 # All source files that go into linking GDB remote server.
137 SFILES
= $(srcdir)/low-lynx.c
$(srcdir)/low-sparc.c
$(srcdir)/low-sun3.c \
138 $(srcdir)/low-hppabsd.c \
139 $(srcdir)/utils.c
$(srcdir)/server.c
$(srcdir)/remote-utils.c
141 DEPFILES
= $(GDBSERVER_DEPFILES
)
143 SOURCES
= $(SFILES
) $(ALLDEPFILES
)
144 TAGFILES
= $(SOURCES
) ${HFILES} ${ALLPARAM} ${POSSLIBS}
146 OBS
= utils.o
$(GDBSERVER_DEPFILES
) server.o remote-utils.o
148 # Prevent Sun make from putting in the machine type. Setting
149 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
151 ${CC} -c
${INTERNAL_CFLAGS} $<
153 all: gdbserver gdbreplay
155 # Traditionally "install" depends on "all". But it may be useful
156 # not to; for example, if the user has made some trivial change to a
157 # source file and doesn't care about rebuilding or just wants to save the
158 # time it takes for make to check that all is up to date.
159 # install-only is intended to address that need.
160 install: all install-only
162 $(INSTALL_XFORM
) gdbserver
$(bindir)/gdbserver
163 $(INSTALL_XFORM1
) $(srcdir)/gdbserver
.1 $(man1dir)/gdbserver
.1
166 rm -f
$(bindir)/gdbserver
$(man1dir)/gdbserver
.1
174 gdbserver
: $(OBS
) ${ADD_DEPS} ${CDEPS}
176 ${CC-LD
} $(GLOBAL_CFLAGS
) $(LDFLAGS
) -o gdbserver
$(OBS
) \
180 @echo
"You must configure gdbserver. Look at the README file for details."
183 # Put the proper machine-specific files first, so M-. on a machine
184 # specific routine gets the one for the correct machine.
185 # The xyzzy stuff below deals with empty DEPFILES
187 etags
`find ${srcdir}/../config -name $(TM_FILE) -print` \
188 `find ${srcdir}/../config -name ${XM_FILE} -print` \
189 `find ${srcdir}/../config -name ${NAT_FILE} -print` \
190 `for i in yzzy ${DEPFILES}; do \
191 if [ x$$i != xyzzy ]; then \
192 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
199 rm -f
*.o
${ADD_FILES} *~
200 rm -f gdbserver core make.log
203 rm -f nm.h tm.h xm.h config.status
206 maintainer-clean
realclean: clean
207 rm -f nm.h tm.h xm.h config.status
210 STAGESTUFF
=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
212 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
213 $(SHELL
) .
/config.status
218 echo
'char *version = "$(VERSION)";' >version.c
220 # GNU Make has an annoying habit of putting *all* the Makefile variables
221 # into the environment, unless you include this target as a circumvention.
222 # Rumor is that this will be fixed (and this target can be removed)
226 # GNU Make 3.63 has a different problem: it keeps tacking command line
227 # overrides onto the definition of $(MAKE). This variable setting
231 ## This is ugly, but I don't want GNU make to put these variables in
232 ## the environment. Older makes will see this as a set of targets
233 ## with no dependencies and no actions.
234 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
236 server.o
: ${srcdir}/server.c
${srcdir}/server.h
237 remote-utils.o
: ${srcdir}/remote-utils.c
${srcdir}/server.h
238 low-lynx.o
: ${srcdir}/low-lynx.c
${srcdir}/server.h
239 low-sparc.o
: $(srcdir)/low-sparc.c
$(srcdir)/server.h
240 low-sun3.o
: $(srcdir)/low-sun3.c
$(srcdir)/server.h
241 low-hppabsd.o
: $(srcdir)/low-hppabsd.c
$(srcdir)/server.h
242 utils.o
: ${srcdir}/utils.c
${srcdir}/server.h
244 # This is the end of "Makefile.in".