2 # This file is part of the program psim.
4 # Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
5 # Copyright (C) 1997, Free Software Foundation, Inc.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 srcroot = $(srcdir)/../..
29 exec_prefix = @exec_prefix@
31 host_alias = @host_alias@
32 target_alias = @target_alias@
33 program_transform_name = @program_transform_name@
36 tooldir = $(libdir)/$(target_alias)
40 man1dir = $(mandir)/man1
41 man2dir = $(mandir)/man2
42 man3dir = $(mandir)/man3
43 man4dir = $(mandir)/man4
44 man5dir = $(mandir)/man5
45 man6dir = $(mandir)/man6
46 man7dir = $(mandir)/man7
47 man8dir = $(mandir)/man8
48 man9dir = $(mandir)/man9
50 includedir = @includedir@
54 INSTALL = $(srcroot)/install.sh -c
55 INSTALL_PROGRAM = @INSTALL_PROGRAM@
56 INSTALL_DATA = @INSTALL_DATA@
57 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
58 INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
64 CC_FOR_BUILD = @CC_FOR_BUILD@
69 STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES)
70 NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES)
71 BUILD_CFLAGS = -g -O $(INCLUDES) $(WARNING_CFLAGS)
78 LIB_INCLUDES = -I$(srcdir)/../../include
79 INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES)
81 LIBIBERTY_LIB = ../../libiberty/libiberty.a
89 $(CC_FOR_BUILD) -c $(STD_CFLAGS) $<
91 filter_filename.o: filter_filename.c filter_filename.h config.h ppc-config.h
93 igen: igen.o $(IGENLIB)
94 $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o igen igen.o $(IGENLIB) $(LIBIBERTY_LIB)
112 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 igen.h
113 $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/igen.c
115 $(IGENLIB): $(IGEN_OBJS)
117 $(AR) $(AR_FLAGS) $(IGENLIB) $(IGEN_OBJS)
121 tmp-filter: filter.c misc.h misc.o
122 $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-filter -DMAIN $(srcdir)/filter.c misc.o $(BUILD_LIBS)
124 tmp-ld-decode: ld-decode.o misc.o lf.o table.o filter_host.o
125 $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-decode -DMAIN $(srcdir)/ld-decode.c misc.o lf.o table.o filter_host.o $(BUILD_LIBS)
127 tmp-ld-cache: ld-cache.o misc.o lf.o table.o filter_host.o
128 $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-cache -DMAIN $(srcdir)/ld-cache.c misc.o lf.o table.o filter_host.o $(BUILD_LIBS)
130 tmp-ld-insn: ld-insn.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o
131 $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-insn -DMAIN $(srcdir)/ld-insn.c misc.o lf.o table.o ld-decode.o filter_host.o filter.o $(BUILD_LIBS)
133 filter_host.o: filter_host.c filter_host.h
134 table.o: table.c misc.h filter_host.h lf.h table.h
135 lf.o: lf.c misc.h filter_host.h lf.h
136 filter.o: filter.c misc.h lf.h table.h filter.h
137 ld-decode.o: ld-decode.c misc.h lf.h table.h ld-decode.h
138 ld-cache.o: ld-cache.c misc.h lf.h table.h ld-cache.h
139 ld-insn.o: ld-insn.c misc.h lf.h table.h ld-insn.h ld-decode.h igen.h
140 gen-model.o: gen-model.c misc.h lf.h table.h gen-model.h ld-decode.h igen.h ld-insn.h
141 gen-itable.o: gen-itable.c misc.h lf.h table.h gen-itable.h ld-decode.h igen.h ld-insn.h igen.h
142 gen-icache.o: gen-icache.c misc.h lf.h table.h gen-icache.h ld-decode.h igen.h ld-insn.h gen-semantics.h gen-idecode.h
143 gen-semantics.o: gen-semantics.c misc.h lf.h table.h gen-semantics.h ld-decode.h igen.h ld-insn.h
144 gen-idecode.o: gen-idecode.c misc.h lf.h table.h gen-idecode.h gen-icache.h gen-semantics.h ld-decode.h igen.h ld-insn.h
145 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 igen.h ld-insn.h
146 gen-support.o: gen-support.c misc.h lf.h table.h gen-support.h ld-decode.h igen.h ld-insn.h
147 misc.o: misc.c misc.h filter_host.h
153 etags $(srcdir)/*.h $(srcdir)/*.c
156 rm -f tmp-* *.[oasi] core igen
158 distclean realclean: clean
159 rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log
161 maintainer-clean: distclean
162 rm -f *~ *.log ppc-config.h core *.core
164 Makefile: Makefile.in config.status
165 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
167 config.h: stamp-h ; @true
168 stamp-h: config.in config.status
169 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
171 config.status: configure
172 $(SHELL) ./config.status --recheck