Commit | Line | Data |
---|---|---|
add1fb05 SC |
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 | ||
fde326fb | 56 | INCDIR = $(srcdir)/../include |
c840244e | 57 | BFDDIR = $(srcdir)/../bfd |
fde326fb | 58 | CSEARCH = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) |
add1fb05 SC |
59 | DEP = mkdep |
60 | ||
61 | ||
794a16b0 | 62 | TARGETLIB = libopcodes.a |
add1fb05 | 63 | |
f7ed13c7 JK |
64 | # To circumvent a Sun make VPATH bug, each file listed here |
65 | # should also have a foo.o: foo.c line further along in this file. | |
193dc897 | 66 | DIS_LIBS = i386-dis.o z8k-dis.o m68k-dis.o mips-dis.o h8500-dis.o h8300-dis.o dis-buf.o \ |
e0a8bcfb | 67 | sparc-dis.o a29k-dis.o i960-dis.o alpha-dis.o sh-dis.o hppa-dis.o |
add1fb05 | 68 | |
c840244e | 69 | OFILES = $(DIS_LIBS) sparc-opc.o m68881-ext.o |
add1fb05 SC |
70 | #### host and target dependent Makefile fragments come in here. |
71 | ### | |
72 | ||
73 | FLAGS_TO_PASS = \ | |
74 | "against=$(against)" \ | |
75 | "AR=$(AR)" \ | |
76 | "AR_FLAGS=$(AR_FLAGS)" \ | |
77 | "CC=$(CC)" \ | |
78 | "CFLAGS=$(CFLAGS)" \ | |
79 | "RANLIB=$(RANLIB)" \ | |
80 | "MAKEINFO=$(MAKEINFO)" \ | |
81 | "INSTALL=$(INSTALL)" \ | |
82 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
83 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ | |
84 | "BISON=$(BISON)" | |
85 | ||
86 | .c.o: | |
87 | $(CC) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) $< | |
88 | ||
89 | ||
90 | # C source files that correspond to .o's. | |
c840244e | 91 | CFILES = i386-dis.c z8k-dis.c m68k-dis.c mips-dis.c |
add1fb05 SC |
92 | |
93 | STAGESTUFF = $(TARGETLIB) $(OFILES) | |
94 | ||
95 | all: $(TARGETLIB) | |
96 | ||
97 | ||
98 | .NOEXPORT: | |
99 | ||
5d0734a7 | 100 | installcheck check: |
add1fb05 | 101 | |
e5bc6aaf | 102 | info: |
add1fb05 | 103 | clean-info: |
e5bc6aaf | 104 | install-info: |
5d0734a7 | 105 | dvi: |
add1fb05 SC |
106 | |
107 | # HDEPFILES comes from the host config; TDEPFILES from the target config. | |
108 | ||
109 | ||
110 | $(TARGETLIB): $(OFILES) | |
111 | rm -f $(TARGETLIB) | |
112 | $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES) | |
113 | $(RANLIB) $(TARGETLIB) | |
114 | ||
fde326fb ILT |
115 | a29k-dis.o: a29k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/a29k.h |
116 | dis-buf.o: dis-buf.c $(INCDIR)/dis-asm.h | |
117 | h8500-dis.o: h8500-dis.c h8500-opc.h $(INCDIR)/dis-asm.h | |
118 | h8300-dis.o: h8300-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/h8300.h | |
119 | i386-dis.o: i386-dis.c $(INCDIR)/dis-asm.h | |
120 | i960-dis.o: i960-dis.c $(INCDIR)/dis-asm.h | |
121 | m68881-ext.o: m68881-ext.c $(INCDIR)/ieee-float.h | |
122 | m68k-dis.o: m68k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/ieee-float.h \ | |
123 | $(INCDIR)/opcode/m68k.h | |
124 | mips-dis.o: mips-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/mips.h | |
125 | sparc-dis.o: sparc-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/sparc.h | |
126 | sparc-opc.o: sparc-opc.c $(INCDIR)/opcode/sparc.h | |
127 | z8k-dis.o: z8k-dis.c z8k-opc.h $(INCDIR)/dis-asm.h | |
128 | sh-dis.o: sh-dis.c sh-opc.h $(INCDIR)/dis-asm.h | |
129 | alpha-dis.o: alpha-dis.c alpha-opc.h $(INCDIR)/dis-asm.h | |
130 | hppa-dis.o: hppa-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/hppa.h | |
68ca3238 | 131 | |
add1fb05 SC |
132 | tags etags: TAGS |
133 | ||
134 | TAGS: force | |
135 | etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c | |
136 | ||
c840244e PB |
137 | MOSTLYCLEAN = *.o core *.E *.p *.ip |
138 | mostyclean: | |
139 | rm -rf $(MOSTLYCLEAN) | |
add1fb05 | 140 | clean: |
c840244e PB |
141 | rm -f *.a $(MOSTLYCLEAN) |
142 | distclean: clean | |
143 | rm -rf Makefile config.status sysdep.h TAGS | |
144 | clobber realclean: distclean | |
add1fb05 SC |
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 | install: | |
1b2f5691 | 170 | $(INSTALL_DATA) $(TARGETLIB) $(libdir)/libopcodes.a |
794a16b0 KR |
171 | $(RANLIB) $(libdir)/libopcodes.a |
172 | ||
add1fb05 SC |
173 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) |
174 | $(SHELL) ./config.status | |
175 | ||
176 | dep: $(CFILES) | |
177 | mkdep $(CFLAGS) $? | |
178 | ||
179 | ||
180 | # What appears below is generated by a hacked mkdep using gcc -MM. | |
181 | ||
182 | # DO NOT DELETE THIS LINE -- mkdep uses it. | |
183 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
184 | ||
185 | ||
186 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY | |
187 |