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 / sim / w65 / Makefile.in < prev    next >
Makefile  |  1995-10-20  |  6KB  |  240 lines

  1. # Makefile for GNU binary-file utilities
  2. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  3.  
  4. # This file is part of GNU binutils.
  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. # 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. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17.  
  18. VPATH = @srcdir@
  19. srcdir = @srcdir@
  20.  
  21. prefix = @prefix@
  22. exec_prefix = @exec_prefix@
  23.  
  24. host_alias = @host_alias@
  25. target_alias = @target_alias@
  26. program_transform_name = @program_transform_name@
  27. bindir = $(exec_prefix)/bin
  28. libdir = $(exec_prefix)/lib
  29. tooldir = $(exec_prefix)/$(target_alias)
  30.  
  31. datadir = $(prefix)/lib
  32. mandir = $(prefix)/man
  33. man1dir = $(mandir)/man1
  34. man2dir = $(mandir)/man2
  35. man3dir = $(mandir)/man3
  36. man4dir = $(mandir)/man4
  37. man5dir = $(mandir)/man5
  38. man6dir = $(mandir)/man6
  39. man7dir = $(mandir)/man7
  40. man8dir = $(mandir)/man8
  41. man9dir = $(mandir)/man9
  42. infodir = $(prefix)/info
  43. includedir = $(prefix)/include
  44. docdir = $(datadir)/doc
  45.  
  46. SHELL = /bin/sh
  47.  
  48. INSTALL = `cd $(srcdir)/../..;pwd`/install.sh -c
  49. INSTALL_PROGRAM = $(INSTALL)
  50. INSTALL_DATA = $(INSTALL) 
  51. INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
  52. INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
  53.  
  54. AR = @AR@
  55. AR_FLAGS = qv
  56. CC = @CC@
  57. CFLAGS = @CFLAGS@
  58. MAKEINFO = makeinfo
  59. TEXI2DVI = texi2dvi
  60. RANLIB = @RANLIB@
  61. TEXI2ROFF=texi2roff
  62. MAKEOVERRIDES=
  63. CC_FOR_BUILD = @CC_FOR_BUILD@
  64.  
  65. HDEFINES = @HDEFINES@
  66. TDEFINES =
  67.  
  68. # Comment these out if using lex.
  69. # Distribution version
  70.  
  71. # Distribution name
  72.  
  73. # Where to find texinfo.tex to format docn with TeX
  74. TEXIDIR = $(srcdir)/../texinfo
  75.  
  76. # These should all be the same program too.
  77. RUN_PROG=run
  78. SIM_LIB=libsim.a
  79. ADDL_LIBS=
  80.  
  81. PROGS = $(RUN_PROG)
  82. LIBS= $(SIM_LIB)
  83.  
  84. DISTSTUFF = $(PROGS) $(LIBS)
  85.  
  86. BASEDIR = $(srcdir)/../..
  87. BFDDIR = $(BASEDIR)/bfd
  88. INCDIR    = $(BASEDIR)/include
  89. GDBDIR = $(BASEDIR)/gdb
  90. INCLUDES = -I. -I$(srcdir) -I../../bfd -I$(BFDDIR) -I$(INCDIR) -I$(GDBDIR)
  91.  
  92. #### host and target dependant Makefile fragments come in here.
  93. ###
  94.  
  95. ALL_CFLAGS = $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS)
  96.  
  97. .c.o:
  98.     $(CC) -c $(ALL_CFLAGS) $<
  99.  
  100. LIBIBERTY = ../../libiberty/libiberty.a
  101.  
  102. BFD = ../../bfd/libbfd.a
  103.  
  104. RUNTEST = runtest
  105. RUNTESTFLAGS = 
  106. FLAGS_TO_PASS = \
  107.     "CC=$(CC)" \
  108.     "CFLAGS=$(CFLAGS)" \
  109.     "RUNTEST=$(RUNTEST)" \
  110.     "RUNTESTFLAGS=$(RUNTESTFLAGS)"
  111.  
  112. #
  113. ## The rules
  114.  
  115. all: $(LIBS) $(PROGS)
  116.  
  117.  
  118. $(RUN_PROG): $(LIBS) run.o $(BFD)
  119.     $(CC) $(CFLAGS) $(LDFLAGS) -o $(RUN_PROG) run.o $(SIM_LIB) $(BFD) $(LIBIBERTY)
  120.  
  121. $(SIM_LIB): case.o interp.o
  122.     rm -f $(SIM_LIB)
  123.     $(AR) $(AR_FLAGS) $(SIM_LIB) case.o interp.o
  124.     $(RANLIB) $(SIM_LIB)
  125.  
  126. case.c: gencode
  127.     ./gencode -c >case.c                     ; \
  128.     if [ -x /usr/latest/bin/indent ] ; then    \
  129.         /usr/latest/bin/indent case.c    ; \
  130.     fi
  131.  
  132. optable:gencode
  133.     ./gencode >optable
  134.     ./gencode -a >$(srcdir)/../../opcodes/w65-opc.h
  135.  
  136. gencode:gencode.c
  137.     $(CC_FOR_BUILD) -o gencode $<
  138.  
  139. run.o:run.c config.h
  140. interp.o:interp.c config.h
  141.  
  142.  
  143. ######################################################################
  144.  
  145. mostlyclean:
  146.     -rm -f *.o *~ \#* core binutils.?? binutils.??? case.c config.log
  147.  
  148. clean: mostlyclean
  149.     -rm -f $(PROGS) *.o *.a
  150.  
  151. distclean:
  152.     -rm -f Makefile config.status sysdep.h *.o *~ \#* core y.* \
  153.         binutils.?? binutils.??s binutils.aux binutils.log binutils.toc gencode run
  154.     -rm -f $(PROGS) config.h stamp-h
  155.  
  156. maintainer-clean realclean: clean distclean
  157.     -rm -f $(DISTSTUFF) TAGS
  158.  
  159. etags tags: TAGS
  160.  
  161. TAGS: force
  162.     etags $(INCDIR)/*.h $(srcdir)/*.[hc] 
  163.  
  164. install: all 
  165.     for i in $(PROGS) ; do \
  166.       $(INSTALL_XFORM) $$i $(bindir)/`echo $$i | sed -e 's/.new//'` ; \
  167.     done
  168.  
  169. install-info:
  170.  
  171. clean-info:
  172.     -rm -rf *.info*
  173.  
  174. # Making a dist:
  175. # cvs rtag binutils-x-yy ld+utils
  176. # cvs co -r binutils-x-yy ld+utils
  177. # cd {HERE}; make dist [-f Makefile.in]
  178.  
  179. dist: $(DIST_NAME).tar.z
  180.  
  181. diststuff: $(DISTSTUFF)
  182.  
  183. $(DIST_NAME).tar.z:
  184.     cd ../..; rm -f $(DIST_NAME); ln -s devo $(DIST_NAME)
  185.     make diststuff -f Makefile.in
  186.     cd ../ld; make diststuff -f Makefile.in
  187.     cd ../gprof; make diststuff -f Makefile.in
  188.     cd ../texinfo; mv texinfo.tex ..; rm -rf *; mv ../texinfo.tex .
  189.     # Take out texinfo from configurable dirs
  190.     mv ../configure.in tmp; \
  191.       sed -e '/^host_tools=/s/texinfo //' <tmp >../configure.in; rm tmp
  192.     cd ..; chmod og=u `find . -print`
  193.     cd ../..; tar chf - $(DIST_NAME) | gzip >$(DIST_NAME).tar.z
  194.     rm -rf ../../$(DIST_NAME)
  195.  
  196.  
  197. # Dummy target to force execution of dependent targets.
  198. #
  199. force:
  200.  
  201. # Target to uncomment host-specific lines in this makefile.  Such lines must
  202. # have the following string beginning in column 1: #__<hostname>__#
  203. # Original Makefile is backed up as 'Makefile.old'.
  204. #
  205. # Invoke with:  make make HOST=xxx
  206. #
  207. make:
  208.     -@if test $(HOST)x = x ; then \
  209.         echo 'Specify "make make HOST=???"'; \
  210.         exit 1; \
  211.     fi ; \
  212.     grep -s "^#The next line was generated by 'make make'" Makefile; \
  213.     if test $$? = 0 ; then    \
  214.         echo "Makefile has already been processed with 'make make'";\
  215.         exit 1; \
  216.     fi ; \
  217.     mv -f Makefile Makefile.old; \
  218.     echo "#The next line was generated by 'make make'"     >Makefile ; \
  219.     echo "HOST=$(HOST)"                    >>Makefile ; \
  220.     echo                            >>Makefile ; \
  221.     sed "s/^#__$(HOST)__#//" < Makefile.old            >>Makefile
  222.  
  223. Makefile: Makefile.in config.status
  224.     CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
  225.  
  226. config.h: stamp-h ; @true
  227. stamp-h: config.in config.status
  228.     CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
  229.  
  230. config.status: configure
  231.     $(SHELL) ./config.status --recheck
  232.  
  233. ### Local Variables: ***
  234. ### mode:fundamental ***
  235. ### page-delimiter: "^# " ***
  236. ### End: ***
  237. ### end of file
  238.