Commit | Line | Data |
---|---|---|
add1fb05 | 1 | # Makefile template for Configure for the opcodes library. |
40db6118 | 2 | # Copyright (C) 1990, 1991, 1992, 1995 Free Software Foundation, Inc. |
add1fb05 SC |
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 | |
40db6118 | 17 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
add1fb05 | 18 | |
40db6118 ILT |
19 | VPATH = @srcdir@ |
20 | srcdir = @srcdir@ | |
add1fb05 | 21 | |
40db6118 | 22 | prefix = @prefix@ |
add1fb05 | 23 | |
40db6118 | 24 | exec_prefix = @exec_prefix@ |
add1fb05 SC |
25 | bindir = $(exec_prefix)/bin |
26 | libdir = $(exec_prefix)/lib | |
27 | ||
28 | datadir = $(prefix)/lib | |
29 | mandir = $(prefix)/man | |
30 | man1dir = $(mandir)/man1 | |
31 | man2dir = $(mandir)/man2 | |
32 | man3dir = $(mandir)/man3 | |
33 | man4dir = $(mandir)/man4 | |
34 | man5dir = $(mandir)/man5 | |
35 | man6dir = $(mandir)/man6 | |
36 | man7dir = $(mandir)/man7 | |
37 | man8dir = $(mandir)/man8 | |
38 | man9dir = $(mandir)/man9 | |
39 | infodir = $(prefix)/info | |
40 | includedir = $(prefix)/include | |
41 | oldincludedir = | |
42 | docdir = $(srcdir)/doc | |
43 | ||
44 | SHELL = /bin/sh | |
45 | ||
40db6118 ILT |
46 | INSTALL = @INSTALL@ |
47 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
48 | INSTALL_DATA = @INSTALL_DATA@ | |
add1fb05 | 49 | |
40db6118 ILT |
50 | AR = @AR@ |
51 | AR_FLAGS = rc | |
52 | CC = @CC@ | |
53 | CFLAGS = @CFLAGS@ | |
add1fb05 SC |
54 | BISON = bison |
55 | MAKEINFO = makeinfo | |
40db6118 | 56 | RANLIB = @RANLIB@ |
add1fb05 | 57 | |
fde326fb | 58 | INCDIR = $(srcdir)/../include |
c840244e | 59 | BFDDIR = $(srcdir)/../bfd |
fde326fb | 60 | CSEARCH = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) |
add1fb05 SC |
61 | DEP = mkdep |
62 | ||
63 | ||
794a16b0 | 64 | TARGETLIB = libopcodes.a |
add1fb05 | 65 | |
f7ed13c7 JK |
66 | # To circumvent a Sun make VPATH bug, each file listed here |
67 | # should also have a foo.o: foo.c line further along in this file. | |
a4c01299 | 68 | |
d7ace307 ILT |
69 | ALL_MACHINES = a29k-dis.o alpha-dis.o h8300-dis.o h8500-dis.o \ |
70 | $(start-sanitize-arc) \ | |
71 | arc-dis.o arc-opc.o \ | |
72 | $(end-sanitize-arc) \ | |
40db6118 | 73 | hppa-dis.o i386-dis.o i960-dis.o m68k-dis.o m68k-opc.o \ |
d7ace307 ILT |
74 | m88k-dis.o mips-dis.o mips-opc.o sh-dis.o sparc-dis.o \ |
75 | sparc-opc.o z8k-dis.o ns32k-dis.o ppc-dis.o ppc-opc.o \ | |
76 | arm-dis.o w65-dis.o | |
77 | ||
40db6118 | 78 | OFILES = @BFD_MACHINES@ dis-buf.o disassemble.o |
add1fb05 SC |
79 | |
80 | FLAGS_TO_PASS = \ | |
81 | "against=$(against)" \ | |
82 | "AR=$(AR)" \ | |
83 | "AR_FLAGS=$(AR_FLAGS)" \ | |
84 | "CC=$(CC)" \ | |
85 | "CFLAGS=$(CFLAGS)" \ | |
86 | "RANLIB=$(RANLIB)" \ | |
87 | "MAKEINFO=$(MAKEINFO)" \ | |
88 | "INSTALL=$(INSTALL)" \ | |
89 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
90 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ | |
91 | "BISON=$(BISON)" | |
92 | ||
40db6118 | 93 | ALL_CFLAGS = $(CSEARCH) @HDEFINES@ $(CFLAGS) |
add1fb05 | 94 | |
40db6118 ILT |
95 | .c.o: |
96 | $(CC) -c $(ALL_CFLAGS) $< | |
add1fb05 SC |
97 | |
98 | # C source files that correspond to .o's. | |
d7ace307 | 99 | CFILES = i386-dis.c z8k-dis.c m68k-dis.c mips-dis.c ns32k-dis.c ppc-dis.c |
add1fb05 SC |
100 | |
101 | STAGESTUFF = $(TARGETLIB) $(OFILES) | |
102 | ||
103 | all: $(TARGETLIB) | |
104 | ||
105 | ||
106 | .NOEXPORT: | |
107 | ||
5d0734a7 | 108 | installcheck check: |
add1fb05 | 109 | |
e5bc6aaf | 110 | info: |
add1fb05 | 111 | clean-info: |
e5bc6aaf | 112 | install-info: |
5d0734a7 | 113 | dvi: |
add1fb05 SC |
114 | |
115 | # HDEPFILES comes from the host config; TDEPFILES from the target config. | |
116 | ||
117 | ||
118 | $(TARGETLIB): $(OFILES) | |
119 | rm -f $(TARGETLIB) | |
120 | $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES) | |
121 | $(RANLIB) $(TARGETLIB) | |
122 | ||
d7ace307 | 123 | disassemble.o: disassemble.c $(INCDIR)/dis-asm.h |
40db6118 | 124 | $(CC) -c @archdefs@ $(ALL_CFLAGS) $(srcdir)/disassemble.c |
d7ace307 | 125 | |
fde326fb ILT |
126 | a29k-dis.o: a29k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/a29k.h |
127 | dis-buf.o: dis-buf.c $(INCDIR)/dis-asm.h | |
128 | h8500-dis.o: h8500-dis.c h8500-opc.h $(INCDIR)/dis-asm.h | |
129 | h8300-dis.o: h8300-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/h8300.h | |
130 | i386-dis.o: i386-dis.c $(INCDIR)/dis-asm.h | |
131 | i960-dis.o: i960-dis.c $(INCDIR)/dis-asm.h | |
d7ace307 ILT |
132 | w65-dis.o: w65-dis.c |
133 | m68k-dis.o: m68k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/floatformat.h \ | |
fde326fb | 134 | $(INCDIR)/opcode/m68k.h |
40db6118 | 135 | m68k-opc.o: m68k-opc.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/m68k.h |
fde326fb | 136 | mips-dis.o: mips-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/mips.h |
d7ace307 ILT |
137 | mips-opc.o: mips-opc.c $(INCDIR)/opcode/mips.h |
138 | ppc-dis.o: ppc-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ppc.h | |
139 | ppc-opc.o: ppc-opc.c $(INCDIR)/opcode/ppc.h | |
fde326fb ILT |
140 | sparc-dis.o: sparc-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/sparc.h |
141 | sparc-opc.o: sparc-opc.c $(INCDIR)/opcode/sparc.h | |
142 | z8k-dis.o: z8k-dis.c z8k-opc.h $(INCDIR)/dis-asm.h | |
d7ace307 | 143 | ns32k-dis.o: ns32k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ns32k.h |
fde326fb ILT |
144 | sh-dis.o: sh-dis.c sh-opc.h $(INCDIR)/dis-asm.h |
145 | alpha-dis.o: alpha-dis.c alpha-opc.h $(INCDIR)/dis-asm.h | |
146 | hppa-dis.o: hppa-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/hppa.h | |
a4c01299 | 147 | m88k-dis.o: m88k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/m88k.h |
d7ace307 | 148 | arm-dis.o: arm-dis.c arm-opc.h $(INCDIR)/dis-asm.h |
68ca3238 | 149 | |
add1fb05 SC |
150 | tags etags: TAGS |
151 | ||
152 | TAGS: force | |
153 | etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c | |
154 | ||
40db6118 | 155 | MOSTLYCLEAN = *.o core *.E *.p *.ip config.log |
d7ace307 | 156 | mostlyclean: |
c840244e | 157 | rm -rf $(MOSTLYCLEAN) |
add1fb05 | 158 | clean: |
c840244e PB |
159 | rm -f *.a $(MOSTLYCLEAN) |
160 | distclean: clean | |
40db6118 | 161 | rm -rf Makefile config.status TAGS config.cache config.h |
c840244e | 162 | clobber realclean: distclean |
add1fb05 SC |
163 | |
164 | # Mark everything as depending on config.status, since the timestamp on | |
165 | # sysdep.h might actually move backwards if we reconfig and relink it | |
166 | # to a different hosts/h-xxx.h file. This will force a recompile anyway. | |
167 | RECONFIG = config.status | |
168 | ||
169 | ||
170 | ||
171 | # This target should be invoked before building a new release. | |
172 | # 'VERSION' file must be present and contain a string of the form "x.y" | |
173 | # | |
174 | roll: | |
175 | @V=`cat VERSION` ; \ | |
176 | MAJ=`sed 's/\..*//' VERSION` ; \ | |
177 | MIN=`sed 's/.*\.//' VERSION` ; \ | |
178 | V=$$MAJ.`expr $$MIN + 1` ; \ | |
179 | rm -f VERSION ; \ | |
180 | echo $$V >VERSION ; \ | |
181 | echo Version $$V | |
182 | ||
183 | # Dummy target to force execution of dependent targets. | |
184 | # | |
185 | force: | |
186 | ||
187 | install: | |
1b2f5691 | 188 | $(INSTALL_DATA) $(TARGETLIB) $(libdir)/libopcodes.a |
794a16b0 KR |
189 | $(RANLIB) $(libdir)/libopcodes.a |
190 | ||
824155e8 ILT |
191 | Makefile: Makefile.in config.status |
192 | CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status | |
193 | ||
194 | config.h: stamp-h ; @true | |
195 | stamp-h: config.in config.status | |
196 | CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status | |
40db6118 ILT |
197 | |
198 | config.status : configure $(srcdir)/../bfd/configure.host $(srcdir)/../bfd/config.bfd | |
199 | $(SHELL) config.status --recheck | |
add1fb05 SC |
200 | |
201 | dep: $(CFILES) | |
202 | mkdep $(CFLAGS) $? | |
203 | ||
204 | ||
205 | # What appears below is generated by a hacked mkdep using gcc -MM. | |
206 | ||
207 | # DO NOT DELETE THIS LINE -- mkdep uses it. | |
208 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
209 | ||
210 | ||
211 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY | |
212 |