* Added "test0" test bucket from SCEI. Due to changes in the behavior specs
[deliverable/binutils-gdb.git] / sim / common / Make-common.in
CommitLineData
f2de7dfd
AC
1# Makefile fragment for common parts of all simulators.
2# Copyright (C) 1997 Free Software Foundation, Inc.
3# Contributed by Cygnus Support.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19# This Makefile fragment consists of two separate parts.
20# They are merged into the final Makefile at points denoted by
21# "## COMMON_PRE_CONFIG_FRAG" and "## COMMON_POST_CONFIG_FRAG".
22#
23# The target Makefile should look like:
24#
25#># Copyright blah blah
26#>
27#>## COMMON_PRE_CONFIG_FRAG
28#>
29#># Any overrides necessary for the SIM_FOO config vars.
30#>SIM_FOO = ...
31#>
32#>## COMMON_POST_CONFIG_FRAG
33#>
34#># Rules to build target specific .o's.
35
36## COMMON_PRE_CONFIG_FRAG
37
38VPATH = @srcdir@
39srcdir = @srcdir@
38377b3a 40srccom = $(srcdir)/../common
f2de7dfd
AC
41srcroot = $(srcdir)/../..
42
43prefix = @prefix@
44exec_prefix = @exec_prefix@
45
46host_alias = @host_alias@
47target_alias = @target_alias@
48program_transform_name = @program_transform_name@
49bindir = @bindir@
50
51libdir = @libdir@
52tooldir = $(libdir)/$(target_alias)
53
54datadir = @datadir@
55mandir = @mandir@
56man1dir = $(mandir)/man1
57infodir = @infodir@
58includedir = @includedir@
59
60SHELL = /bin/sh
61
6808fd61 62INSTALL = @INSTALL@
f2de7dfd
AC
63INSTALL_PROGRAM = @INSTALL_PROGRAM@
64INSTALL_DATA = @INSTALL_DATA@
f2de7dfd
AC
65
66CC = @CC@
67CC_FOR_BUILD = @CC_FOR_BUILD@
68CFLAGS = @CFLAGS@
69SIM_BSWAP = @sim_bswap@
70SIM_CFLAGS = @sim_cflags@
71SIM_DEBUG = @sim_debug@
f2de7dfd 72SIM_TRACE = @sim_trace@
717dbb29 73SIM_PROFILE = @sim_profile@
a77aa7ec 74
92f91d1f
AC
75SIM_ASSERT = @sim_assert@
76SIM_ALIGNMENT = @sim_alignment@
7456a10d 77SIM_BITSIZE = @sim_bitsize@
4141b1c6 78SIM_DEFAULT_MODEL = @sim_default_model@
92f91d1f 79SIM_ENDIAN = @sim_endian@
22469a10 80SIM_ENVIRONMENT = @sim_environment@
92f91d1f
AC
81SIM_FLOAT = @sim_float@
82SIM_HARDWARE = @sim_hardware@
83SIM_HOSTENDIAN = @sim_hostendian@
84SIM_INLINE = @sim_inline@
85SIM_PACKAGES = @sim_packages@
86SIM_REGPARM = @sim_regparm@
87SIM_RESERVED_BITS = @sim_reserved_bits@
4141b1c6 88SIM_SCACHE = @sim_scache@
92f91d1f
AC
89SIM_SMP = @sim_smp@
90SIM_STDCALL = @sim_stdcall@
91SIM_WARNINGS = @sim_warnings@
92SIM_XOR_ENDIAN = @sim_xor_endian@
93
f2de7dfd
AC
94HDEFINES = @HDEFINES@
95TDEFINES =
96
97AR = @AR@
98AR_FLAGS = rc
99RANLIB = @RANLIB@
100MAKEINFO = makeinfo
101
f7abc1ca
DE
102DEP = $(srcroot)/mkdep
103
f2de7dfd 104# Each simulator's Makefile.in defines one or more of these variables
0f2811d1
DE
105# to override our settings as necessary. There is no need to define these
106# in the simulator's Makefile.in if one is using the default value. In fact
107# it's preferable not to.
f2de7dfd
AC
108
109# List of object files, less common parts.
110SIM_OBJS =
6808fd61
ILT
111# List of extra dependencies.
112# Generally this consists of simulator specific files included by sim-main.h.
113SIM_EXTRA_DEPS =
f2de7dfd
AC
114# List of flags to always pass to $(CC).
115SIM_EXTRA_CFLAGS =
116# List of extra libraries to link with.
117SIM_EXTRA_LIBS =
118# List of extra program dependencies.
119SIM_EXTRA_LIBDEPS =
120# List of main object files for `run'.
121SIM_RUN_OBJS = run.o
122# Dependency of `all' to build any extra files.
123SIM_EXTRA_ALL =
124# Dependency of `install' to install any extra files.
125SIM_EXTRA_INSTALL =
126# Dependency of `clean' to clean any extra files.
127SIM_EXTRA_CLEAN =
128
e5ce1670
DE
129# Every time a new general purpose source file was added every target's
130# Makefile.in needed to be updated to include the file in SIM_OBJS.
131# This doesn't scale.
132# This variable specifies all the generic stuff common to the newer simulators.
133# Things like sim-reason.o can't go here as the cpu may provide its own
134# (though hopefully in time that won't be so). Things like sim-bits.o can go
135# here. Some files are used by all simulators (e.g. callback.o).
136# Those files are specified in LIB_OBJS below.
137
138SIM_NEW_COMMON_OBJS = \
139 sim-bits.o \
140 sim-break.o \
141 sim-config.o \
142 sim-core.o \
143 sim-endian.o \
144 sim-events.o \
145 sim-fpu.o \
146 sim-io.o \
0e701ac3 147 sim-info.o \
e5ce1670
DE
148 sim-load.o \
149 sim-memopt.o \
150 sim-module.o \
151 sim-options.o \
152 sim-profile.o \
1ebc7e0e 153 sim-signal.o \
e5ce1670
DE
154 sim-trace.o \
155 sim-utils.o \
156 sim-watch.o
157
f2de7dfd
AC
158## End COMMON_PRE_CONFIG_FRAG
159
160## COMMON_POST_CONFIG_FRAG
161
92f91d1f
AC
162CONFIG_CFLAGS = @DEFS@ \
163 $(SIM_CFLAGS) \
164 $(SIM_DEBUG) \
4141b1c6 165 $(SIM_DEFAULT_MODEL) \
92f91d1f
AC
166 $(SIM_TRACE) \
167 $(SIM_PROFILE) \
168 $(SIM_BSWAP) \
169 $(SIM_ASSERT) \
170 $(SIM_ALIGNMENT) \
7456a10d 171 $(SIM_BITSIZE) \
92f91d1f 172 $(SIM_ENDIAN) \
22469a10 173 $(SIM_ENVIRONMENT) \
92f91d1f
AC
174 $(SIM_FLOAT) \
175 $(SIM_HARDWARE) \
176 $(SIM_HOSTENDIAN) \
177 $(SIM_INLINE) \
178 $(SIM_PACKAGES) \
179 $(SIM_REGPARM) \
180 $(SIM_RESERVED_BITS) \
4141b1c6 181 $(SIM_SCACHE) \
92f91d1f
AC
182 $(SIM_SMP) \
183 $(SIM_STDCALL) \
184 $(SIM_WARNINGS) \
185 $(SIM_XOR_ENDIAN) \
186 $(SIM_EXTRA_CFLAGS) \
187 $(HDEFINES) $(TDEFINES)
38377b3a 188CSEARCH = -I. -I$(srcdir) -I../common -I$(srccom) \
f2de7dfd 189 -I../../include -I$(srcroot)/include \
a77aa7ec 190 -I../../bfd -I$(srcroot)/bfd \
f2de7dfd
AC
191 -I../../opcodes -I$(srcroot)/opcodes
192ALL_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(CFLAGS)
193BUILD_CFLAGS = -g -O $(CSEARCH)
194
f7abc1ca
DE
195COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH)
196
f2de7dfd
AC
197LIBIBERTY_LIB = ../../libiberty/libiberty.a
198BFD_LIB = ../../bfd/libbfd.a
199OPCODES_LIB = ../../opcodes/libopcodes.a
200CONFIG_LIBS = @LIBS@
201LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(LIBIBERTY_LIB) \
202 $(SIM_EXTRA_LIBDEPS)
203EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBIBERTY_LIB) \
204 $(CONFIG_LIBS) $(SIM_EXTRA_LIBS)
205
f7abc1ca 206LIB_OBJS = callback.o syscall.o targ-map.o $(SIM_OBJS)
f2de7dfd 207
22469a10 208all: $(SIM_EXTRA_ALL) libsim.a run .gdbinit
f2de7dfd
AC
209
210libsim.a: $(LIB_OBJS)
211 rm -f libsim.a
fafce69a 212 $(AR) $(AR_FLAGS) libsim.a $(LIB_OBJS)
f2de7dfd
AC
213 $(RANLIB) libsim.a
214
215run: $(SIM_RUN_OBJS) libsim.a $(LIBDEPS)
216 $(CC) $(ALL_CFLAGS) -o run \
217 $(SIM_RUN_OBJS) libsim.a $(EXTRA_LIBS)
218
38377b3a 219run.o: $(srccom)/run.c config.h tconfig.h \
22469a10 220 $(srcroot)/include/remote-sim.h $(srcroot)/include/callback.h
38377b3a 221 $(CC) -c $(srccom)/run.c $(ALL_CFLAGS)
f2de7dfd
AC
222
223# FIXME: Ideally, callback.o and friends live in a library outside of
224# both the gdb and simulator source trees (e.g. devo/remote. Not
225# devo/libremote because this directory would contain more than just
226# a library).
227
38377b3a 228callback.o: $(srccom)/callback.c config.h tconfig.h \
f2de7dfd 229 $(srcroot)/include/callback.h targ-vals.h
38377b3a 230 $(CC) -c $(srccom)/callback.c $(ALL_CFLAGS)
f2de7dfd 231
38377b3a 232syscall.o: $(srccom)/syscall.c config.h tconfig.h \
f7abc1ca 233 $(srcroot)/include/callback.h targ-vals.h
38377b3a 234 $(CC) -c $(srccom)/syscall.c $(ALL_CFLAGS)
f7abc1ca 235
f2de7dfd
AC
236targ-map.o: targ-map.c targ-vals.h
237
38377b3a
DE
238gentmap: Makefile $(srccom)/gentmap.c targ-vals.def
239 $(CC_FOR_BUILD) $(srccom)/gentmap.c -o gentmap $(BUILD_CFLAGS) $(NL_TARGET)
f2de7dfd 240
6cd37f15
DE
241targ-vals.h targ-map.c: stamp-tvals
242stamp-tvals: gentmap
243 rm -f tmp-tvals.h tmp-tmap.c
244 ./gentmap -h >tmp-tvals.h
245 $(srcroot)/move-if-change tmp-tvals.h targ-vals.h
246 ./gentmap -c >tmp-tmap.c
247 $(srcroot)/move-if-change tmp-tmap.c targ-map.c
248 touch stamp-tvals
a35e91c3
AC
249
250#
251# Rules for building sim-* components. Triggered by listing the corresponding
252# .o file in the list of simulator targets.
253#
254
6808fd61
ILT
255sim_main_headers = \
256 sim-main.h \
38377b3a
DE
257 $(srccom)/sim-config.h \
258 $(srccom)/sim-base.h \
259 $(srccom)/sim-basics.h \
aaa11abe 260 $(srccom)/sim-signal.h \
38377b3a
DE
261 $(srccom)/sim-memopt.h \
262 $(srccom)/sim-model.h \
263 $(srccom)/sim-module.h \
264 $(srccom)/sim-trace.h \
265 $(srccom)/sim-profile.h \
266 $(srccom)/sim-engine.h \
267 $(srccom)/sim-events.h \
268 $(srccom)/sim-watch.h \
269 $(srccom)/sim-assert.h \
f7abc1ca
DE
270 tconfig.h \
271 $(SIM_EXTRA_DEPS)
6808fd61 272
38377b3a
DE
273sim-assert_h = $(srccom)/sim-assert.h
274sim-endian_h = $(srccom)/sim-endian.h
275sim-n-endian_h = $(srccom)/sim-n-endian.h
276sim-bits_h = $(srccom)/sim-bits.h
277sim-config_h = $(srccom)/sim-config.h
278sim-n-bits_h = $(srccom)/sim-n-bits.h
279sim-core_h = $(srccom)/sim-core.h
280sim-n-core_h = $(srccom)/sim-n-core.h
281sim-engine_h = $(srccom)/sim-engine.h
282sim-events_h = $(srccom)/sim-events.h
283sim-fpu_h = $(srccom)/sim-fpu.h
284sim-io_h = $(srccom)/sim-io.h
285sim-options_h = $(srccom)/sim-options.h
286sim-break_h = $(srccom)/sim-break.h
1ebc7e0e 287sim-signal_h = $(srccom)/sim-signal.h
a35e91c3 288
6808fd61 289# FIXME: If this complicated way of building .o files from ../common is
c967f187 290# necessary, the reason should be documented here.
6808fd61
ILT
291
292BUILT_SRC_FROM_COMMON= \
5dcf955d 293 sim-inline.c
6808fd61 294
38377b3a 295sim-abort.o: $(srccom)/sim-abort.c \
f7abc1ca 296 $(SIM_EXTRA_DEPS)
38377b3a 297 $(CC) -c $(srccom)/sim-abort.c $(ALL_CFLAGS)
f03b093c 298
38377b3a 299sim-bits.o: $(srccom)/sim-bits.c $(sim-bits_h) $(sim-n-bits_h) \
f7abc1ca 300 $(SIM_EXTRA_DEPS)
38377b3a 301 $(CC) -c $(srccom)/sim-bits.c $(ALL_CFLAGS)
a35e91c3 302
38377b3a 303sim-config.o: $(srccom)/sim-config.c $(sim-config_h) \
189e2694 304 $(SIM_EXTRA_DEPS)
38377b3a 305 $(CC) -c $(srccom)/sim-config.c $(ALL_CFLAGS)
a35e91c3 306
189e2694
DE
307sim-core.o: $(srccom)/sim-core.c $(sim_main_headers) \
308 $(sim-core_h) $(sim-n-core_h) \
f7abc1ca 309 $(SIM_EXTRA_DEPS)
38377b3a 310 $(CC) -c $(srccom)/sim-core.c $(ALL_CFLAGS)
a35e91c3 311
38377b3a 312sim-endian.o: $(srccom)/sim-endian.c $(sim-endian_h) $(sim-n-endian_h) \
f7abc1ca 313 $(SIM_EXTRA_DEPS)
38377b3a 314 $(CC) -c $(srccom)/sim-endian.c $(ALL_CFLAGS)
a35e91c3 315
38377b3a
DE
316sim-engine.o: $(srccom)/sim-engine.c $(sim_main_headers) $(sim-engine_h)
317 $(CC) -c $(srccom)/sim-engine.c $(ALL_CFLAGS)
f03b093c 318
38377b3a 319sim-events.o: $(srccom)/sim-events.c $(sim-events_h) \
f7abc1ca 320 $(SIM_EXTRA_DEPS)
38377b3a 321 $(CC) -c $(srccom)/sim-events.c $(ALL_CFLAGS)
a35e91c3 322
38377b3a 323sim-fpu.o: $(srccom)/sim-fpu.c $(sim-fpu_h) \
f7abc1ca 324 $(SIM_EXTRA_DEPS)
38377b3a 325 $(CC) -c $(srccom)/sim-fpu.c $(ALL_CFLAGS)
fafce69a 326
38377b3a 327sim-hload.o: $(srccom)/sim-hload.c $(sim-assert_h) \
22469a10 328 $(srcroot)/include/remote-sim.h \
f7abc1ca 329 $(SIM_EXTRA_DEPS)
38377b3a 330 $(CC) -c $(srccom)/sim-hload.c $(ALL_CFLAGS)
3971886a 331
22469a10
DE
332sim-hrw.o: $(srccom)/sim-hrw.c $(sim-assert_h) $(sim_core_h) \
333 $(srcroot)/include/remote-sim.h \
f7abc1ca 334 $(SIM_EXTRA_DEPS)
38377b3a 335 $(CC) -c $(srccom)/sim-hrw.c $(ALL_CFLAGS)
92f91d1f 336
0e701ac3
AC
337sim-info.o: $(srccom)/sim-info.c $(sim-assert_h) \
338 $(srcroot)/include/remote-sim.h \
339 $(SIM_EXTRA_DEPS)
340 $(CC) -c $(srccom)/sim-info.c $(ALL_CFLAGS)
341
38377b3a 342sim-inline.c: $(srccom)/sim-inline.c
a35e91c3 343 rm -f $@ tmp-$@
38377b3a
DE
344 echo "# 1 \"$(srccom)/$@\"" > tmp-$@
345 cat $(srccom)/$@ >> tmp-$@
a35e91c3
AC
346 $(srcdir)/../../move-if-change tmp-$@ $@
347
22469a10
DE
348sim-io.o: $(srccom)/sim-io.c $(sim_main_headers) $(sim-io_h) \
349 $(srcroot)/include/remote-sim.h
38377b3a 350 $(CC) -c $(srccom)/sim-io.c $(ALL_CFLAGS)
a35e91c3 351
38377b3a 352sim-memopt.o: $(srccom)/sim-memopt.c $(sim_main_headers) \
f7abc1ca 353 $(sim-io_h)
38377b3a 354 $(CC) -c $(srccom)/sim-memopt.c $(ALL_CFLAGS)
a34abff8 355
38377b3a 356sim-module.o: $(srccom)/sim-module.c $(sim_main_headers) \
f7abc1ca 357 $(sim-io_h)
38377b3a 358 $(CC) -c $(srccom)/sim-module.c $(ALL_CFLAGS)
717dbb29 359
38377b3a 360sim-options.o: $(srccom)/sim-options.c $(sim_main_headers) \
f7abc1ca 361 $(sim-options_h) $(sim-io_h)
38377b3a 362 $(CC) -c $(srccom)/sim-options.c $(ALL_CFLAGS)
0f2811d1 363
22469a10
DE
364sim-reason.o: $(srccom)/sim-reason.c $(sim_main_headers) \
365 $(srcroot)/include/remote-sim.h
38377b3a 366 $(CC) -c $(srccom)/sim-reason.c $(ALL_CFLAGS)
f03b093c 367
22469a10
DE
368sim-resume.o: $(srccom)/sim-resume.c $(sim_main_headers) \
369 $(srcroot)/include/remote-sim.h
38377b3a 370 $(CC) -c $(srccom)/sim-resume.c $(ALL_CFLAGS)
f03b093c 371
38377b3a
DE
372sim-run.o: $(srccom)/sim-run.c $(sim_main_headers)
373 $(CC) -c $(srccom)/sim-run.c $(ALL_CFLAGS)
f03b093c 374
1ebc7e0e
DE
375sim-signal.o: $(srccom)/sim-signal.c $(sim_main_headers) $(sim-signal_h)
376 $(CC) -c $(srccom)/sim-signal.c $(ALL_CFLAGS)
377
38377b3a
DE
378sim-stop.o: $(srccom)/sim-stop.c $(sim_main_headers)
379 $(CC) -c $(srccom)/sim-stop.c $(ALL_CFLAGS)
f03b093c 380
38377b3a 381sim-trace.o: $(srccom)/sim-trace.c $(sim_main_headers) \
f7abc1ca 382 $(sim-options_h) $(sim-io_h)
38377b3a 383 $(CC) -c $(srccom)/sim-trace.c $(ALL_CFLAGS)
e9b2f579 384
38377b3a 385sim-profile.o: $(srccom)/sim-profile.c $(sim_main_headers) \
f7abc1ca 386 $(sim-options_h) $(sim-io_h)
38377b3a 387 $(CC) -c $(srccom)/sim-profile.c $(ALL_CFLAGS)
717dbb29 388
38377b3a 389sim-model.o: $(srccom)/sim-model.c $(sim_main_headers) \
f7abc1ca 390 $(sim-io_h)
38377b3a 391 $(CC) -c $(srccom)/sim-model.c $(ALL_CFLAGS)
c967f187 392
38377b3a
DE
393sim-utils.o: $(srccom)/sim-utils.c $(sim_main_headers)
394 $(CC) -c $(srccom)/sim-utils.c $(ALL_CFLAGS)
a35e91c3 395
38377b3a
DE
396sim-watch.o: $(srccom)/sim-watch.c $(sim_main_headers)
397 $(CC) -c $(srccom)/sim-watch.c $(ALL_CFLAGS)
fafce69a 398
38377b3a
DE
399sim-load.o: $(srccom)/sim-load.c $(srcroot)/include/callback.h
400 $(CC) -c $(srccom)/sim-load.c $(ALL_CFLAGS)
0f2811d1 401
38377b3a 402sim-break.o: $(srccom)/sim-break.c $(sim_main_headers) \
f7abc1ca 403 $(sim_break_h)
38377b3a 404 $(CC) -c $(srccom)/sim-break.c $(ALL_CFLAGS)
b9d580a4 405
38377b3a 406nrun.o: $(srccom)/nrun.c config.h tconfig.h \
22469a10
DE
407 $(srcroot)/include/remote-sim.h $(srcroot)/include/callback.h \
408 $(sim_main_headers)
38377b3a 409 $(CC) -c $(srccom)/nrun.c $(ALL_CFLAGS)
a35e91c3 410
c967f187
DE
411# CGEN support.
412
38377b3a 413cgen-run.o: $(srccom)/cgen-run.c $(sim_main_headers) \
4a44afd5 414 $(srccom)/cgen-mem.h $(srccom)/cgen-ops.h
38377b3a 415 $(CC) -c $(srccom)/cgen-run.c $(ALL_CFLAGS)
88d5f8e8 416
4a44afd5 417cgen-scache.o: $(srccom)/cgen-scache.c $(sim_main_headers)
38377b3a 418 $(CC) -c $(srccom)/cgen-scache.c $(ALL_CFLAGS)
c967f187 419
38377b3a
DE
420cgen-trace.o: $(srccom)/cgen-trace.c $(sim_main_headers) \
421 $(srccom)/cgen-trace.h
422 $(CC) -c $(srccom)/cgen-trace.c $(ALL_CFLAGS)
c967f187 423
38377b3a
DE
424cgen-utils.o: $(srccom)/cgen-utils.c $(sim_main_headers) \
425 $(srccom)/cgen-mem.h $(srccom)/cgen-ops.h
426 $(CC) -c $(srccom)/cgen-utils.c $(ALL_CFLAGS)
c967f187
DE
427
428# Support targets.
429
f2de7dfd
AC
430install: install-common $(SIM_EXTRA_INSTALL)
431
6808fd61
ILT
432install-common: installdirs
433 n=`echo run | sed '$(program_transform_name)'`; \
434 $(INSTALL_PROGRAM) run $(bindir)/$$n
435
436installdirs:
437 $(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
f2de7dfd
AC
438
439check:
6cd37f15 440 cd ../testsuite && $(MAKE) check
f2de7dfd
AC
441
442info:
443clean-info:
444install-info:
445
446.NOEXPORT:
447MAKEOVERRIDES=
448
449tags etags: TAGS
450
451TAGS: force
645ab3ec 452 etags --regex '/^\/[*] TAGS: .*/' *.c *.h
f2de7dfd 453
717dbb29 454clean: $(SIM_EXTRA_CLEAN)
f2de7dfd
AC
455 rm -f *.[oa] *~ core
456 rm -f run libsim.a
6cd37f15 457 rm -f gentmap targ-map.c targ-vals.h stamp-tvals
f7abc1ca 458 if [ ! -f Make-common.in ] ; then \
5dcf955d
DE
459 rm -f $(BUILT_SRC_FROM_COMMON) ; \
460 fi
f2de7dfd 461
717dbb29 462distclean mostlyclean maintainer-clean realclean: clean
f2de7dfd 463 rm -f TAGS
88d5f8e8 464 rm -f Makefile config.cache config.log config.status .gdbinit
f2de7dfd 465 rm -f tconfig.h config.h stamp-h
0f399b0c 466 rm -f targ-vals.def
f2de7dfd
AC
467
468.c.o:
469 $(CC) -c $(ALL_CFLAGS) $<
470
471# Dummy target to force execution of dependent targets.
472force:
473
38377b3a 474Makefile: Makefile.in $(srccom)/Make-common.in config.status
f2de7dfd
AC
475 CONFIG_HEADERS= $(SHELL) ./config.status
476
477config.status: configure
478 $(SHELL) ./config.status --recheck
479
480config.h: stamp-h ; @true
481stamp-h: config.in config.status
482 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
483
38377b3a 484.gdbinit: # config.status $(srccom)/gdbinit.in
88d5f8e8
DE
485 CONFIG_FILES=$@:../common/gdbinit.in CONFIG_HEADERS= $(SHELL) ./config.status
486
36de6f40
DE
487# start-sanitize-cygnus
488
189e2694
DE
489# CGEN support
490
491SCHEME = @SCHEME@
189e2694
DE
492SCHEMEFLAGS = -s
493srccgen = $(srcroot)/cgen
494
495CGEN_VERBOSE = -v
6cd37f15
DE
496CGEN_MAIN_SCM = $(srccgen)/object.scm $(srccgen)/utils.scm \
497 $(srccgen)/attr.scm $(srccgen)/enum.scm $(srccgen)/types.scm \
498 $(srccgen)/utils-cgen.scm $(srccgen)/cpu.scm \
499 $(srccgen)/mode.scm $(srccgen)/mach.scm \
500 $(srccgen)/model.scm $(srccgen)/hardware.scm \
189e2694
DE
501 $(srccgen)/ifield.scm $(srccgen)/iformat.scm \
502 $(srccgen)/operand.scm $(srccgen)/insn.scm \
6cd37f15
DE
503 $(srccgen)/cdl-c.scm $(srccgen)/sim.scm
504CGEN_CPU_SCM = $(srccgen)/sim-cpu.scm $(srccgen)/sim-model.scm
505CGEN_DECODE_SCM = $(srccgen)/sim-decode.scm
189e2694
DE
506
507# Various choices for which cpu specific files to generate.
508CGEN_CPU_EXTR = -E tmp-ext.c1
509CGEN_CPU_READ = -R tmp-read.c1
510CGEN_CPU_SEM = -S tmp-sem.c1
511CGEN_CPU_SEMSW = -W tmp-semsw.c1
512
513# We store the generated files in the source directory until we decide to
514# ship a Scheme interpreter with gdb/binutils. Maybe we never will.
515
516cgen-arch: force
517 $(SHELL) $(srccom)/cgen.sh arch $(srcdir) \
518 $(SCHEME) $(SCHEMEFLAGS) \
519 $(srccgen) $(CGEN_VERBOSE) \
520 $(arch) "$(FLAGS)" ignored ignored ignored ignored
521
522cgen-cpu: force
523 $(SHELL) $(srccom)/cgen.sh cpu $(srcdir) \
524 $(SCHEME) $(SCHEMEFLAGS) \
525 $(srccgen) $(CGEN_VERBOSE) \
526 $(arch) "$(FLAGS)" $(cpu) $(mach) "$(SUFFIX)" "$(EXTRAFILES)"
527
528cgen-decode: force
529 $(SHELL) $(srccom)/cgen.sh decode $(srcdir) \
530 $(SCHEME) $(SCHEMEFLAGS) \
531 $(srccgen) $(CGEN_VERBOSE) \
532 $(arch) "$(FLAGS)" $(cpu) $(mach) "$(SUFFIX)" ignored
533
36de6f40
DE
534# end-sanitize-cygnus
535
f2de7dfd 536## End COMMON_POST_CONFIG_FRAG
This page took 0.081702 seconds and 4 git commands to generate.