Makefile 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. # Makefile for GAS.
  2. # Copyright (C) 1989, Free Software Foundation
  3. #
  4. # This file is part of GAS, the GNU Assembler.
  5. #
  6. # GAS 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 1, or (at your option)
  9. # any later version.
  10. #
  11. # GAS 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 GAS; see the file COPYING. If not, write to
  18. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19. # This makefile may be used to make the VAX, 68020, 80386,
  20. # SPARC, or ns32k assembler(s).
  21. CC=gcc
  22. # If you are on a BSD system, un-comment the next two lines, and comment out
  23. # the lines for SystemV and HPUX below
  24. CFLAGS = -g -I.
  25. LDFLAGS = $(CFLAGS)
  26. # To compile gas on a System Five machine, comment out the two lines above
  27. # and un-comment out the next three lines
  28. # Comment out the -lPW on the LOADLIBES line if you are using GCC.
  29. # CFLAGS = -g -I. -DUSG
  30. # LDFLAGS = $(CFLAGS)
  31. # LOADLIBES = -lmalloc -lPW
  32. # To compile gas for HPUX, link m-hpux.h to m68k.h , and un-comment the
  33. # next two lines. (If you are using GCC, comment out the alloca.o part)
  34. # (Get alloca from the emacs distribution, or use GCC.)
  35. # CFLAGS = -g -I. -DUSG
  36. # LOADLIBES = alloca.o
  37. # If you just want to compile the vax assembler, type 'make avax'
  38. # If you just want to compile the i386 assembler, type 'make a386'
  39. # If you just want to compile the ns32k assembler, type 'make a32k'
  40. # If you just want to compile the sparc assembler, type 'make asparc'
  41. # If you just want to compile the mc68020 assembler, make sure m68k.h
  42. # is correctly set up, and type type 'make a68' (Except on HPUX machines,
  43. # where you will have to make the changes marked below before typing
  44. # 'make a68'
  45. # m68k.h should be a symbolic or hard-link to one of
  46. # m-sun3.h , m-hpux.h or m-generic.h
  47. # depending on which machine you want to compile the 68020 assembler for.
  48. #
  49. # If you machine does not have vfprintf, but does have _doprnt(),
  50. # remove the # from the -DNO_VARARGS line below.
  51. #
  52. # To include the mc68851 mmu coprocessor instructions in the 68020 assembler,
  53. # remove the # from the -Dm68851 line below.
  54. #
  55. # If you want the 80386 assembler to correctly handle fsub/fsubr and fdiv/fdivr
  56. # opcodes (unlike most 80386 assemblers), remove the # from
  57. # the -DNON_BROKEN_WORDS line below.
  58. O1 = -DNO_VARARGS
  59. O2 = # -DNON_BROKEN_WORDS
  60. O3 = # -Dm68851
  61. OPTIONS = $(O1) $(O2) $(O3)
  62. #
  63. # To make the 68020 assembler compile as the default, un-comment the next
  64. # line, and comment out all the other lines that start with DEFAULT_GAS
  65. DEFAULT_GAS=a68
  66. #
  67. # To make the VAX assembler compile as the default, un-comment the next
  68. # line and commment out all the other lines that start with DEFAULT_GAS
  69. #DEFAULT_GAS=avax
  70. #
  71. # To make the 80386 assembler compile as the default, un-comment the next
  72. # line and commment out all the other lines that start with DEFAULT_GAS
  73. #DEFAULT_GAS=a386
  74. #
  75. # To make the ns32k assembler compile as the default, un-comment the next
  76. # line and commment out all the other lines that start with DEFAULT_GAS
  77. #DEFAULT_GAS=a32k
  78. #
  79. # To make the sparc assembler compile as the default, un-comment the next
  80. # line and commment out all the other lines that start with DEFAULT_GAS
  81. #DEFAULT_GAS=asparc
  82. # Global Sources -------------------------------------------------------------
  83. a =\
  84. as.o xrealloc.o xmalloc.o hash.o hex-value.o \
  85. atof-generic.o append.o messages.o expr.o app.o \
  86. frags.o input-file.o input-scrub.o output-file.o \
  87. subsegs.o symbols.o version.o \
  88. flonum-const.o flonum-copy.o flonum-mult.o strstr.o bignum-copy.o \
  89. gdb.o gdb-file.o gdb-symbols.o gdb-blocks.o obstack.o \
  90. gdb-lines.o
  91. a: $(DEFAULT_GAS)
  92. @rm -f a
  93. @ln $(DEFAULT_GAS) a
  94. # SPARC GAS ------------------------------------------------------------------
  95. v = sparc.o atof-m68k.o write-sparc.o read-sparc.o
  96. V = sparc.c sparc.h sparc-opcode.h
  97. atof-m68k.o: flonum.h
  98. sparc.o: sparc.c sparc.h sparc-opcode.h as.h frags.h struc-symbol.h
  99. sparc.o: flonum.h expr.h hash.h md.h write.h read.h symbols.h
  100. $(CC) -c $(CFLAGS) -DSPARC sparc.c
  101. write-sparc.o: write.c
  102. $(CC) -c -DSPARC $(CFLAGS) write.c
  103. mv write.o write-sparc.o
  104. read-sparc.o: read.c
  105. $(CC) -c -DSPARC $(CFLAGS) read.c
  106. mv read.o read-sparc.o
  107. asparc: $a $v
  108. $(CC) -o asparc $(LDFLAGS) $a $v $(LOADLIBES)
  109. # NS32K GAS ------------------------------------------------------------------
  110. w = ns32k.o atof-ns32k.o write-ns32k.o read-ns32k.o
  111. W = ns32k.c atof-ns32k.c ns32k-opcode.h
  112. atof-ns32k.o: flonum.h
  113. ns32k.o: as.h frags.h struc-symbol.h flonum.h expr.h md.h hash.h
  114. ns32k.o: write.h symbols.h ns32k-opcode.h
  115. write-ns32k.o: write.c
  116. $(CC) -c -DNS32K $(CFLAGS) write.c
  117. mv write.o write-ns32k.o
  118. read-ns32k.o:
  119. $(CC) -c -DNS32K $(CFLAGS) read.c
  120. mv read.o read-ns32k.o
  121. a32k: $a $w
  122. $(CC) -o a32k $(LDFLAGS) $a $w $(LOADLIBES)
  123. # 80386 GAS ------------------------------------------------------------------
  124. x = i386.o atof-i386.o write.o read.o
  125. X = i386.c atof-i386.c i386.h i386-opcode.h
  126. i386.o: i386.c as.h read.h flonum.h frags.h struc-symbol.h expr.h
  127. i386.o: symbols.h hash.h md.h i386.h i386-opcode.h
  128. $(CC) $(CFLAGS) $(OPTIONS) -c i386.c
  129. atof-i386.o: flonum.h
  130. a386: $a $x
  131. $(CC) -o a386 $(LDFLAGS) $a $x $(LOADLIBES)
  132. # 68020 GAS ------------------------------------------------------------------
  133. y = m68k.o atof-m68k.o write.o read.o
  134. Y = m68k.c atof-m68k.c m68k-opcode.h m-hpux.h m-sun3.h m-generic.h
  135. atof-m68k.o: flonum.h
  136. m68k.o: m68k.c a.out.h as.h expr.h flonum.h frags.h hash.h
  137. m68k.o: m68k-opcode.h m68k.h md.h obstack.h struc-symbol.h
  138. $(CC) $(CFLAGS) $(OPTIONS) -c m68k.c
  139. a68: $a $y
  140. $(CC) -o a68 $(LDFLAGS) $a $y $(LOADLIBES)
  141. # VAX GAS --------------------------------------------------------------------
  142. z = vax.o atof-vax.o write.o read.o
  143. Z = vax.c atof-vax.c vax-opcode.h vax-inst.h make-gas.com objrecdef.h vms.c
  144. vax.o: vax.c a.out.h as.h expr.h flonum.h frags.h md.h obstack.h
  145. vax.o: read.h struc-symbol.h symbols.h vax-inst.h vax-opcode.h
  146. atof-vax.o: as.h flonum.h read.h
  147. avax: $a $z
  148. $(CC) -o avax $(LDFLAGS) $a $z $(LOADLIBES)
  149. # global files ---------------------------------------------------------------
  150. messages.o: messages.c
  151. $(CC) $(CFLAGS) $(OPTIONS) -c messages.c
  152. hash.o: hash.c
  153. $(CC) $(CFLAGS) -Derror=as_fatal -c hash.c
  154. xmalloc.o: xmalloc.c
  155. $(CC) $(CFLAGS) -Derror=as_fatal -c xmalloc.c
  156. xrealloc.o: xrealloc.c
  157. $(CC) $(CFLAGS) -Derror=as_fatal -c xrealloc.c
  158. A =\
  159. as.c xrealloc.c xmalloc.c hash.c hex-value.c \
  160. atof-generic.c append.c messages.c expr.c bignum-copy.c \
  161. frags.c input-file.c input-scrub.c output-file.c read.c \
  162. subsegs.c symbols.c write.c strstr.c \
  163. flonum-const.c flonum-copy.c flonum-mult.c app.c version.c \
  164. gdb.c gdb-file.c gdb-symbols.c gdb-blocks.c obstack.c \
  165. gdb-lines.c
  166. H = \
  167. a.out.h as.h bignum.h expr.h flonum.h \
  168. frags.h hash.h input-file.h md.h \
  169. obstack.h read.h struc-symbol.h subsegs.h \
  170. symbols.h write.h
  171. gas-dist.tar: COPYING README ChangeLog $A $H $Z $Y $X $W $V Makefile
  172. -rm -r gas-dist
  173. mkdir gas-dist
  174. ln COPYING README ChangeLog $A $H $Z $Y $X $W $V Makefile gas-dist
  175. tar cvhf gas-dist.tar gas-dist
  176. gas-dist.tar.Z: gas-dist.tar
  177. compress < gas-dist.tar > gas-dist.tar.Z
  178. clean:
  179. rm -f a avax a68 a386 a32k asparc $a $v $w $x $y $z a core gmon.out bugs a.out
  180. dist: gas-dist.tar gas-dist.tar.Z
  181. install: a
  182. cp a /usr/local/bin/gas
  183. # General .o-->.h dependencies
  184. app.o: as.h
  185. as.o: a.out.h as.h read.h struc-symbol.h write.h
  186. atof-generic.o: flonum.h
  187. bignum-copy.o: bignum.h
  188. expr.o: a.out.h as.h expr.h flonum.h obstack.h read.h struc-symbol.h
  189. expr.o: symbols.h
  190. flonum-const.o: flonum.h
  191. flonum-copy.o: flonum.h
  192. flonum-mult.o: flonum.h
  193. flonum-normal.o:flonum.h
  194. flonum-print.o: flonum.h
  195. frags.o: a.out.h as.h frags.h obstack.h struc-symbol.h subsegs.h
  196. gdb.o: as.h
  197. gdb-blocks.o: as.h
  198. gdb-lines.o: as.h frags.h obstack.h
  199. gdb-symbols.o: a.out.h as.h struc-symbol.h
  200. hash.o: hash.h
  201. input-file.o: input-file.h
  202. input-scrub.o: as.h input-file.h read.h
  203. messages.o: as.h
  204. obstack.o: obstack.h
  205. read.o: a.out.h as.h expr.h flonum.h frags.h hash.h md.h obstack.h
  206. read.o: read.h struc-symbol.h symbols.h
  207. subsegs.o: a.out.h as.h frags.h obstack.h struc-symbol.h subsegs.h write.h
  208. symbols.o: a.out.h as.h frags.h hash.h obstack.h struc-symbol.h symbols.h
  209. write.o: a.out.h as.h md.h obstack.h struc-symbol.h subsegs.h
  210. write.o: symbols.h write.h
  211. flonum.h: bignum.h