1 #Copyright 1989, 90, 91, 92, 93, 94, 95, 96, 97, 99, 2000
2 #Free Software Foundation, Inc.
4 # This file is part of GDB.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 exec_prefix = @
exec_prefix@
23 host_alias
= @host_alias@
24 target_alias
= @target_alias@
25 program_transform_name
= @program_transform_name@
28 tooldir
= $(libdir)/$(target_alias
)
32 man1dir = $(mandir)/man1
33 man2dir = $(mandir)/man2
34 man3dir = $(mandir)/man3
35 man4dir = $(mandir)/man4
36 man5dir = $(mandir)/man5
37 man6dir = $(mandir)/man6
38 man7dir = $(mandir)/man7
39 man8dir = $(mandir)/man8
40 man9dir = $(mandir)/man9
42 htmldir
= $(prefix)/html
43 includedir = @
includedir@
48 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
49 INSTALL_DATA
= @INSTALL_DATA@
55 # If you are compiling with GCC, make sure that either 1) You use the
56 # -traditional flag, or 2) You have the fixed include files where GCC
57 # can reach them. Otherwise the ioctl calls in inflow.c
58 # will be incorrectly compiled. The "fixincludes" script in the gcc
59 # distribution will fix your include files up.
64 # Directory containing source files. Don't clean up the spacing,
65 # this exact string is matched for by the "configure" script.
69 # It is also possible that you will need to add -I/usr/include/sys to the
70 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
71 # is where it should be according to Posix).
73 # Set this up with gcc if you have gnu ld and the loader will print out
74 # line numbers for undefinded refs.
78 # Where is the "include" directory? Traditionally ../include or ./include
79 INCLUDE_DIR
= ${srcdir}/..
/..
/include
80 INCLUDE_DEP
= $$(INCLUDE_DIR
)
82 # Where are the BFD library?
84 BFD
= $(BFD_DIR
)/libbfd.a
85 BFD_SRC
= $(srcdir)/$(BFD_DIR
)
86 BFD_CFLAGS
= -I
$(BFD_DIR
) -I
$(BFD_SRC
)
88 # Where is the source dir for the READLINE library? Traditionally in .. or .
89 # (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
90 READLINE_DIR
= ${srcdir}/..
/readline
91 READLINE_DEP
= $$(READLINE_DIR
)
93 # All the includes used for CFLAGS and for lint.
94 # -I. for config files.
95 # -I.. for gdb's config files (especially config.h)
96 # -I${srcdir} possibly for regex.h also.
97 # -I${srcdir}/config for more generic config files.
98 INCLUDE_CFLAGS
= -I.
-I..
-I
${srcdir} -I
${srcdir}/..
-I
${srcdir}/..
/config
-I
$(INCLUDE_DIR
)
100 # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
101 # from the config/ directory.
102 GLOBAL_CFLAGS
= ${MT_CFLAGS} ${MH_CFLAGS}
103 #PROFILE_CFLAGS = -pg
105 # CFLAGS is specifically reserved for setting from the command line
106 # when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
108 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
109 INTERNAL_CFLAGS
= ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} \
110 ${INCLUDE_CFLAGS} ${BFD_CFLAGS} -DGDBSERVER
112 # LDFLAGS is specifically reserved for setting from the command line
115 # Perhaps should come from parent Makefile
116 VERSION
= gdbserver-4.12
.3
120 LINTFLAGS
= $(BFD_CFLAGS
)
122 # Host and target-dependent makefile fragments come in here.
124 @target_makefile_frag@
125 # End of host and target-dependent makefile fragments
127 # All source files that go into linking GDB remote server.
129 SFILES
= $(srcdir)/low-hppabsd.c
$(srcdir)/low-linux.c
$(srcdir)/low-lynx.c \
130 $(srcdir)/low-nbsd.c
$(srcdir)/low-sim.c
$(srcdir)/low-sparc.c \
131 $(srcdir)/low-sun3.c
$(srcdir)/utils.c
$(srcdir)/server.c \
132 $(srcdir)/remote-utils.c
134 DEPFILES
= $(GDBSERVER_DEPFILES
)
136 SOURCES
= $(SFILES
) $(ALLDEPFILES
)
137 TAGFILES
= $(SOURCES
) ${HFILES} ${ALLPARAM} ${POSSLIBS}
139 OBS
= utils.o
$(GDBSERVER_DEPFILES
) server.o remote-utils.o
141 # Prevent Sun make from putting in the machine type. Setting
142 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
144 ${CC} -c
${INTERNAL_CFLAGS} $<
146 all: gdbserver gdbreplay
148 # Traditionally "install" depends on "all". But it may be useful
149 # not to; for example, if the user has made some trivial change to a
150 # source file and doesn't care about rebuilding or just wants to save the
151 # time it takes for make to check that all is up to date.
152 # install-only is intended to address that need.
153 install: all install-only
155 n
=`echo gdbserver | sed '$(program_transform_name)'`; \
156 if
[ x
$$n = x
]; then n
=gdbserver
; else true
; fi
; \
157 $(INSTALL_PROGRAM
) gdbserver
$(bindir)/$$n; \
158 $(INSTALL_DATA
) $(srcdir)/gdbserver
.1 $(man1dir)/$$n.1
161 n
=`echo gdbserver | sed '$(program_transform_name)'`; \
162 if
[ x
$$n = x
]; then n
=gdbserver
; else true
; fi
; \
163 rm -f
$(bindir)/$$n $(man1dir)/$$n.1
173 gdbserver
: $(OBS
) ${ADD_DEPS} ${CDEPS}
175 ${CC-LD
} $(GLOBAL_CFLAGS
) $(LDFLAGS
) -o gdbserver
$(OBS
) \
176 $(GDBSERVER_LIBS
) $(XM_CLIBS
)
178 gdbreplay
: gdbreplay.o
180 ${CC-LD
} $(GLOBAL_CFLAGS
) $(LDFLAGS
) -o gdbreplay gdbreplay.o \
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 gdbreplay 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
: Makefile.in config.status @frags@
213 $(SHELL
) .
/config.status
215 config.status
: configure
216 $(SHELL
) .
/config.status
--recheck
221 echo
'char *version = "$(VERSION)";' >version.c
223 # GNU Make has an annoying habit of putting *all* the Makefile variables
224 # into the environment, unless you include this target as a circumvention.
225 # Rumor is that this will be fixed (and this target can be removed)
229 # GNU Make 3.63 has a different problem: it keeps tacking command line
230 # overrides onto the definition of $(MAKE). This variable setting
234 ## This is ugly, but I don't want GNU make to put these variables in
235 ## the environment. Older makes will see this as a set of targets
236 ## with no dependencies and no actions.
237 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
239 server.o
: ${srcdir}/server.c
${srcdir}/server.h
240 remote-utils.o
: ${srcdir}/remote-utils.c
${srcdir}/server.h
241 low-linux.o
: ${srcdir}/low-linux.c
${srcdir}/server.h
242 low-lynx.o
: ${srcdir}/low-lynx.c
${srcdir}/server.h
243 low-nbsd.o
: ${srcdir}/low-nbsd.c
${srcdir}/server.h
244 low-sim.o
: ${srcdir}/low-sim.c
${srcdir}/server.h
245 low-sparc.o
: $(srcdir)/low-sparc.c
$(srcdir)/server.h
246 low-sun3.o
: $(srcdir)/low-sun3.c
$(srcdir)/server.h
247 low-hppabsd.o
: $(srcdir)/low-hppabsd.c
$(srcdir)/server.h
248 utils.o
: ${srcdir}/utils.c
${srcdir}/server.h
250 # This is the end of "Makefile.in".