Commit | Line | Data |
---|---|---|
27847c6f SG |
1 | #Copyright 1989, 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. |
2 | ||
3 | # This file is part of GDB. | |
4 | ||
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. | |
9 | # | |
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. | |
14 | # | |
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. | |
18 | ||
19 | prefix = /usr/local | |
20 | ||
21 | program_transform_name = | |
22 | exec_prefix = $(prefix) | |
23 | bindir = $(exec_prefix)/bin | |
24 | libdir = $(exec_prefix)/lib | |
25 | tooldir = $(libdir)/$(target_alias) | |
26 | ||
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 | |
41 | ||
42 | SHELL = /bin/sh | |
43 | ||
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 | |
49 | ||
50 | AR = ar | |
51 | AR_FLAGS = qv | |
52 | RANLIB = ranlib | |
53 | ||
54 | # Flags that describe where you can find the termcap library. | |
55 | # This can be overridden in the host Makefile fragment file. | |
56 | TERMCAP = -ltermcap | |
57 | ||
58 | # System V: If you compile gdb with a compiler which uses the coff | |
59 | # encapsulation feature (this is a function of the compiler used, NOT | |
60 | # of the m-?.h file selected by config.gdb), you must make sure that | |
61 | # the GNU nm is the one that is used by munch. | |
62 | ||
63 | # If you are compiling with GCC, make sure that either 1) You use the | |
64 | # -traditional flag, or 2) You have the fixed include files where GCC | |
65 | # can reach them. Otherwise the ioctl calls in inflow.c | |
66 | # will be incorrectly compiled. The "fixincludes" script in the gcc | |
67 | # distribution will fix your include files up. | |
68 | #CC=cc | |
69 | #CC=gcc -traditional | |
70 | GCC=gcc | |
71 | ||
72 | # Directory containing source files. Don't clean up the spacing, | |
73 | # this exact string is matched for by the "configure" script. | |
74 | srcdir = . | |
75 | ||
76 | # It is also possible that you will need to add -I/usr/include/sys to the | |
77 | # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which | |
78 | # is where it should be according to Posix). | |
79 | ||
80 | # If you use bison instead of yacc, it needs to include the "-y" argument. | |
81 | #BISON=bison -y | |
82 | BISON=yacc | |
83 | YACC=$(BISON) | |
84 | ||
85 | # where to find texinfo; GDB dist should include a recent one | |
86 | TEXIDIR=${srcdir}/../texinfo | |
87 | ||
88 | # where to find makeinfo, preferably one designed for texinfo-2 | |
89 | MAKEINFO=makeinfo | |
90 | ||
91 | # Set this up with gcc if you have gnu ld and the loader will print out | |
92 | # line numbers for undefinded refs. | |
93 | #CC-LD=gcc -static | |
94 | CC-LD=${CC} | |
95 | ||
96 | # Where is the "include" directory? Traditionally ../include or ./include | |
97 | INCLUDE_DIR = ${srcdir}/../../include | |
98 | INCLUDE_DEP = $$(INCLUDE_DIR) | |
99 | ||
100 | # Where is the source dir for the MMALLOC library? Traditionally ../mmalloc | |
101 | # or ./mmalloc (When we want the binary library built from it, we use | |
102 | # ${MMALLOC_DIR}${subdir}.) | |
103 | # Note that mmalloc can still be used on systems without mmap(). | |
104 | # To use your system malloc, comment out the following defines. | |
105 | MMALLOC_DIR = ${srcdir}/../mmalloc | |
106 | MMALLOC_DEP = $$(MMALLOC_DIR) | |
107 | # To use your system malloc, uncomment MMALLOC_DISABLE. | |
108 | #MMALLOC_DISABLE = -DNO_MMALLOC | |
109 | # To use mmalloc but disable corruption checking, uncomment MMALLOC_CHECK | |
110 | #MMALLOC_CHECK = -DNO_MMALLOC_CHECK | |
111 | MMALLOC_CFLAGS = ${MMALLOC_CHECK} ${MMALLOC_DISABLE} | |
112 | ||
113 | # Where is the source dir for the READLINE library? Traditionally in .. or . | |
114 | # (For the binary library built from it, we use ${READLINE_DIR}${subdir}.) | |
115 | READLINE_DIR = ${srcdir}/../readline | |
116 | READLINE_DEP = $$(READLINE_DIR) | |
117 | ||
118 | # All the includes used for CFLAGS and for lint. | |
119 | # -I. for config files. | |
120 | # -I${srcdir} possibly for regex.h also. | |
121 | # -I${srcdir}/config for more generic config files. | |
122 | INCLUDE_CFLAGS = -I. -I${srcdir} -I${srcdir}/.. -I${srcdir}/../config -I$(INCLUDE_DIR) | |
123 | ||
124 | # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS | |
125 | # from the config/ directory. | |
126 | GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS} | |
127 | #PROFILE_CFLAGS = -pg | |
128 | ||
129 | # CFLAGS is specifically reserved for setting from the command line | |
130 | # when running make. I.E. "make CFLAGS=-Wmissing-prototypes". | |
131 | CFLAGS = -g | |
132 | # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. | |
133 | INTERNAL_CFLAGS = ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MMALLOC_CFLAGS} ${INCLUDE_CFLAGS} ${USER_CFLAGS} | |
134 | LDFLAGS = $(CFLAGS) | |
135 | ||
136 | # Perhaps should come from parent Makefile | |
137 | VERSION = gdbserve-4.12 | |
138 | DIST=gdb | |
139 | ||
140 | LINT=/usr/5bin/lint | |
141 | LINTFLAGS= -I${BFD_DIR} | |
142 | ||
143 | # Host and target-dependent makefile fragments come in here. | |
144 | #### | |
145 | # End of host and target-dependent makefile fragments | |
146 | ||
147 | # All source files that go into linking GDB remote server. | |
148 | ||
149 | SFILES = $(srcdir)/alpha-patch.c $(srcdir)/alpha-uart.c $(srcdir)/gdbserve.c \ | |
150 | $(srcdir)/alpha-io.S | |
151 | ||
152 | DEPFILES = $(GDBSERVE_DEPFILES) | |
153 | ||
154 | SOURCES = $(SFILES) $(ALLDEPFILES) | |
155 | TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS} | |
156 | ||
157 | OBS = gdbserve.o alpha-patch.o alpha-uart.o alpha-io.o $(srcdir)/prelude.o | |
158 | ||
159 | # Prevent Sun make from putting in the machine type. Setting | |
160 | # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1. | |
161 | .c.o: | |
162 | ${CC} -c ${INTERNAL_CFLAGS} $< | |
163 | ||
164 | all: GDBSERVE.NLM | |
165 | ||
166 | # Traditionally "install" depends on "all". But it may be useful | |
167 | # not to; for example, if the user has made some trivial change to a | |
168 | # source file and doesn't care about rebuilding or just wants to save the | |
169 | # time it takes for make to check that all is up to date. | |
170 | # install-only is intended to address that need. | |
171 | install: all install-only | |
172 | install-only: | |
173 | $(INSTALL_XFORM) gdbserver $(bindir)/gdbserver | |
174 | $(INSTALL_XFORM1) $(srcdir)/gdbserver.1 $(man1dir)/gdbserver.1 | |
175 | ||
176 | uninstall: force | |
177 | rm -f $(bindir)/gdbserver $(man1dir)/gdbserver.1 | |
178 | # @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do | |
179 | ||
180 | installcheck: | |
181 | check: | |
182 | info dvi: | |
183 | install-info: | |
184 | clean-info: | |
185 | ||
186 | NWAXPDEV=/gaunt/grossman/ALPHA-NLM/cygnus_940215/nwaxpdev | |
187 | ||
188 | .EXPORT: NWAXPDEV | |
189 | ||
190 | CC=${NWAXPDEV}/bin/cc -32addr -non_shared -no_excpt -g -DALPHA=1 -std -I -I${NWAXPDEV}/usr/include -I${NWAXPDEV}/clib/include | |
191 | LD=${NWAXPDEV}/bin/ld -32addr -no_excpt -non_shared -d -r -L -T 0 -g -b | |
192 | AS=${NWAXPDEV}/bin/as -I. -32addr | |
193 | NLMCONV=${NWAXPDEV}/bin/alphanlm | |
194 | ||
195 | GDBSERVE.NLM: gdbserve $(srcdir)/gdbserve.def | |
196 | ${NLMCONV} $(srcdir)/gdbserve.def | |
197 | ||
198 | gdbserve: $(OBS) | |
199 | ${LD} $(LDFLAGS) -o gdbserve ${OBS} ${LIBS} ${NWAXPDEV}/usr/lib/nwlibc.a | |
200 | ||
201 | gdbserve.o: $(srcdir)/gdbserve.c $(srcdir)/alpha-patch.h | |
202 | ||
203 | alpha-patches.o: $(srcdir)/alpha-patches.c $(srcdir)/alpha-patches.h | |
204 | ||
205 | alpha-io.o: $(srcdir)/alpha-io.S | |
206 | ${AS} -o alpha-io.o $(srcdir)/alpha-io.S | |
207 | ||
208 | alpha-uart.o: $(srcdir)/alpha-uart.c | |
209 | ||
210 | config.status: | |
211 | @echo "You must configure gdbserver. Look at the README file for details." | |
212 | @false | |
213 | ||
214 | # Put the proper machine-specific files first, so M-. on a machine | |
215 | # specific routine gets the one for the correct machine. | |
216 | # The xyzzy stuff below deals with empty DEPFILES | |
217 | TAGS: ${TAGFILES} | |
218 | etags `find ${srcdir}/../config -name $(TM_FILE) -print` \ | |
219 | `find ${srcdir}/../config -name ${XM_FILE} -print` \ | |
220 | `find ${srcdir}/../config -name ${NAT_FILE} -print` \ | |
221 | `for i in yzzy ${DEPFILES}; do \ | |
222 | if [ x$$i != xyzzy ]; then \ | |
223 | echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \ | |
224 | fi; \ | |
225 | done` \ | |
226 | ${TAGFILES} | |
227 | tags: TAGS | |
228 | ||
229 | clean: | |
230 | rm -f *.o ${ADD_FILES} *~ | |
231 | rm -f init.c version.c | |
232 | rm -f gdbserver core make.log | |
233 | ||
234 | distclean: clean c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS | |
235 | rm -f tm.h xm.h config.status | |
236 | rm -f Makefile | |
237 | ||
238 | realclean: clean | |
239 | rm -f c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS | |
240 | rm -f tm.h xm.h config.status | |
241 | rm -f Makefile | |
242 | ||
243 | STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb | |
244 | ||
245 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) | |
246 | $(SHELL) ./config.status | |
247 | ||
248 | force: | |
249 | ||
250 | version.c: Makefile | |
251 | echo 'char *version = "$(VERSION)";' >version.c | |
252 | ||
253 | # GNU Make has an annoying habit of putting *all* the Makefile variables | |
254 | # into the environment, unless you include this target as a circumvention. | |
255 | # Rumor is that this will be fixed (and this target can be removed) | |
256 | # in GNU Make 4.0. | |
257 | .NOEXPORT: | |
258 | ||
259 | # GNU Make 3.63 has a different problem: it keeps tacking command line | |
260 | # overrides onto the definition of $(MAKE). This variable setting | |
261 | # will remove them. | |
262 | MAKEOVERRIDES= | |
263 | ||
264 | # This is the end of "Makefile.in". |