* interp.c (sim_open): If argument supplied, interpret as
[external/binutils.git] / sim / sh / Makefile.in
1 #    Makefile template for Configure for the h8300sim library.
2 #    Copyright (C) 1990, 1991, 1992 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 srcdir = .
20 srcroot = $(srcdir)/../../
21
22
23 prefix = /usr/local
24
25 program_transform_name =
26 exec_prefix = $(prefix)
27 bindir = $(exec_prefix)/bin
28 libdir = $(exec_prefix)/lib
29 tooldir = $(libdir)/$(target_alias)
30
31 datadir = $(prefix)/lib
32 mandir = $(prefix)/man
33 man1dir = $(mandir)/man1
34 man2dir = $(mandir)/man2
35 man3dir = $(mandir)/man3
36 man4dir = $(mandir)/man4
37 man5dir = $(mandir)/man5
38 man6dir = $(mandir)/man6
39 man7dir = $(mandir)/man7
40 man8dir = $(mandir)/man8
41 man9dir = $(mandir)/man9
42 infodir = $(prefix)/info
43 includedir = $(prefix)/include
44 oldincludedir =
45 docdir = $(srcdir)/doc
46
47 SHELL = /bin/sh
48
49
50
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
58
59 CC_FOR_BUILD = cc
60 AR = ar
61 AR_FLAGS = qc
62 CFLAGS = -g
63 BISON = bison
64 MAKEINFO = makeinfo
65 RANLIB = ranlib
66 X=xstuff.o
67 XL=-lX11
68 X=
69 XL=
70 INCDIR = $(srcdir)/../../include 
71 CSEARCH = -I. -I$(srcdir)  -I../../include  \
72   -I../../bfd -I$(INCDIR) -I$(srcdir)/../../bfd -I$(srcdir)/../../gdb -I$(srcdir)/../../newlib/libc/sys/sh
73 DEP = mkdep
74
75 #### host, target, and site specific Makefile frags come in here.
76
77 all:    run libsim.a
78
79
80 run:    interp.o $(X) run.o table.o
81         $(CC) $(CFLAGS) -o run $(X) interp.o table.o run.o ../../bfd/libbfd.a ../../libiberty/libiberty.a $(XL)
82
83 interp.o:interp.c code.c table.c
84 run.o:run.c 
85
86 libsim.a:interp.o table.o
87         $(AR) $(ARFLAGS) libsim.a interp.o table.o
88         $(RANLIB) libsim.a
89
90 code.c:gencode
91         ./gencode -x >code.c
92 #       indent code.c
93
94 table.c:gencode
95         ./gencode -s >table.c
96 #       indent table.c
97
98 gencode:gencode.c
99         $(CC_FOR_BUILD) -o gencode $(srcdir)/gencode.c
100
101
102 #### host and target dependent Makefile fragments come in here.
103 ###
104
105 FLAGS_TO_PASS = \
106         "against=$(against)" \
107         "AR=$(AR)" \
108         "AR_FLAGS=$(AR_FLAGS)" \
109         "CC=$(CC)" \
110         "CFLAGS=$(CFLAGS)" \
111         "RANLIB=$(RANLIB)" \
112         "MAKEINFO=$(MAKEINFO)" \
113         "INSTALL=$(INSTALL)" \
114         "INSTALL_DATA=$(INSTALL_DATA)" \
115         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
116         "BISON=$(BISON)"
117
118 .c.o:
119         $(CC) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) $<
120
121
122
123 .NOEXPORT:
124
125 check:
126
127 info:
128 clean-info:
129 install-info:
130
131 # HDEPFILES comes from the host config; TDEPFILES from the target config.
132
133
134
135 tags etags: TAGS
136
137 TAGS: force
138         etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
139
140 clean:
141         rm -f *.[oa] *~ core *.E *.p *.ip aout-params.h gen-aout
142
143 clobber realclean: clean
144         rm -f libbfd.a TAGS
145
146 # Mark everything as depending on config.status, since the timestamp on
147 # sysdep.h might actually move backwards if we reconfig and relink it
148 # to a different hosts/h-xxx.h file.  This will force a recompile anyway.
149 RECONFIG = config.status
150
151
152
153 # This target should be invoked before building a new release.
154 # 'VERSION' file must be present and contain a string of the form "x.y"
155 #
156 roll:
157         @V=`cat VERSION`                ; \
158         MAJ=`sed 's/\..*//' VERSION`    ; \
159         MIN=`sed 's/.*\.//' VERSION`    ; \
160         V=$$MAJ.`expr $$MIN + 1`        ; \
161         rm -f VERSION                   ; \
162         echo $$V >VERSION               ; \
163         echo Version $$V
164
165 # Dummy target to force execution of dependent targets.
166 #
167 force:
168
169 # Copy the files into directories where they will be run.
170 install:
171         srcroot=`cd $(srcroot); pwd`; export srcroot; \
172         $(INSTALL_XFORM) run $(bindir)/run ;  \
173         n=`t='$(program_transform_name)'; echo run | sed -e "" $$t`; \
174         if [ -d $(tooldir) ] ; then \
175           if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
176           rm -f $(tooldir)/bin/run;  \
177           ln $(bindir)/$$n $(tooldir)/bin/run \
178            || $(INSTALL_PROGRAM) run $(tooldir)/bin/run; \
179         else true; fi
180
181 install-man: run.1
182         $(INSTALL_XFORM1) $(srcdir)/run.1 $(man1dir)/run.1
183
184
185 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
186         $(SHELL) ./config.status
187
188 dep: $(CFILES)
189         mkdep $(CFLAGS) $?
190
191
192 # What appears below is generated by a hacked mkdep using gcc -MM.
193
194 # DO NOT DELETE THIS LINE -- mkdep uses it.
195 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
196
197
198 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
199