2002-02-04 Daniel Jacobowitz <drow@mvista.com>
[deliverable/binutils-gdb.git] / gdb / gdbserver / Makefile.in
1 #Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
2 #1999, 2000
3 #Free Software Foundation, Inc.
4
5 # This file is part of GDB.
6
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
21 prefix = @prefix@
22 exec_prefix = @exec_prefix@
23
24 host_alias = @host_alias@
25 target_alias = @target_alias@
26 program_transform_name = @program_transform_name@
27 bindir = @bindir@
28 libdir = @libdir@
29 tooldir = $(libdir)/$(target_alias)
30
31 datadir = @datadir@
32 mandir = @mandir@
33 man1dir = $(mandir)/man1
34 man2dir = $(mandir)/man2
35 man3dir = $(mandir)/man3
36 man4dir = $(mandir)/man4
37 man5dir = $(mandir)/man5
38 man6dir = $(mandir)/man6
39 man7dir = $(mandir)/man7
40 man8dir = $(mandir)/man8
41 man9dir = $(mandir)/man9
42 infodir = @infodir@
43 htmldir = $(prefix)/html
44 includedir = @includedir@
45
46 SHELL = /bin/sh
47
48 INSTALL = @INSTALL@
49 INSTALL_PROGRAM = @INSTALL_PROGRAM@
50 INSTALL_DATA = @INSTALL_DATA@
51
52 AR = ar
53 AR_FLAGS = qv
54 RANLIB = ranlib
55
56 # If you are compiling with GCC, make sure that either 1) You use the
57 # -traditional flag, or 2) You have the fixed include files where GCC
58 # can reach them. Otherwise the ioctl calls in inflow.c
59 # will be incorrectly compiled. The "fixincludes" script in the gcc
60 # distribution will fix your include files up.
61 #CC=cc
62 #CC=gcc -traditional
63 GCC=gcc
64
65 # Directory containing source files. Don't clean up the spacing,
66 # this exact string is matched for by the "configure" script.
67 srcdir = @srcdir@
68 VPATH = @srcdir@
69
70 # It is also possible that you will need to add -I/usr/include/sys to the
71 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
72 # is where it should be according to Posix).
73
74 # Set this up with gcc if you have gnu ld and the loader will print out
75 # line numbers for undefinded refs.
76 #CC-LD=gcc -static
77 CC-LD=${CC}
78
79 # Where is the "include" directory? Traditionally ../include or ./include
80 INCLUDE_DIR = ${srcdir}/../../include
81 INCLUDE_DEP = $$(INCLUDE_DIR)
82
83 # Where are the BFD library?
84 BFD_DIR = ../../bfd
85 BFD = $(BFD_DIR)/libbfd.a
86 BFD_SRC = $(srcdir)/$(BFD_DIR)
87 BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
88
89 # Where is the source dir for the READLINE library? Traditionally in .. or .
90 # (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
91 READLINE_DIR = ${srcdir}/../readline
92 READLINE_DEP = $$(READLINE_DIR)
93
94 # All the includes used for CFLAGS and for lint.
95 # -I. for config files.
96 # -I.. for gdb's config files (especially config.h)
97 # -I${srcdir} possibly for regex.h also.
98 # -I${srcdir}/config for more generic config files.
99 # -I$(srcdir)/../regformats for regdef.h
100 INCLUDE_CFLAGS = -I. -I.. -I${srcdir} -I${srcdir}/.. -I${srcdir}/../config \
101 -I$(INCLUDE_DIR) -I$(srcdir)/../regformats
102
103 # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
104 # from the config/ directory.
105 GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
106 #PROFILE_CFLAGS = -pg
107
108 # CFLAGS is specifically reserved for setting from the command line
109 # when running make. I.E. "make CFLAGS=-Wmissing-prototypes".
110 CFLAGS = -g
111 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
112 INTERNAL_CFLAGS = ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} \
113 ${INCLUDE_CFLAGS} ${BFD_CFLAGS} -DGDBSERVER
114
115 # LDFLAGS is specifically reserved for setting from the command line
116 # when running make.
117
118 # Perhaps should come from parent Makefile
119 VERSION = gdbserver-4.12.3
120 DIST=gdb
121
122 LINT=/usr/5bin/lint
123 LINTFLAGS= $(BFD_CFLAGS)
124
125 # Host and target-dependent makefile fragments come in here.
126 @host_makefile_frag@
127 @target_makefile_frag@
128 # End of host and target-dependent makefile fragments
129
130 # All source files that go into linking GDB remote server.
131
132 SFILES = $(srcdir)/low-hppabsd.c $(srcdir)/low-linux.c $(srcdir)/low-lynx.c \
133 $(srcdir)/low-nbsd.c $(srcdir)/low-sim.c $(srcdir)/low-sparc.c \
134 $(srcdir)/low-sun3.c $(srcdir)/utils.c $(srcdir)/server.c \
135 $(srcdir)/remote-utils.c
136
137 DEPFILES = $(GDBSERVER_DEPFILES)
138
139 SOURCES = $(SFILES) $(ALLDEPFILES)
140 TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
141
142 OBS = utils.o $(GDBSERVER_DEPFILES) server.o remote-utils.o
143
144 # Prevent Sun make from putting in the machine type. Setting
145 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
146 .c.o:
147 ${CC} -c ${INTERNAL_CFLAGS} $<
148
149 all: gdbserver gdbreplay
150
151 # Traditionally "install" depends on "all". But it may be useful
152 # not to; for example, if the user has made some trivial change to a
153 # source file and doesn't care about rebuilding or just wants to save the
154 # time it takes for make to check that all is up to date.
155 # install-only is intended to address that need.
156 install: all install-only
157 install-only:
158 n=`echo gdbserver | sed '$(program_transform_name)'`; \
159 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
160 $(INSTALL_PROGRAM) gdbserver $(bindir)/$$n; \
161 $(INSTALL_DATA) $(srcdir)/gdbserver.1 $(man1dir)/$$n.1
162
163 uninstall: force
164 n=`echo gdbserver | sed '$(program_transform_name)'`; \
165 if [ x$$n = x ]; then n=gdbserver; else true; fi; \
166 rm -f $(bindir)/$$n $(man1dir)/$$n.1
167
168 installcheck:
169 check:
170 info dvi:
171 install-info:
172 html:
173 install-html:
174 clean-info:
175
176 gdbserver: $(OBS) ${ADD_DEPS} ${CDEPS}
177 rm -f gdbserver
178 ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbserver $(OBS) \
179 $(GDBSERVER_LIBS) $(XM_CLIBS)
180
181 gdbreplay: gdbreplay.o
182 rm -f gdbreplay
183 ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbreplay gdbreplay.o \
184 $(XM_CLIBS)
185
186 # Put the proper machine-specific files first, so M-. on a machine
187 # specific routine gets the one for the correct machine.
188 # The xyzzy stuff below deals with empty DEPFILES
189 TAGS: ${TAGFILES}
190 etags `find ${srcdir}/../config -name $(TM_FILE) -print` \
191 `find ${srcdir}/../config -name ${XM_FILE} -print` \
192 `find ${srcdir}/../config -name ${NAT_FILE} -print` \
193 `for i in yzzy ${DEPFILES}; do \
194 if [ x$$i != xyzzy ]; then \
195 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
196 fi; \
197 done` \
198 ${TAGFILES}
199 tags: TAGS
200
201 clean:
202 rm -f *.o ${ADD_FILES} *~
203 rm -f gdbserver gdbreplay core make.log
204
205 distclean: clean
206 rm -f nm.h tm.h xm.h config.status
207 rm -f Makefile
208
209 maintainer-clean realclean: clean
210 rm -f nm.h tm.h xm.h config.status
211 rm -f Makefile
212
213 STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
214
215 Makefile: Makefile.in config.status @frags@
216 $(SHELL) ./config.status
217
218 config.status: configure
219 $(SHELL) ./config.status --recheck
220
221 force:
222
223 version.c: Makefile
224 echo 'char *version = "$(VERSION)";' >version.c
225
226 # GNU Make has an annoying habit of putting *all* the Makefile variables
227 # into the environment, unless you include this target as a circumvention.
228 # Rumor is that this will be fixed (and this target can be removed)
229 # in GNU Make 4.0.
230 .NOEXPORT:
231
232 # GNU Make 3.63 has a different problem: it keeps tacking command line
233 # overrides onto the definition of $(MAKE). This variable setting
234 # will remove them.
235 MAKEOVERRIDES=
236
237 ## This is ugly, but I don't want GNU make to put these variables in
238 ## the environment. Older makes will see this as a set of targets
239 ## with no dependencies and no actions.
240 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
241
242 server.o : ${srcdir}/server.c ${srcdir}/server.h
243 remote-utils.o : ${srcdir}/remote-utils.c ${srcdir}/server.h
244 low-linux.o : ${srcdir}/low-linux.c ${srcdir}/server.h
245 low-lynx.o : ${srcdir}/low-lynx.c ${srcdir}/server.h
246 low-nbsd.o : ${srcdir}/low-nbsd.c ${srcdir}/server.h
247 low-sim.o : ${srcdir}/low-sim.c ${srcdir}/server.h
248 low-sparc.o : $(srcdir)/low-sparc.c $(srcdir)/server.h
249 low-sun3.o : $(srcdir)/low-sun3.c $(srcdir)/server.h
250 low-hppabsd.o : $(srcdir)/low-hppabsd.c $(srcdir)/server.h
251 utils.o : ${srcdir}/utils.c ${srcdir}/server.h
252
253 regdef_h = $(srcdir)/../regformats/regdef.h
254 regdat_sh = $(srcdir)/../regformats/regdat.sh
255
256 reg-arm.o : reg-arm.c $(regdef_h)
257 reg-arm.c : $(srcdir)/../regformats/reg-arm.dat $(regdat_sh)
258 sh $(regdat_sh) $(srcdir)/../regformats/reg-arm.dat reg-arm.c
259 reg-i386.o : reg-i386.c $(regdef_h)
260 reg-i386.c : $(srcdir)/../regformats/reg-i386.dat $(regdat_sh)
261 sh $(regdat_sh) $(srcdir)/../regformats/reg-i386.dat reg-i386.c
262 reg-ia64.o : reg-ia64.c $(regdef_h)
263 reg-ia64.c : $(srcdir)/../regformats/reg-ia64.dat $(regdat_sh)
264 sh $(regdat_sh) $(srcdir)/../regformats/reg-ia64.dat reg-ia64.c
265 reg-m68k.o : reg-m68k.c $(regdef_h)
266 reg-m68k.c : $(srcdir)/../regformats/reg-m68k.dat $(regdat_sh)
267 sh $(regdat_sh) $(srcdir)/../regformats/reg-m68k.dat reg-m68k.c
268 reg-mips.o : reg-mips.c $(regdef_h)
269 reg-mips.c : $(srcdir)/../regformats/reg-mips.dat $(regdat_sh)
270 sh $(regdat_sh) $(srcdir)/../regformats/reg-mips.dat reg-mips.c
271 reg-ppc.o : reg-ppc.c $(regdef_h)
272 reg-ppc.c : $(srcdir)/../regformats/reg-ppc.dat $(regdat_sh)
273 sh $(regdat_sh) $(srcdir)/../regformats/reg-ppc.dat reg-ppc.c
274 reg-sh.o : reg-sh.c $(regdef_h)
275 reg-sh.c : $(srcdir)/../regformats/reg-sh.dat $(regdat_sh)
276 sh $(regdat_sh) $(srcdir)/../regformats/reg-sh.dat reg-sh.c
277
278 # This is the end of "Makefile.in".
This page took 0.041235 seconds and 5 git commands to generate.