Makefile.in revision 33965
1# Makefile template for Configure for the opcodes library. 2# Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 3# Free Software Foundation, Inc. 4# Written by Cygnus Support. 5# 6# This program is free software; you can redistribute it and/or modify 7# it under the terms of the GNU General Public License as published by 8# the Free Software Foundation; either version 2 of the License, or 9# (at your option) any later version. 10# 11# This program is distributed in the hope that it will be useful, 12# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# GNU General Public License for more details. 15# 16# You should have received a copy of the GNU General Public License 17# along with this program; if not, write to the Free Software 18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 20VPATH = @srcdir@ 21srcdir = @srcdir@ 22 23prefix = @prefix@ 24 25program_transform_name = @program_transform_name@ 26exec_prefix = @exec_prefix@ 27bindir = @bindir@ 28libdir = @libdir@ 29 30datadir = @datadir@ 31mandir = @mandir@ 32man1dir = $(mandir)/man1 33man2dir = $(mandir)/man2 34man3dir = $(mandir)/man3 35man4dir = $(mandir)/man4 36man5dir = $(mandir)/man5 37man6dir = $(mandir)/man6 38man7dir = $(mandir)/man7 39man8dir = $(mandir)/man8 40man9dir = $(mandir)/man9 41infodir = @infodir@ 42includedir = @includedir@ 43 44SHELL = /bin/sh 45 46INSTALL = @INSTALL@ 47INSTALL_PROGRAM = @INSTALL_PROGRAM@ 48INSTALL_DATA = @INSTALL_DATA@ 49 50AR = @AR@ 51AR_FLAGS = rc 52CC = @CC@ 53CFLAGS = @CFLAGS@ 54MAKEINFO = makeinfo 55RANLIB = @RANLIB@ 56 57ALLLIBS = @ALLLIBS@ 58 59PICFLAG = @PICFLAG@ 60SHLIB = @SHLIB@ 61SHLIB_CC = @SHLIB_CC@ 62SHLIB_CFLAGS = @SHLIB_CFLAGS@ 63SHLIB_LIBS = @SHLIB_LIBS@ 64COMMON_SHLIB = @COMMON_SHLIB@ 65SHLIB_DEP = @SHLIB_DEP@ 66SHLINK = @SHLINK@ 67 68SONAME = lib`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'` 69 70INCDIR = $(srcdir)/../include 71BFDDIR = $(srcdir)/../bfd 72CSEARCH = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) 73DEP = mkdep 74 75TARGETLIB = libopcodes.a 76 77# This is where bfd.h lives. 78BFD_H = ../bfd/bfd.h 79 80# Header files. 81HFILES = \ 82 arm-opc.h \ 83 h8500-opc.h \ 84 sh-opc.h \ 85 sysdep.h \ 86 w65-opc.h \ 87 z8k-opc.h 88 89# C source files that correspond to .o's. 90CFILES = \ 91 a29k-dis.c \ 92 alpha-dis.c \ 93 alpha-opc.c \ 94 arm-dis.c \ 95 cgen-asm.c \ 96 cgen-dis.c \ 97 cgen-opc.c \ 98 d10v-dis.c \ 99 d10v-opc.c \ 100 dis-buf.c \ 101 disassemble.c \ 102 h8300-dis.c \ 103 h8500-dis.c \ 104 hppa-dis.c \ 105 i386-dis.c \ 106 i960-dis.c \ 107 m32r-asm.c \ 108 m32r-dis.c \ 109 m32r-opc.c \ 110 m68k-dis.c \ 111 m68k-opc.c \ 112 m88k-dis.c \ 113 mips-dis.c \ 114 mips-opc.c \ 115 mips16-opc.c \ 116 m10200-dis.c \ 117 m10200-opc.c \ 118 m10300-dis.c \ 119 m10300-opc.c \ 120 ns32k-dis.c \ 121 ppc-dis.c \ 122 ppc-opc.c \ 123 sh-dis.c \ 124 sparc-dis.c \ 125 sparc-opc.c \ 126 w65-dis.c \ 127 z8k-dis.c \ 128 z8kgen.c 129 130ALL_MACHINES = \ 131 a29k-dis.o \ 132 alpha-dis.o \ 133 alpha-opc.o \ 134 arm-dis.o \ 135 cgen-asm.o \ 136 cgen-dis.o \ 137 cgen-opc.o \ 138 d10v-dis.o \ 139 d10v-opc.o \ 140 h8300-dis.o \ 141 h8500-dis.o \ 142 hppa-dis.o \ 143 i386-dis.o \ 144 i960-dis.o \ 145 m32r-asm.o \ 146 m32r-dis.o \ 147 m32r-opc.o \ 148 m68k-dis.o \ 149 m68k-opc.o \ 150 m88k-dis.o \ 151 m10200-dis.o \ 152 m10200-opc.o \ 153 m10300-dis.o \ 154 m10300-opc.o \ 155 mips-dis.o \ 156 mips-opc.o \ 157 mips16-opc.o \ 158 ppc-dis.o \ 159 ppc-opc.o \ 160 ns32k-dis.o \ 161 sh-dis.o \ 162 sparc-dis.o \ 163 sparc-opc.o \ 164 w65-dis.o \ 165 z8k-dis.o 166 167OFILES = @BFD_MACHINES@ dis-buf.o disassemble.o 168 169FLAGS_TO_PASS = \ 170 "against=$(against)" \ 171 "AR=$(AR)" \ 172 "AR_FLAGS=$(AR_FLAGS)" \ 173 "CC=$(CC)" \ 174 "CFLAGS=$(CFLAGS)" \ 175 "RANLIB=$(RANLIB)" \ 176 "MAKEINFO=$(MAKEINFO)" \ 177 "INSTALL=$(INSTALL)" \ 178 "INSTALL_DATA=$(INSTALL_DATA)" \ 179 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" 180 181ALL_CFLAGS = -D_GNU_SOURCE $(CSEARCH) @HDEFINES@ $(CFLAGS) 182 183.c.o: 184 if [ -n "$(PICFLAG)" ]; then \ 185 $(CC) -c $(PICFLAG) $(ALL_CFLAGS) $< -o pic/$@; \ 186 else true; fi 187 $(CC) -c $(ALL_CFLAGS) $< 188 189all: $(ALLLIBS) 190 191.NOEXPORT: 192 193installcheck check: 194 195info: 196clean-info: 197install-info: 198dvi: 199 200# HDEPFILES comes from the host config; TDEPFILES from the target config. 201 202$(TARGETLIB): $(OFILES) 203 rm -f $(TARGETLIB) 204 $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES) 205 $(RANLIB) $(TARGETLIB) 206 207LIBIBERTY_LISTS = ../libiberty/required-list ../libiberty/needed-list 208BFD_PICLIST = @BFD_PICLIST@ 209 210stamp-piclist: Makefile $(LIBIBERTY_LISTS) $(BFD_PICLIST) 211 rm -f tpiclist 212 if [ -n "$(PICFLAG)" ]; then \ 213 echo $(OFILES) | sed -e 's,\([^ ][^ ]*\),pic/\1,g' > tpiclist; \ 214 else \ 215 echo $(OFILES) > tpiclist; \ 216 fi 217 if [ "$(COMMON_SHLIB)" = "yes" ]; then \ 218 lobjs=`cat $(LIBIBERTY_LISTS)`; \ 219 if [ -n "$(PICFLAG)" ]; then \ 220 lobjs=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),pic/\1,g'`; \ 221 fi; \ 222 lobjs=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),../libiberty/\1,g'`; \ 223 echo $$lobjs >> tpiclist; \ 224 sed -e 's,\([^ ][^ ]*\),../bfd/\1,g' $(BFD_PICLIST) >> tpiclist; \ 225 else true; fi 226 $(srcdir)/../move-if-change tpiclist piclist 227 touch stamp-piclist 228 229piclist: stamp-piclist ; @true 230 231$(SHLIB): stamp-picdir $(OFILES) piclist $(SHLIB_DEP) 232 rm -f $(SHLIB) 233 $(SHLIB_CC) $(SHLIB_CFLAGS) -o $(SHLIB) `cat piclist` $(SHLIB_LIBS) 234 235$(SHLINK): $(SHLIB) 236 ts=lib`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed -e '$(program_transform_name)'`; \ 237 if [ "$(COMMON_SHLIB)" = "yes" ]; then \ 238 ts=../bfd/$$ts; \ 239 fi; \ 240 if [ "$$ts" != "$(SHLIB)" ]; then \ 241 rm -f $$ts; \ 242 ln -s `echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $$ts; \ 243 else true; fi 244 rm -f $(SHLINK) 245 ln -s `echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $(SHLINK) 246 247# This target creates libTARGET-opcodes.so.VERSION as a symlink to 248# libopcodes.so.VERSION. It is used on SunOS, which does not have SONAME. 249stamp-tshlink: $(SHLIB) 250 tf=lib`echo $(SHLIB) | sed -e 's,\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \ 251 if [ "$(COMMON_SHLIB)" = "yes" ]; then \ 252 tf=../bfd/$$tf; \ 253 fi; \ 254 if [ "$$tf" != "$(SHLIB)" ]; then \ 255 rm -f $$tf; \ 256 ln -s $(SHLIB) $$tf; \ 257 else true; fi 258 if [ "$(COMMON_SHLIB)" = "yes" ]; then \ 259 tf=lib`echo $(TARGETLIB) | sed -e 's/^lib//' | sed '$(program_transform_name)'`; \ 260 if [ "$$tf" != "$(TARGETLIB)" ]; then \ 261 rm -f $$tf; \ 262 ln -s $(TARGETLIB) $$tf; \ 263 else true; fi; \ 264 else true; fi 265 touch stamp-tshlink 266 267$(OFILES): stamp-picdir 268 269disassemble.o: disassemble.c $(INCDIR)/dis-asm.h 270 if [ -n "$(PICFLAG)" ]; then \ 271 $(CC) -c @archdefs@ $(PICFLAG) $(ALL_CFLAGS) $(srcdir)/disassemble.c -o pic/disassemble.o; \ 272 else true; fi 273 $(CC) -c @archdefs@ $(ALL_CFLAGS) $(srcdir)/disassemble.c 274 275 276tags etags: TAGS 277 278TAGS: force 279 etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c 280 281MOSTLYCLEAN = *.o core *.E *.p *.ip pic/*.o 282mostlyclean: 283 rm -rf $(MOSTLYCLEAN) 284clean: 285 rm -f *.a $(MOSTLYCLEAN) $(SHLIB) $(SHLINK) piclist stamp-piclist 286distclean: clean 287 rm -rf Makefile config.status TAGS config.cache config.h stamp-h \ 288 pic stamp-picdir config.log 289clobber realclean maintainer-clean: distclean 290 291# Mark everything as depending on config.status, since the timestamp on 292# sysdep.h might actually move backwards if we reconfig and relink it 293# to a different hosts/h-xxx.h file. This will force a recompile anyway. 294RECONFIG = config.status 295 296# This target should be invoked before building a new release. 297# 'VERSION' file must be present and contain a string of the form "x.y" 298# 299roll: 300 @V=`cat VERSION` ; \ 301 MAJ=`sed 's/\..*//' VERSION` ; \ 302 MIN=`sed 's/.*\.//' VERSION` ; \ 303 V=$$MAJ.`expr $$MIN + 1` ; \ 304 rm -f VERSION ; \ 305 echo $$V >VERSION ; \ 306 echo Version $$V 307 308# Dummy target to force execution of dependent targets. 309# 310force: 311 312install: $(ALLLIBS) 313 for f in $(ALLLIBS); do \ 314 if [ "$$f" = "stamp-tshlink" ]; then \ 315 continue; \ 316 fi; \ 317 tf=lib`echo $$f | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \ 318 rm -f $(libdir)/$$tf; \ 319 if [ "$$f" = "$(SHLINK)" ]; then \ 320 ts=lib`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \ 321 ln -s $$ts $(libdir)/$$tf; \ 322 elif [ "$$f" = "$(SHLIB)" ]; then \ 323 @INSTALL_SHLIB@ \ 324 else \ 325 $(INSTALL_DATA) $$f $(libdir)/$$tf; \ 326 $(RANLIB) $(libdir)/$$tf; \ 327 chmod a-x $(libdir)/$$tf; \ 328 fi; \ 329 done 330 331Makefile: Makefile.in config.status 332 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status 333 334config.h: stamp-h ; @true 335stamp-h: config.in config.status 336 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status 337 338config.status: configure $(srcdir)/../bfd/configure.host $(srcdir)/../bfd/config.bfd $(srcdir)/../bfd/VERSION 339 $(SHELL) config.status --recheck 340 341stamp-picdir: 342 if [ -n "$(PICFLAG)" ] && [ ! -d pic ]; then \ 343 mkdir pic; \ 344 else true; fi 345 touch stamp-picdir 346 347# This dependency stuff is copied from BFD. 348 349.dep: dep.sed $(CFILES) $(HFILES) config.h 350 rm -f .dep1 351 $(MAKE) DEP=$(DEP) .dep1 352 sed -f dep.sed < .dep1 > .dep 353 354.dep1: $(CFILES) 355 rm -f .dep2 .dep2a 356 echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2 357 echo > .dep2a 358 $(DEP) -f .dep2a $(ALL_CFLAGS) $? 359 sed -e '/DO NOT DELETE/d' -e '/^$$/d' < .dep2a >> .dep2 360 rm -f .dep2a 361 $(srcdir)/../move-if-change .dep2 .dep1 362 363dep.sed: dep-in.sed config.status 364 sed <$(srcdir)/dep-in.sed >dep.sed \ 365 -e 's!@BFD_H@!$(BFD_H)!' \ 366 -e 's!@INCDIR@!$(INCDIR)!' \ 367 -e 's!@BFDDIR@!$(BFDDIR)!' \ 368 -e 's!@SRCDIR@!$(srcdir)!' 369 370dep: .dep 371 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile 372 cat .dep >> tmp-Makefile 373 $(srcdir)/../move-if-change tmp-Makefile Makefile 374 375dep-in: .dep 376 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in 377 cat .dep >> tmp-Makefile.in 378 $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in 379 380.PHONY: dep dep-in 381 382# What appears below is generated by a hacked mkdep using gcc -MM. 383 384# DO NOT DELETE THIS LINE -- mkdep uses it. 385# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. 386a29k-dis.o: a29k-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ 387 $(INCDIR)/ansidecl.h $(INCDIR)/opcode/a29k.h 388alpha-dis.o: alpha-dis.c $(INCDIR)/ansidecl.h sysdep.h \ 389 config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/alpha.h 390alpha-opc.o: alpha-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/alpha.h \ 391 $(BFD_H) 392arm-dis.o: arm-dis.c $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \ 393 arm-opc.h 394cgen-asm.o: cgen-asm.c config.h $(INCDIR)/ansidecl.h \ 395 $(INCDIR)/libiberty.h $(BFD_H) $(INCDIR)/opcode/cgen.h 396cgen-dis.o: cgen-dis.c config.h $(INCDIR)/ansidecl.h \ 397 $(INCDIR)/libiberty.h $(BFD_H) $(INCDIR)/opcode/cgen.h 398cgen-opc.o: cgen-opc.c config.h $(INCDIR)/ansidecl.h \ 399 $(INCDIR)/libiberty.h $(BFD_H) $(INCDIR)/opcode/cgen.h 400d10v-dis.o: d10v-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/d10v.h \ 401 $(INCDIR)/dis-asm.h $(BFD_H) 402d10v-opc.o: d10v-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/d10v.h 403dis-buf.o: dis-buf.c sysdep.h config.h $(INCDIR)/dis-asm.h \ 404 $(BFD_H) 405disassemble.o: disassemble.c $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h \ 406 $(BFD_H) 407h8300-dis.o: h8300-dis.c $(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h \ 408 $(BFD_H) $(INCDIR)/ansidecl.h 409h8500-dis.o: h8500-dis.c h8500-opc.h $(INCDIR)/dis-asm.h \ 410 $(BFD_H) $(INCDIR)/ansidecl.h 411hppa-dis.o: hppa-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \ 412 $(BFD_H) $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h 413i386-dis.o: i386-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ 414 $(INCDIR)/ansidecl.h sysdep.h config.h 415i960-dis.o: i960-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ 416 $(INCDIR)/ansidecl.h 417m32r-asm.o: m32r-asm.c $(INCDIR)/ansidecl.h $(BFD_H) \ 418 m32r-opc.h $(INCDIR)/opcode/cgen.h 419m32r-dis.o: m32r-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h \ 420 $(BFD_H) m32r-opc.h $(INCDIR)/opcode/cgen.h 421m32r-opc.o: m32r-opc.c config.h $(INCDIR)/ansidecl.h \ 422 $(INCDIR)/libiberty.h $(BFD_H) m32r-opc.h $(INCDIR)/opcode/cgen.h 423m68k-dis.o: m68k-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ 424 $(INCDIR)/ansidecl.h $(INCDIR)/floatformat.h $(INCDIR)/opcode/m68k.h 425m68k-opc.o: m68k-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/m68k.h 426m88k-dis.o: m88k-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ 427 $(INCDIR)/ansidecl.h $(INCDIR)/opcode/m88k.h 428mips-dis.o: mips-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \ 429 $(BFD_H) $(INCDIR)/opcode/mips.h $(BFDDIR)/elf-bfd.h \ 430 $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ 431 $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h 432mips-opc.o: mips-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mips.h 433mips16-opc.o: mips16-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mips.h 434m10200-dis.o: m10200-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10200.h \ 435 $(INCDIR)/dis-asm.h $(BFD_H) 436m10200-opc.o: m10200-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10200.h 437m10300-dis.o: m10300-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10300.h \ 438 $(INCDIR)/dis-asm.h $(BFD_H) 439m10300-opc.o: m10300-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10300.h 440ns32k-dis.o: ns32k-dis.c $(BFD_H) $(INCDIR)/ansidecl.h \ 441 sysdep.h config.h $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ns32k.h 442ppc-dis.o: ppc-dis.c $(INCDIR)/ansidecl.h sysdep.h \ 443 config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/ppc.h 444ppc-opc.o: ppc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/ppc.h 445sh-dis.o: sh-dis.c sh-opc.h $(INCDIR)/dis-asm.h $(BFD_H) \ 446 $(INCDIR)/ansidecl.h 447sparc-dis.o: sparc-dis.c $(INCDIR)/ansidecl.h sysdep.h \ 448 config.h $(INCDIR)/opcode/sparc.h $(INCDIR)/dis-asm.h \ 449 $(BFD_H) $(INCDIR)/libiberty.h 450sparc-opc.o: sparc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/sparc.h 451w65-dis.o: w65-dis.c w65-opc.h $(INCDIR)/dis-asm.h \ 452 $(BFD_H) $(INCDIR)/ansidecl.h 453z8k-dis.o: z8k-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \ 454 $(BFD_H) z8k-opc.h 455z8kgen.o: z8kgen.c sysdep.h config.h 456# IF YOU PUT ANYTHING HERE IT WILL GO AWAY 457