Commit | Line | Data |
---|---|---|
feaee4bd | 1 | # The IGEN simulator generator for GDB, the GNU Debugger. |
c906108c | 2 | # |
ecd75fc8 | 3 | # Copyright 2002-2014 Free Software Foundation, Inc. |
c906108c | 4 | # |
feaee4bd | 5 | # Contributed by Andrew Cagney. |
c906108c | 6 | # |
feaee4bd | 7 | # This file is part of GDB. |
c906108c | 8 | # |
feaee4bd AC |
9 | # This program is free software; you can redistribute it and/or modify |
10 | # it under the terms of the GNU General Public License as published by | |
4744ac1b | 11 | # the Free Software Foundation; either version 3 of the License, or |
feaee4bd | 12 | # (at your option) any later version. |
4744ac1b | 13 | # |
feaee4bd AC |
14 | # This program is distributed in the hope that it will be useful, |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | # GNU General Public License for more details. | |
4744ac1b | 18 | # |
feaee4bd | 19 | # You should have received a copy of the GNU General Public License |
4744ac1b | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
c906108c SS |
21 | |
22 | default: all | |
23 | ||
24 | VPATH = @srcdir@ | |
25 | srcdir = @srcdir@ | |
26 | srcroot = $(srcdir)/../.. | |
27 | ||
28 | prefix = @prefix@ | |
29 | exec_prefix = @exec_prefix@ | |
30 | ||
31 | host_alias = @host_alias@ | |
32 | target_alias = @target_alias@ | |
33 | program_transform_name = @program_transform_name@ | |
34 | bindir = @bindir@ | |
35 | libdir = @libdir@ | |
36 | tooldir = $(libdir)/$(target_alias) | |
37 | ||
96e946ca | 38 | datarootdir = @datarootdir@ |
c906108c SS |
39 | datadir = @datadir@ |
40 | mandir = @mandir@ | |
41 | man1dir = $(mandir)/man1 | |
42 | man2dir = $(mandir)/man2 | |
43 | man3dir = $(mandir)/man3 | |
44 | man4dir = $(mandir)/man4 | |
45 | man5dir = $(mandir)/man5 | |
46 | man6dir = $(mandir)/man6 | |
47 | man7dir = $(mandir)/man7 | |
48 | man8dir = $(mandir)/man8 | |
49 | man9dir = $(mandir)/man9 | |
50 | infodir = @infodir@ | |
51 | includedir = @includedir@ | |
52 | ||
53 | SHELL = @SHELL@ | |
54 | ||
55 | INSTALL = @INSTALL@ | |
56 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
57 | INSTALL_DATA = @INSTALL_DATA@ | |
58 | ||
59 | AR = @AR@ | |
60 | CC = @CC@ | |
61 | CFLAGS = @CFLAGS@ | |
62 | RANLIB = @RANLIB@ | |
63 | ||
64 | AR_FOR_BUILD = @AR_FOR_BUILD@ | |
65 | AR_FLAGS_FOR_BUILD = @AR_FLAGS_FOR_BUILD@ | |
66 | CC_FOR_BUILD = @CC_FOR_BUILD@ | |
67 | CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ | |
68 | RANLIB_FOR_BUILD = @RANLIB_FOR_BUILD@ | |
69 | ||
d4f3574e SS |
70 | WARN_CFLAGS = @WARN_CFLAGS@ |
71 | WERROR_CFLAGS = @WERROR_CFLAGS@ | |
72 | IGEN_WARN_CFLAGS = $(WARN_CFLAGS) | |
73 | IGEN_WERROR_CFLAGS = $(WERROR_CFLAGS) | |
c906108c SS |
74 | |
75 | BISON = bison | |
76 | MAKEINFO = makeinfo | |
77 | ||
78 | .NOEXPORT: | |
79 | MAKEOVERRIDES= | |
80 | ||
81 | LIB_INCLUDES = -I$(srcdir)/../../include | |
82 | INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) | |
83 | ||
84 | LIBIBERTY_LIB = @LIBIBERTY_LIB@ | |
85 | ||
d4f3574e SS |
86 | BUILD_CFLAGS = \ |
87 | $(CFLAGS_FOR_BUILD) \ | |
88 | $(IGEN_WARN_CFLAGS) \ | |
89 | $(IGEN_WERROR_CFLAGS) \ | |
b74317ff | 90 | $(INCLUDES) |
c906108c SS |
91 | BUILD_LDFLAGS = |
92 | ||
93 | all: igen | |
94 | #all: tmp-filter tmp-table tmp-ld-insn tmp-ld-cache tmp-ld-decode tmp-gen | |
95 | ||
96 | .c.o: | |
97 | $(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $< | |
98 | ||
99 | ||
100 | filter_filename.o: filter_filename.c filter_filename.h config.h ppc-config.h | |
101 | ||
102 | IGEN_OBJS=\ | |
103 | table.o \ | |
104 | lf.o misc.o \ | |
105 | filter_host.o \ | |
106 | ld-decode.o \ | |
107 | ld-cache.o \ | |
108 | filter.o \ | |
109 | ld-insn.o \ | |
110 | gen-model.o \ | |
111 | gen-itable.o \ | |
112 | gen-icache.o \ | |
113 | gen-semantics.o \ | |
114 | gen-idecode.o \ | |
115 | gen-support.o \ | |
116 | gen-engine.o \ | |
117 | gen.o | |
118 | ||
119 | igen: igen.o $(IGEN_OBJS) | |
b02677b9 | 120 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o igen igen.o $(IGEN_OBJS) $(LIBIBERTY_LIB) |
c906108c SS |
121 | |
122 | igen.o: igen.c misc.h filter_host.h lf.h table.h ld-decode.h ld-cache.h ld-insn.h filter.h gen-model.h gen-itable.h gen-icache.h gen-idecode.h gen-engine.h gen-semantics.h gen-support.h gen.h igen.h | |
123 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/igen.c | |
124 | ||
125 | tmp-table: table.c table.h misc.o lf.o filter_host.o | |
126 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-table -DMAIN $(srcdir)/table.c misc.o lf.o filter_host.o $(BUILD_LIBS) | |
127 | ||
128 | tmp-filter: filter.c filter.h lf.o misc.o filter_host.o | |
129 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-filter -DMAIN $(srcdir)/filter.c lf.o misc.o filter_host.o $(BUILD_LIBS) | |
130 | ||
131 | tmp-ld-decode: ld-decode.h ld-decode.c filter.o misc.o lf.o table.o filter_host.o gen.h igen.h | |
132 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-decode -DMAIN $(srcdir)/ld-decode.c filter.o misc.o lf.o table.o filter_host.o $(BUILD_LIBS) | |
133 | ||
134 | tmp-ld-cache: ld-cache.c ld-cache.h ld-insn.o misc.o lf.o table.o filter_host.o gen.h igen.h | |
135 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-cache -DMAIN $(srcdir)/ld-cache.c ld-insn.o filter.o misc.o lf.o table.o filter_host.o $(BUILD_LIBS) | |
136 | ||
137 | tmp-ld-insn: ld-insn.c ld-insn.h misc.o lf.o table.o filter_host.o filter.o gen.h igen.h | |
138 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-insn -DMAIN $(srcdir)/ld-insn.c misc.o lf.o table.o filter_host.o filter.o $(BUILD_LIBS) | |
139 | ||
140 | tmp-gen: gen.c gen.h ld-insn.o ld-decode.o misc.o lf.o table.o filter_host.o filter.o gen.h igen.h | |
141 | $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-gen -DMAIN $(srcdir)/gen.c misc.o ld-insn.o ld-decode.o lf.o table.o filter_host.o filter.o $(BUILD_LIBS) | |
142 | ||
143 | filter_host.o: filter_host.c filter_host.h | |
144 | table.o: table.c misc.h filter_host.h lf.h table.h | |
145 | lf.o: lf.c misc.h filter_host.h lf.h | |
146 | filter.o: filter.c misc.h lf.h table.h filter.h | |
147 | ld-decode.o: ld-decode.c misc.h lf.h table.h ld-decode.h igen.h | |
148 | ld-cache.o: ld-cache.c misc.h lf.h table.h ld-cache.h igen.h | |
149 | ld-insn.o: ld-insn.c misc.h lf.h table.h ld-insn.h gen.h igen.h | |
150 | gen-model.o: gen-model.c misc.h lf.h table.h gen-model.h ld-decode.h gen.h igen.h ld-insn.h | |
151 | gen-itable.o: gen-itable.c misc.h lf.h table.h gen-itable.h ld-decode.h gen.h igen.h ld-insn.h gen.h filter.h | |
152 | gen-icache.o: gen-icache.c misc.h lf.h table.h gen-icache.h ld-decode.h gen.h igen.h ld-insn.h gen-semantics.h gen-idecode.h filter.h | |
153 | gen-semantics.o: gen-semantics.c misc.h lf.h table.h gen-semantics.h ld-decode.h gen.h igen.h ld-insn.h filter.h | |
154 | gen-idecode.o: gen-idecode.c misc.h lf.h table.h gen-idecode.h gen-icache.h gen-semantics.h ld-decode.h gen.h igen.h ld-insn.h filter.h | |
155 | gen-engine.o: gen-engine.c misc.h lf.h table.h gen-idecode.h gen-engine.h gen-icache.h gen-semantics.h ld-decode.h gen.h igen.h ld-insn.h filter.h | |
156 | gen-support.o: gen-support.c misc.h lf.h table.h gen-support.h ld-decode.h gen.h igen.h ld-insn.h filter.h | |
157 | gen.o: gen.c misc.h lf.h table.h gen-icache.h ld-decode.h gen.h igen.h ld-insn.h gen-semantics.h gen-idecode.h filter.h | |
158 | misc.o: misc.c misc.h filter_host.h | |
159 | ||
160 | ||
161 | tags etags: TAGS | |
162 | ||
163 | TAGS: | |
164 | etags $(srcdir)/*.h $(srcdir)/*.c | |
165 | ||
166 | clean mostlyclean: | |
167 | rm -f tmp-* *.[oasi] core igen | |
168 | ||
169 | distclean realclean: clean | |
170 | rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log | |
171 | ||
172 | maintainer-clean: distclean | |
173 | rm -f *~ *.log ppc-config.h core *.core | |
174 | ||
175 | Makefile: Makefile.in config.status | |
176 | CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status | |
177 | ||
178 | config.h: stamp-h ; @true | |
179 | stamp-h: config.in config.status | |
180 | CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status | |
181 | ||
182 | config.status: configure | |
183 | $(SHELL) ./config.status --recheck | |
184 | ||
185 | install: | |
186 | # |