home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / D / GDB / GDB-4.13 / GDB-4 / gdb-4.13 / gdb / sparclite / Makefile.in < prev    next >
Encoding:
Makefile  |  1994-06-10  |  5.2 KB  |  176 lines

  1. #Copyright 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
  2.  
  3. # This file is part of GDB.
  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. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software
  15. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16.  
  17. prefix = /usr/local
  18.  
  19. program_transform_name =
  20. exec_prefix = $(prefix)
  21. bindir = $(exec_prefix)/bin
  22. libdir = $(exec_prefix)/lib
  23. tooldir = $(libdir)/$(target_alias)
  24.  
  25. datadir = $(prefix)/lib
  26. mandir = $(prefix)/man
  27. man1dir = $(mandir)/man1
  28. man2dir = $(mandir)/man2
  29. man3dir = $(mandir)/man3
  30. man4dir = $(mandir)/man4
  31. man5dir = $(mandir)/man5
  32. man6dir = $(mandir)/man6
  33. man7dir = $(mandir)/man7
  34. man8dir = $(mandir)/man8
  35. man9dir = $(mandir)/man9
  36. infodir = $(prefix)/info
  37. includedir = $(prefix)/include
  38. docdir = $(datadir)/doc
  39.  
  40. SHELL = /bin/sh
  41.  
  42. INSTALL = install -c
  43. INSTALL_PROGRAM = $(INSTALL)
  44. INSTALL_DATA = $(INSTALL)
  45.  
  46. AR = ar
  47. AR_FLAGS = qv
  48. RANLIB = ranlib
  49.  
  50. # Flags that describe where you can find the termcap library.
  51. # This can be overridden in the host Makefile fragment file.
  52. TERMCAP = -ltermcap
  53.  
  54. # System V: If you compile gdb with a compiler which uses the coff
  55. # encapsulation feature (this is a function of the compiler used, NOT
  56. # of the m-?.h file selected by config.gdb), you must make sure that
  57. # the GNU nm is the one that is used by munch.
  58.  
  59. # If you are compiling with GCC, make sure that either 1) You use the
  60. # -traditional flag, or 2) You have the fixed include files where GCC
  61. # can reach them.  Otherwise the ioctl calls in inflow.c
  62. # will be incorrectly compiled.  The "fixincludes" script in the gcc
  63. # distribution will fix your include files up.
  64. #CC=cc
  65. #CC=gcc -traditional
  66.  
  67. # These tools MUST be build with gcc and gnu ld.
  68. CC=gcc
  69. LD=ld
  70.  
  71. # Directory containing source files.  Don't clean up the spacing,
  72. # this exact string is matched for by the "configure" script.
  73. srcdir = .
  74.  
  75. # Set this up with gcc if you have gnu ld and the loader will print out
  76. # line numbers for undefinded refs.
  77. #CC-LD=gcc -static
  78. CC-LD=${CC}
  79.  
  80. # Where is the "include" directory?  Traditionally ../include or ./include
  81. INCLUDE_DIR =  ${srcdir}/../../include
  82. INCLUDE_DEP = $$(INCLUDE_DIR)
  83.  
  84.  
  85. # Where is the source dir for the BFD library?  Traditionally ../bfd or ./bfd
  86. # (When we want the binary library built from it, we use ${BFD_DIR}${subdir}.)
  87. BFD_DIR =  ../../bfd
  88. BFD_DEP = $$(BFD_DIR)
  89. BFD_SRC = $(srcdir)/$(BFD_DIR)
  90. BFD_LIB = ./../../bfd${subdir}/libbfd.a
  91. BFD_CFLAGS = -I$(BFD_DIR) -I(BFD_SRC)
  92.  
  93. # All the includes used for CFLAGS and for lint.
  94. # -I. for config files.
  95. # -I${srcdir} possibly for regex.h also.
  96. # -I${srcdir}/config for more generic config files.
  97. INCLUDE_CFLAGS = -I. -I.. -I${srcdir} -I${srcdir}/../config -I$(INCLUDE_DIR)
  98.  
  99. # CFLAGS is specifically reserved for setting from the command line
  100. # when running make.  I.E.  "make USER_CFLAGS=-Wmissing-prototypes".
  101. CFLAGS = -g
  102.  
  103. # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
  104. INTERNAL_CFLAGS = $(CFLAGS) -I$(BFD_DIR) $(INCLUDE_CFLAGS) $(USER_CFLAGS)
  105. # None of the things in CFLAGS will do any harm, and on some systems
  106. #  (e.g. SunOS4) it is important to use the MH_CFLAGS.
  107. LDFLAGS = $(CFLAGS)
  108.  
  109. # Where is the "-liberty" library, containing getopt and obstack?
  110. LIBIBERTY_DIR = ${srcdir}/../../libiberty
  111. LIBIBERTY = ./../../libiberty${subdir}/libiberty.a
  112.  
  113. # Libraries and corresponding dependencies for compiling gdb.
  114. CLIBS = ${BFD_LIB} ${LIBIBERTY}
  115. CDEPS = ${BFD_LIB} ${LIBIBERTY}
  116.  
  117. # Host and target-dependent makefile fragments come in here.
  118. ####
  119. # End of host and target-dependent makefile fragments
  120.  
  121. # Prevent Sun make from putting in the machine type.  Setting
  122. # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
  123. .c.o:
  124.     ${CC} -c ${INTERNAL_CFLAGS} $<
  125.  
  126. OFILES = crt0.o hello.o salib.o sparcl-stub.o
  127.  
  128. # this is so that we don't build by default.  In order to build hello (the
  129. # sparclite target program), you will need to fix this file to use the
  130. # sparclite gcc and gas, and then do `make all'.
  131.  
  132. .PHONY: all info install install-info
  133. all: aload
  134. info:
  135. # This does not use INSTALL_XFORM or anything of the sort because there
  136. # only needs to be one aload.  Even if aload ends up being useful for more
  137. # than one target, perhaps one aload binary can be useful with all of them.
  138. install:
  139.     $(INSTALL_PROGRAM) aload $(bindir)/aload
  140.  
  141. install-info:
  142.  
  143. progs:    aload hello
  144.  
  145. hello:    $(OFILES)
  146.     $(LD) -N -Ttext 0x40000000 -o hello $(OFILES) -lc
  147.  
  148. aload:    aload.o
  149.     $(CC) $(CFLAGS) -o aload aload.o $(CLIBS)
  150.  
  151. sparc-stub.o: ${srcdir}/../sparc-stub.c
  152.     $(CC) -c ${INTERNAL_CFLAGS} ${srcdir}/../sparc-stub.c
  153.  
  154. sparcl-stub.o: ${srcdir}/../sparcl-stub.c
  155.     $(CC) -c ${INTERNAL_CFLAGS} ${srcdir}/../sparcl-stub.c
  156.  
  157. crt0.o:    crt0.s
  158.     $(CC) $(CFLAGS) -c ${srcdir}/crt0.s
  159.  
  160. aload.o: aload.c
  161.  
  162. hello.o: hello.c
  163.  
  164. salib.o: salib.c sparclite.h
  165.  
  166. mostlyclean:
  167.  
  168. clean:        mostlyclean
  169.     rm -f *.o aload hello
  170.  
  171. distclean:    clean
  172.  
  173. realclean:    distclean
  174.