* Makefile.in, configure.in: converted to autoconf.
[platform/upstream/binutils.git] / sim / sh / Makefile.in
1 #    Makefile template for Configure for the SH sim library.
2 #    Copyright (C) 1990, 1991, 1992, 1995 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., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 VPATH = @srcdir@
20 srcdir = @srcdir@
21 srcroot = $(srcdir)/../..
22
23 prefix = @prefix@
24 exec_prefix = @exec_prefix@
25
26 host_alias = @host_alias@
27 target_alias = @target_alias@
28 program_transform_name = @program_transform_name@
29 bindir = $(exec_prefix)/bin
30 libdir = $(exec_prefix)/lib
31 tooldir = $(libdir)/$(target_alias)
32
33 datadir = $(prefix)/lib
34 mandir = $(prefix)/man
35 man1dir = $(mandir)/man1
36 man2dir = $(mandir)/man2
37 man3dir = $(mandir)/man3
38 man4dir = $(mandir)/man4
39 man5dir = $(mandir)/man5
40 man6dir = $(mandir)/man6
41 man7dir = $(mandir)/man7
42 man8dir = $(mandir)/man8
43 man9dir = $(mandir)/man9
44 infodir = $(prefix)/info
45 includedir = $(prefix)/include
46 docdir = $(datadir)/doc
47
48 SHELL = /bin/sh
49
50 # FIXME: use autoconf's AC_PROG_INSTALL
51 INSTALL = $(srcroot)/install.sh -c
52 INSTALL_PROGRAM = $(INSTALL)
53 INSTALL_DATA = $(INSTALL)
54 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
55 INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
56
57 AR = ar
58 AR_FLAGS = rc
59 CFLAGS = -g
60 BISON = bison
61 MAKEINFO = makeinfo
62 RANLIB = ranlib
63
64 .NOEXPORT
65 MAKEOVERRIDES=
66
67 CC_FOR_BUILD = cc
68 X=xstuff.o
69 XL=-lX11
70 X=
71 XL=
72
73 INCDIR = $(srcdir)/../../include 
74 CSEARCH = -I. -I$(srcdir)  -I../../include  \
75   -I../../bfd -I$(INCDIR) -I$(srcdir)/../../bfd -I$(srcdir)/../../gdb -I$(srcdir)/../../newlib/libc/sys/sh
76 DEP = mkdep
77
78 #### Makefile fragments come in here.
79 # @host_makefile_frag@
80 ###
81
82 all:    run libsim.a
83
84 run:    interp.o $(X) run.o table.o
85         $(CC) $(CFLAGS) -o run $(X) interp.o table.o run.o ../../bfd/libbfd.a ../../libiberty/libiberty.a $(XL)
86
87 interp.o:interp.c code.c table.c
88 run.o:run.c 
89
90 libsim.a:interp.o table.o
91         $(AR) $(ARFLAGS) libsim.a interp.o table.o
92         $(RANLIB) libsim.a
93
94 code.c:gencode
95         ./gencode -x >code.c
96 #       indent code.c
97
98 table.c:gencode
99         ./gencode -s >table.c
100 #       indent table.c
101
102 gencode:gencode.c
103         $(CC_FOR_BUILD) -o gencode $(srcdir)/gencode.c
104
105 .c.o:
106         $(CC) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) $<
107
108 check:
109
110 info:
111 clean-info:
112 install-info:
113
114 tags etags: TAGS
115
116 TAGS: force
117         etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
118
119 clean:
120         rm -f *.[oa] *~ core *.E *.p *.ip aout-params.h gen-aout
121
122 distclean mostlyclean realclean: clean
123         rm -f libbfd.a TAGS
124
125 # Dummy target to force execution of dependent targets.
126 #
127 force:
128
129 # Copy the files into directories where they will be run.
130 install:
131         srcroot=`cd $(srcroot); pwd`; export srcroot; \
132         $(INSTALL_XFORM) run $(bindir)/run ;  \
133         n=`t='$(program_transform_name)'; echo run | sed -e "" $$t`; \
134         if [ -d $(tooldir) ] ; then \
135           if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
136           rm -f $(tooldir)/bin/run;  \
137           ln $(bindir)/$$n $(tooldir)/bin/run \
138            || $(INSTALL_PROGRAM) run $(tooldir)/bin/run; \
139         else true; fi
140
141 install-man: run.1
142         $(INSTALL_XFORM1) $(srcdir)/run.1 $(man1dir)/run.1
143
144
145 Makefile: Makefile.in config.status @frags@
146         $(SHELL) ./config.status
147
148 config.status: configure
149         $(SHELL) ./config.status --recheck
150
151 dep: $(CFILES)
152         mkdep $(CFLAGS) $?
153
154 # What appears below is generated by a hacked mkdep using gcc -MM.
155
156 # DO NOT DELETE THIS LINE -- mkdep uses it.
157 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
158
159
160 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY