1## Process this file with automake to produce Makefile.in.
2
3SUBDIRS = libopcodes_mips . sample_code @TESTCODE_DIR@ doc
4REDHAT_PKG_FILES = vmips.spec vmips.spec.in
5DEBIAN_PKG_FILES = debian/changelog debian/compat debian/control \
6 debian/copyright debian/dirs debian/docs debian/info debian/rules \
7 debian/source/format
8EXTRA_DIST = VERSION $(REDHAT_PKG_FILES) \
9 $(sysconf_DATA) $(DEBIAN_PKG_FILES)
10
11# What are we building here?
12bin_PROGRAMS = vmips vmipstool
13
14# Defaults! Defaults for everyone!
15AM_CXXFLAGS = -I$(top_srcdir)/libopcodes_mips \
16 -DSYSCONFDIR=\"$(sysconfdir)\" -DPKGDATADIR=\"$(pkgdatadir)\" $(XTRACFLAGS)
17AM_LDFLAGS = $(XTRALDFLAGS)
18MOSTLYCLEANFILES = errs memdump.bin
19CLEANFILES = romfile.rom vmips.out
20
21# How to build the simulator:
22vmips_SOURCES = cpu.cc cpzero.cc devicemap.cc \
23  mapper.cc options.cc range.cc intctrl.cc \
24  spimconsole.cc stub-dis.cc vmips.cc \
25  deviceint.cc debug.cc remotegdb.cc clockdev.cc error.cc \
26  clock.cc terminalcontroller.cc haltdev.cc decrtc.cc deccsr.cc \
27  decstat.cc decserial.cc rommodule.cc fileutils.cc exeloader.cc fpu.cc \
28  interactor.cc testdev.cc \
29  cpu.h cpzero.h cpzeroreg.h deviceint.h \
30  devicemap.h intctrl.h mapper.h memorymodule.h options.h optiontbl.h \
31  range.h spimconsole.h spimconsreg.h \
32  tlbentry.h vmips.h debug.h remotegdb.h \
33  accesstypes.h deviceexc.h clockdev.h excnames.h error.h \
34  clock.h task.h terminalcontroller.h haltdev.h devreg.h clockreg.h \
35  haltreg.h wipe.h stub-dis.h decrtc.h decrtcreg.h deccsr.h deccsrreg.h \
36  decstat.h decserial.h decserialreg.h rommodule.h gccattr.h mmapglue.h \
37  types.h endiantest.h fileutils.h fpu.h interactor.h testdev.h
38vmips_LDADD = libopcodes_mips/libopcodes_mips.a
39
40# This library contains the subset of libbfd/libopcodes that we use.
41# We build libopcodes_mips before trying to link vmips or vmipstool.
42libopcodes_mips/libopcodes_mips.a:
43	cd libopcodes_mips && $(MAKE) all
44
45# Huh, huhuh, it says tool.
46vmipstool_SOURCES = vmipstool.cc options.cc error.cc stub-dis.cc \
47  fileutils.cc options.h error.h stub-dis.h endiantest.h fileutils.h
48vmipstool_LDADD = libopcodes_mips/libopcodes_mips.a
49
50# Install a sample vmipsrc.
51sysconf_DATA = vmipsrc
52
53# Miscellaneous targets.
54tags: TAGS
55	ctags *.cc
56
57gcov:
58	@for f in $(vmips_SOURCES); do echo $$f; gcov $$f; done
59