Add v850e version of breakpoint instruction.
[external/binutils.git] / sim / v850 / Makefile.in
1 #    Makefile template for Configure for the V850 sim library.
2 #    Copyright (C) 1996, 1997 Free Software Foundation, Inc.
3 #    Written 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 ## COMMON_PRE_CONFIG_FRAG
20
21 SIM_OBJS = \
22         simops.o interp.o \
23         itable.o semantics.o idecode.o icache.o engine.o irun.o support.o \
24         sim-bits.o \
25         sim-config.o \
26         sim-core.o \
27         sim-engine.o \
28         sim-endian.o \
29         sim-events.o \
30         sim-hload.o \
31         sim-hrw.o \
32         sim-io.o \
33         sim-load.o \
34         sim-memopt.o \
35         sim-module.o \
36         sim-options.o \
37         sim-profile.o \
38         sim-resume.o \
39         sim-reason.o \
40         sim-stop.o \
41         sim-trace.o \
42         sim-watch.o \
43         sim-utils.o
44 SIM_RUN_OBJS = nrun.o
45
46 # List of extra dependencies.
47 # Generally this consists of simulator specific files included by sim-main.h.
48 SIM_EXTRA_DEPS = v850_sim.h sim-main.h simops.h itable.h
49
50 # List of flags to always pass to $(CC)
51 SIM_WARNINGS=@sim_warnings@
52 SIM_ENDIAN=@sim_endian@
53 SIM_HOSTENDIAN=@sim_hostendian@
54 SIM_RESERVED_BITS=@sim_reserved_bits@
55 SIM_EXTRA_CFLAGS = \
56         -DDEBUG \
57         -I$(srcdir)/../../newlib/libc/sys/sysnecv850 \
58         $(SIM_WARNINGS) \
59         $(SIM_ENDIAN) \
60         $(SIM_HOSTENDIAN) \
61         $(SIM_RESERVED_BITS)
62 SIM_EXTRA_CLEAN = clean-extra
63
64 INCLUDE = $(sim_main_headers) $(SIM_EXTRA_DEPS)
65
66 ## COMMON_POST_CONFIG_FRAG
67
68 simops.h table.c: tmp-gencode
69 tmp-gencode: gencode
70         ./gencode >tmp-table.c
71         mv tmp-table.c table.c
72         ./gencode -h >tmp-simops.h
73         mv tmp-simops.h simops.h
74         touch tmp-gencode
75 gencode.o: gencode.c
76         $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gencode.c
77 v850-opc.o: $(srcdir)/../../opcodes/v850-opc.c
78         $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $<
79 gencode: gencode.o v850-opc.o
80         $(CC_FOR_BUILD) $(BUILD_CFLAGS) -o gencode gencode.o v850-opc.o
81
82
83
84 BUILT_SRC_FROM_IGEN = \
85         icache.h \
86         icache.c \
87         idecode.h \
88         idecode.c \
89         semantics.h \
90         semantics.c \
91         model.h \
92         model.c \
93         support.h \
94         support.c \
95         itable.h \
96         itable.c \
97         engine.h \
98         engine.c \
99         irun.c
100 $(BUILT_SRC_FROM_IGEN): tmp-igen simops.h
101 #
102
103 .PHONY: clean-igen
104 clean-igen:
105         rm -f $(BUILT_SRC_FROM_IGEN)
106         rm -f tmp-igen tmp-insns
107
108 ../igen/igen:
109         cd ../igen && $(MAKE)
110
111 IGEN_TRACE= # -G trace-rule-selection -G trace-rule-rejection -G trace-entries
112 IGEN_INSN=$(srcdir)/v850.igen
113 IGEN_DC=$(srcdir)/v850-dc
114 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
115         cd ../igen && $(MAKE)
116         ../igen/igen \
117                 $(IGEN_TRACE) \
118                 -G gen-direct-access \
119                 -i $(IGEN_INSN) \
120                 -o $(IGEN_DC) \
121                 -x \
122                 -n icache.h    -hc tmp-icache.h \
123                 -n icache.c    -c  tmp-icache.c \
124                 -n semantics.h -hs tmp-semantics.h \
125                 -n semantics.c -s  tmp-semantics.c \
126                 -n idecode.h   -hd tmp-idecode.h \
127                 -n idecode.c   -d  tmp-idecode.c \
128                 -n model.h     -hm tmp-model.h \
129                 -n model.c     -m  tmp-model.c \
130                 -n support.h   -hf tmp-support.h \
131                 -n support.c   -f  tmp-support.c \
132                 -n itable.h    -ht tmp-itable.h \
133                 -n itable.c    -t  tmp-itable.c \
134                 -n engine.h    -he tmp-engine.h \
135                 -n engine.c    -e  tmp-engine.c \
136                 -n irun.c      -r  tmp-irun.c
137         $(srcdir)/../../move-if-change tmp-icache.h icache.h
138         $(srcdir)/../../move-if-change tmp-icache.c icache.c
139         $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
140         $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
141         $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
142         $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
143         $(srcdir)/../../move-if-change tmp-model.h model.h
144         $(srcdir)/../../move-if-change tmp-model.c model.c
145         $(srcdir)/../../move-if-change tmp-support.h support.h
146         $(srcdir)/../../move-if-change tmp-support.c support.c
147         $(srcdir)/../../move-if-change tmp-itable.h itable.h
148         $(srcdir)/../../move-if-change tmp-itable.c itable.c
149         $(srcdir)/../../move-if-change tmp-engine.h engine.h
150         $(srcdir)/../../move-if-change tmp-engine.c engine.c
151         $(srcdir)/../../move-if-change tmp-irun.c irun.c
152         touch tmp-igen
153
154 clean-extra: clean-igen
155         rm -f table.c simops.h gencode
156
157 #interp.o: interp.c table.c $(INCLUDE)
158 simops.o: simops.c $(INCLUDE)
159 #table.o: table.c
160 semantics.o: $(INCLUDE)