home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gdb-4.16-base.tgz / gdb-4.16-base.tar / fsf / gdb / opcodes / Makefile.in < prev    next >
Makefile  |  1996-04-23  |  9KB  |  306 lines

  1. #    Makefile template for Configure for the opcodes library.
  2. #    Copyright (C) 1990, 1991, 1992, 1995 Free Software Foundation, Inc.
  3. #    Written by Cygnus Support.
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2 of the License, or
  7. # (at your option) any later version.
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with this program; if not, write to the Free Software
  14. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  15.  
  16. VPATH = @srcdir@
  17. srcdir = @srcdir@
  18.  
  19. prefix = @prefix@
  20.  
  21. program_transform_name = @program_transform_name@
  22. exec_prefix = @exec_prefix@
  23. bindir = $(exec_prefix)/bin
  24. libdir = $(exec_prefix)/lib
  25.  
  26. datadir = $(prefix)/lib
  27. mandir = $(prefix)/man
  28. man1dir = $(mandir)/man1
  29. man2dir = $(mandir)/man2
  30. man3dir = $(mandir)/man3
  31. man4dir = $(mandir)/man4
  32. man5dir = $(mandir)/man5
  33. man6dir = $(mandir)/man6
  34. man7dir = $(mandir)/man7
  35. man8dir = $(mandir)/man8
  36. man9dir = $(mandir)/man9
  37. infodir = $(prefix)/info
  38. includedir = $(prefix)/include
  39. oldincludedir =
  40. docdir = $(srcdir)/doc
  41.  
  42. SHELL = /bin/sh
  43.  
  44. INSTALL = @INSTALL@
  45. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  46. INSTALL_DATA = @INSTALL_DATA@
  47.  
  48. AR = @AR@
  49. AR_FLAGS = rc
  50. CC = @CC@
  51. CFLAGS = @CFLAGS@
  52. MAKEINFO = makeinfo
  53. RANLIB = @RANLIB@
  54.  
  55. ALLLIBS = @ALLLIBS@
  56.  
  57. PICFLAG = @PICFLAG@
  58. SHLIB = @SHLIB@
  59. SHLIB_CC = @SHLIB_CC@
  60. SHLIB_CFLAGS = @SHLIB_CFLAGS@
  61. COMMON_SHLIB = @COMMON_SHLIB@
  62. SHLIB_DEP = @SHLIB_DEP@
  63. SHLINK = @SHLINK@
  64.  
  65. SONAME = lib`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`
  66.  
  67. INCDIR = $(srcdir)/../include
  68. BFDDIR = $(srcdir)/../bfd
  69. CSEARCH = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR)
  70. DEP = mkdep
  71.  
  72. TARGETLIB = libopcodes.a
  73.  
  74. # To circumvent a Sun make VPATH bug, each file listed here
  75. # should also have a foo.o: foo.c line further along in this file.
  76.  
  77. ALL_MACHINES = a29k-dis.o alpha-dis.o h8300-dis.o h8500-dis.o \
  78.     hppa-dis.o i386-dis.o i960-dis.o m68k-dis.o m68k-opc.o \
  79.     m88k-dis.o mips-dis.o mips-opc.o sh-dis.o sparc-dis.o \
  80.     sparc-opc.o z8k-dis.o ns32k-dis.o ppc-dis.o ppc-opc.o \
  81.     arm-dis.o w65-dis.o
  82.  
  83. OFILES = @BFD_MACHINES@ dis-buf.o disassemble.o
  84.  
  85. FLAGS_TO_PASS = \
  86.     "against=$(against)" \
  87.     "AR=$(AR)" \
  88.     "AR_FLAGS=$(AR_FLAGS)" \
  89.     "CC=$(CC)" \
  90.     "CFLAGS=$(CFLAGS)" \
  91.     "RANLIB=$(RANLIB)" \
  92.     "MAKEINFO=$(MAKEINFO)" \
  93.     "INSTALL=$(INSTALL)" \
  94.     "INSTALL_DATA=$(INSTALL_DATA)" \
  95.     "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
  96.  
  97. ALL_CFLAGS = $(CSEARCH) @HDEFINES@ $(CFLAGS)
  98.  
  99. .c.o:
  100.     if [ -n "$(PICFLAG)" ]; then \
  101.       $(CC) -c $(PICFLAG) $(ALL_CFLAGS) $< -o pic/$@; \
  102.     else true; fi
  103.     $(CC) -c $(ALL_CFLAGS) $<
  104.  
  105. # C source files that correspond to .o's.
  106. CFILES = i386-dis.c z8k-dis.c m68k-dis.c mips-dis.c ns32k-dis.c ppc-dis.c
  107.  
  108. all: $(ALLLIBS)
  109.  
  110. .NOEXPORT:
  111.  
  112. installcheck check:
  113.  
  114. info:
  115. clean-info:
  116. install-info:
  117. dvi:
  118.  
  119. # HDEPFILES comes from the host config; TDEPFILES from the target config.
  120.  
  121.  
  122. $(TARGETLIB): $(OFILES)
  123.      rm -f $(TARGETLIB)
  124.      $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES)
  125.      $(RANLIB) $(TARGETLIB)
  126.  
  127. LIBIBERTY_LISTS = ../libiberty/required-list ../libiberty/needed-list
  128. BFD_LIST = ../bfd/piclist
  129.  
  130. stamp-piclist: Makefile $(LIBIBERTY_LISTS) $(BFD_LIST)
  131.     rm -f tpiclist
  132.     if [ -n "$(PICFLAG)" ]; then \
  133.       echo $(OFILES) | sed -e 's,\([^ ][^ ]*\),pic/\1,g' > tpiclist; \
  134.     else \
  135.       echo $(OFILES) > tpiclist; \
  136.     fi
  137.     if [ "$(COMMON_SHLIB)" = "yes" ]; then \
  138.       lobjs=`cat $(LIBIBERTY_LISTS)`; \
  139.       if [ -n "$(PICFLAG)" ]; then \
  140.         lobjs=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),pic/\1,g'`; \
  141.       fi; \
  142.       lobjs=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),../libiberty/\1,g'`; \
  143.       echo $$lobjs >> tpiclist; \
  144.       sed -e 's,\([^ ][^ ]*\),../bfd/\1,g' $(BFD_LIST) >> tpiclist; \
  145.     else true; fi
  146.     $(srcdir)/../move-if-change tpiclist piclist
  147.     touch stamp-piclist
  148.  
  149. piclist: stamp-piclist ; @true
  150.  
  151. $(SHLIB): stamp-picdir $(OFILES) piclist $(SHLIB_DEP)
  152.     rm -f $(SHLIB)
  153.     $(SHLIB_CC) $(SHLIB_CFLAGS) -o $(SHLIB) `cat piclist`
  154.  
  155. $(SHLINK): $(SHLIB)
  156.     ts=lib`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed -e '$(program_transform_name)'`; \
  157.     if [ "$(COMMON_SHLIB)" = "yes" ]; then \
  158.       ts=../bfd/$$ts; \
  159.     fi; \
  160.     if [ "$$ts" != "$(SHLIB)" ]; then \
  161.       rm -f $$ts; \
  162.       ln -sf `echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $$ts; \
  163.     else true; fi
  164.     rm -f $(SHLINK)
  165.     ln -sf `echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $(SHLINK)
  166.  
  167. # This target creates libTARGET-opcodes.so.VERSION as a symlink to
  168. # libopcodes.so.VERSION.  It is used on SunOS, which does not have SONAME.
  169. stamp-tshlink: $(SHLIB)
  170.     tf=lib`echo $(SHLIB) | sed -e 's,\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
  171.     if [ "$(COMMON_SHLIB)" = "yes" ]; then \
  172.       tf=../bfd/$$tf; \
  173.     fi; \
  174.     if [ "$$tf" != "$(SHLIB)" ]; then \
  175.       rm -f $$tf; \
  176.       ln -sf $(SHLIB) $$tf; \
  177.     else true; fi
  178.     if [ "$(COMMON_SHLIB)" = "yes" ]; then \
  179.       tf=lib`echo $(TARGETLIB) | sed -e 's/^lib//' | sed '$(program_transform_name)'`; \
  180.       if [ "$$tf" != "$(TARGETLIB)" ]; then \
  181.         rm -f $$tf; \
  182.         ln -sf $(TARGETLIB) $$tf; \
  183.       else true; fi; \
  184.     else true; fi
  185.     touch stamp-tshlink
  186.  
  187. $(OFILES): stamp-picdir
  188.  
  189. disassemble.o: disassemble.c $(INCDIR)/dis-asm.h
  190.     if [ -n "$(PICFLAG)" ]; then \
  191.       $(CC) -c @archdefs@ $(PICFLAG) $(ALL_CFLAGS) $(srcdir)/disassemble.c -o pic/disassemble.o; \
  192.     else true; fi
  193.     $(CC) -c @archdefs@ $(ALL_CFLAGS) $(srcdir)/disassemble.c
  194.  
  195. a29k-dis.o: a29k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/a29k.h
  196. dis-buf.o: dis-buf.c $(INCDIR)/dis-asm.h
  197. h8500-dis.o: h8500-dis.c h8500-opc.h $(INCDIR)/dis-asm.h
  198. h8300-dis.o: h8300-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/h8300.h
  199. i386-dis.o: i386-dis.c $(INCDIR)/dis-asm.h
  200. i960-dis.o: i960-dis.c $(INCDIR)/dis-asm.h
  201. w65-dis.o: w65-dis.c
  202. m68k-dis.o: m68k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/floatformat.h \
  203.     $(INCDIR)/opcode/m68k.h
  204. m68k-opc.o: m68k-opc.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/m68k.h
  205. mips-dis.o: mips-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/mips.h
  206. mips-opc.o: mips-opc.c $(INCDIR)/opcode/mips.h
  207. ppc-dis.o: ppc-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ppc.h
  208. ppc-opc.o: ppc-opc.c $(INCDIR)/opcode/ppc.h
  209. sparc-dis.o: sparc-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/sparc.h
  210. sparc-opc.o: sparc-opc.c $(INCDIR)/opcode/sparc.h
  211. z8k-dis.o: z8k-dis.c z8k-opc.h $(INCDIR)/dis-asm.h
  212. ns32k-dis.o: ns32k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ns32k.h
  213. sh-dis.o: sh-dis.c sh-opc.h $(INCDIR)/dis-asm.h
  214. alpha-dis.o: alpha-dis.c alpha-opc.h $(INCDIR)/dis-asm.h
  215. hppa-dis.o: hppa-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/hppa.h
  216. m88k-dis.o: m88k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/m88k.h
  217. arm-dis.o: arm-dis.c arm-opc.h $(INCDIR)/dis-asm.h
  218.  
  219. tags etags: TAGS
  220.  
  221. TAGS: force
  222.     etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
  223.  
  224. MOSTLYCLEAN = *.o core *.E *.p *.ip config.log pic/*.o
  225. mostlyclean:
  226.     rm -rf $(MOSTLYCLEAN)
  227. clean:
  228.     rm -f *.a $(MOSTLYCLEAN) $(SHLIB) $(SHLINK) piclist stamp-piclist
  229. distclean: clean
  230.     rm -rf Makefile config.status TAGS config.cache config.h stamp-h \
  231.            pic stamp-picdir
  232. clobber realclean maintainer-clean: distclean
  233.  
  234. # Mark everything as depending on config.status, since the timestamp on
  235. # sysdep.h might actually move backwards if we reconfig and relink it
  236. # to a different hosts/h-xxx.h file.  This will force a recompile anyway.
  237. RECONFIG = config.status
  238.  
  239.  
  240.  
  241. # This target should be invoked before building a new release.
  242. # 'VERSION' file must be present and contain a string of the form "x.y"
  243. #
  244. roll:
  245.     @V=`cat VERSION`        ; \
  246.     MAJ=`sed 's/\..*//' VERSION`    ; \
  247.     MIN=`sed 's/.*\.//' VERSION`    ; \
  248.     V=$$MAJ.`expr $$MIN + 1`    ; \
  249.     rm -f VERSION            ; \
  250.     echo $$V >VERSION        ; \
  251.     echo Version $$V
  252.  
  253. # Dummy target to force execution of dependent targets.
  254. #
  255. force:
  256.  
  257. install: $(ALLLIBS)
  258.     for f in $(ALLLIBS); do \
  259.       if [ "$$f" = "stamp-tshlink" ]; then \
  260.         continue; \
  261.       fi; \
  262.       tf=lib`echo $$f | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
  263.       rm -f $(libdir)/$$tf; \
  264.       if [ "$$f" = "$(SHLINK)" ]; then \
  265.         ts=lib`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
  266.         ln -sf $$ts $(libdir)/$$tf; \
  267.       elif [ "$$f" = "$(SHLIB)" ]; then \
  268.         $(INSTALL_PROGRAM) $$f $(libdir)/$$tf; \
  269.       else \
  270.         $(INSTALL_DATA) $$f $(libdir)/$$tf; \
  271.         $(RANLIB) $(libdir)/$$tf; \
  272.         chmod a-x $(libdir)/$$tf; \
  273.       fi; \
  274.     done
  275.  
  276. Makefile: Makefile.in config.status
  277.     CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
  278.  
  279. config.h: stamp-h ; @true
  280. stamp-h: config.in config.status
  281.     CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
  282.  
  283. config.status : configure $(srcdir)/../bfd/configure.host $(srcdir)/../bfd/config.bfd
  284.     $(SHELL) config.status --recheck
  285.  
  286. dep: $(CFILES)
  287.     mkdep $(CFLAGS) $?
  288.  
  289. stamp-picdir:
  290.     if [ -n "$(PICFLAG)" ] && [ ! -d pic ]; then \
  291.       mkdir pic; \
  292.     else true; fi
  293.     touch stamp-picdir
  294.  
  295. # What appears below is generated by a hacked mkdep using gcc -MM.
  296.  
  297. # DO NOT DELETE THIS LINE -- mkdep uses it.
  298. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
  299.  
  300.  
  301. # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
  302.  
  303.