459b3eb87bf93b5fd917042e30e5e703b9c97e5a
[deliverable/binutils-gdb.git] / opcodes / Makefile.in
1 # Makefile template for Configure for the opcodes 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
21 prefix = /usr/local
22
23 exec_prefix = $(prefix)
24 bindir = $(exec_prefix)/bin
25 libdir = $(exec_prefix)/lib
26
27 datadir = $(prefix)/lib
28 mandir = $(prefix)/man
29 man1dir = $(mandir)/man1
30 man2dir = $(mandir)/man2
31 man3dir = $(mandir)/man3
32 man4dir = $(mandir)/man4
33 man5dir = $(mandir)/man5
34 man6dir = $(mandir)/man6
35 man7dir = $(mandir)/man7
36 man8dir = $(mandir)/man8
37 man9dir = $(mandir)/man9
38 infodir = $(prefix)/info
39 includedir = $(prefix)/include
40 oldincludedir =
41 docdir = $(srcdir)/doc
42
43 SHELL = /bin/sh
44
45 INSTALL = install -c
46 INSTALL_PROGRAM = $(INSTALL)
47 INSTALL_DATA = $(INSTALL)
48
49 AR = ar
50 AR_FLAGS = qc
51 CFLAGS = -g
52 BISON = bison
53 MAKEINFO = makeinfo
54 RANLIB = ranlib
55
56 INCDIR = $(srcdir)/../include
57 CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
58 DEP = mkdep
59
60
61 TARGETLIB = libopcodes.a
62
63
64 DIS_LIBS = z8k-dis.o
65
66 OFILES = $(DIS_LIBS) sparc-opc.o
67 #### host and target dependent Makefile fragments come in here.
68 ###
69
70 FLAGS_TO_PASS = \
71 "against=$(against)" \
72 "AR=$(AR)" \
73 "AR_FLAGS=$(AR_FLAGS)" \
74 "CC=$(CC)" \
75 "CFLAGS=$(CFLAGS)" \
76 "RANLIB=$(RANLIB)" \
77 "MAKEINFO=$(MAKEINFO)" \
78 "INSTALL=$(INSTALL)" \
79 "INSTALL_DATA=$(INSTALL_DATA)" \
80 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
81 "BISON=$(BISON)"
82
83 .c.o:
84 $(CC) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) $<
85
86
87 # C source files that correspond to .o's.
88 CFILES = z8k-dis.c
89
90 STAGESTUFF = $(TARGETLIB) $(OFILES)
91
92 all: $(TARGETLIB)
93
94
95 .NOEXPORT:
96
97 check:
98
99 info: force
100 @$(MAKE) subdir_do DO=info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
101
102 clean-info:
103 @$(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
104
105 install-info: force
106 @$(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
107
108 # HDEPFILES comes from the host config; TDEPFILES from the target config.
109
110
111 $(TARGETLIB): $(OFILES)
112 rm -f $(TARGETLIB)
113 $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES)
114 $(RANLIB) $(TARGETLIB)
115
116 # When compiling archures.c and targets.c, supply the default target
117 # info from configure.
118
119
120 subdir_do: force
121 @for i in $(DODIRS); do \
122 if [ -d ./$$i ] ; then \
123 if (cd ./$$i; \
124 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
125 else exit 1 ; fi ; \
126 else true ; fi ; \
127 done
128
129 tags etags: TAGS
130
131 TAGS: force
132 etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
133
134 clean:
135 rm -f *.[oa] *~ core *.E *.p *.ip aout-params.h gen-aout
136 $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
137
138 clobber realclean: clean
139 rm -f libbfd.a TAGS
140 $(MAKE) subdir_do DO=clobber "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
141
142 # Mark everything as depending on config.status, since the timestamp on
143 # sysdep.h might actually move backwards if we reconfig and relink it
144 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
145 RECONFIG = config.status
146
147
148
149 # This target should be invoked before building a new release.
150 # 'VERSION' file must be present and contain a string of the form "x.y"
151 #
152 roll:
153 @V=`cat VERSION` ; \
154 MAJ=`sed 's/\..*//' VERSION` ; \
155 MIN=`sed 's/.*\.//' VERSION` ; \
156 V=$$MAJ.`expr $$MIN + 1` ; \
157 rm -f VERSION ; \
158 echo $$V >VERSION ; \
159 echo Version $$V
160
161 # Dummy target to force execution of dependent targets.
162 #
163 force:
164
165 install:
166 -parent=`echo $(libdir)|sed -e 's@/[^/]*$$@@'`; \
167 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
168 -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi
169 $(INSTALL_DATA) $(TARGET_LIB) $(libdir)/libopcodes.a
170 $(RANLIB) $(libdir)/libopcodes.a
171
172 # -parent=`echo $(includedir)|sed -e 's@/[^/]*$$@@'`; \
173 # if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
174 # -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi
175 # $(INSTALL_DATA) $(INCDIR)/bfd.h $(includedir)/bfd.h
176 # -if [ -z "$(oldincludedir)" ] ; then true ; else if [ -d $(oldincludedir) ] ; then true ; else mkdir $(oldincludedir) ; fi ; $(INSTALL_DATA) $(INCDIR)/bfd.h $(oldincludedir)/bfd.h ; fi
177 # @$(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
178
179 # Target to uncomment host-specific lines in this makefile. Such lines must
180 # have the following string beginning in column 1: #__<hostname>__#
181 # Original Makefile is backed up as 'Makefile.old'.
182 #
183 # Invoke with: make make HOST=xxx
184 #
185 make:
186 -@if test $(HOST)x = x ; then \
187 echo '\aSpecify "make make HOST=???"'; \
188 exit 1; \
189 fi ; \
190 grep -s "^#The next line was generated by 'make make'" Makefile; \
191 if test $$? = 0 ; then \
192 echo "\aMakefile has already been processed with 'make make'";\
193 exit 1; \
194 fi ; \
195 mv -f Makefile Makefile.old; \
196 echo "#The next line was generated by 'make make'" >Makefile ; \
197 echo "HOST=$(HOST)" >>Makefile ; \
198 echo >>Makefile ; \
199 sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
200
201 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
202 $(SHELL) ./config.status
203
204 dep: $(CFILES)
205 mkdep $(CFLAGS) $?
206
207
208 # What appears below is generated by a hacked mkdep using gcc -MM.
209
210 # DO NOT DELETE THIS LINE -- mkdep uses it.
211 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
212
213
214 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
215
This page took 0.042564 seconds and 4 git commands to generate.