home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / zip / gnu / gawk213s.lzh / GAWK213S / MAKEFILE.PC < prev    next >
Text File  |  1993-07-29  |  5KB  |  179 lines

  1. # Makefile for GNU Awk (for use with Microsoft C V5.1)
  2. #
  3. # Rewritten by Arnold Robbins, September 1988, March 1989.
  4. #
  5. # Copyright (C) 1986, 1988, 1989 the Free Software Foundation, Inc.
  6. # This file is part of GAWK, the GNU implementation of the
  7. # AWK Progamming Language.
  8. # GAWK is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 1, or (at your option)
  11. # any later version.
  12. # GAWK is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU General Public License for more details.
  16. # You should have received a copy of the GNU General Public License
  17. # along with GAWK; see the file COPYING.  If not, write to
  18. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. DESTDIR=
  21. BINDIR=    /usr/local/bin
  22. MANDIR=    /usr/man/manl
  23. MANEXT=    l
  24.  
  25. # CFLAGS: options to the C compiler
  26. #
  27. #    -Ox    optimize
  28. #    -Zi    include debugging info (include /CO in LINKFLAFS)
  29. #    -AL    compile in large model
  30. #    -AS    compile in small model
  31. #
  32. #    -DNOVPRINTF - system has no vprintf and associated routines
  33. #    -DHASDOPRNT - system needs version of vprintf et al. defined in awk5.c
  34. #              and has a BSD compatable doprnt()
  35. #    -DNOMEMCMP  - system lacks memcmp()
  36. #    -DUSG       - system is generic-ish System V.
  37. #
  38. CC=cl
  39. LINKFLAGS= /E /FAR /PAC /NOE /NOI /st:0x1800
  40. #LINKFLAGS= /CO /NOE /NOI /st:0x1800
  41. OPTIMIZE= -AL -Ox
  42. DEBUG=#-DDEBUG #-DFUNC_TRACE -DMEMDEBUG
  43. DEBUGGER= #-Zi
  44. PROFILE=#-pg
  45. SYSV=
  46. BSD=#-DHASDOPRNT
  47. MEMCMP=#-DNOMEMCMP
  48. VPRINTF=#-DNOVPRINTF
  49.   
  50. FLAGS= $(OPTIMIZE) $(SYSV) $(DEBUG) $(BSD) $(MEMCMP) $(VPRINTF)
  51. CFLAGS= $(FLAGS) $(DEBUGGER) $(PROFILE) 
  52. LDFLAGS= #-Bstatic
  53.  
  54. SRC =    awk1.c awk2.c awk3.c awk4.c awk5.c \
  55.     awk6.c awk7.c awk8.c awk9.c regex.c version.c do_free.c awka.c
  56.  
  57. PCSTUFF= makefile.pc names.lnk random.c
  58.  
  59. AWKOBJS = awk1.obj awk2.obj awk3.obj awk4.obj awk5.obj awk6.obj awk7.obj \
  60.       awk8.obj awk9.obj version.obj awka.obj # do_free.obj # used for MEMDEBUG
  61. ALLOBJS = $(AWKOBJS) awk_tab.obj
  62.  
  63. # Parser to use on grammar -- if you don't have bison use the first one
  64. PARSER = yacc
  65. PARSOUT=ytab.c
  66. #PARSER = bison -y
  67. #PARSOUT=y_tab.c
  68. #PARSFLAGS=-v
  69.  
  70. # S5OBJS
  71. #    Set equal to alloca.o if your system is S5 and you don't have
  72. #    alloca. Uncomment the rule below to actually make alloca.o.
  73. S5OBJS=
  74.  
  75. # GETOPT
  76. #    Set equal to getopt.o if you have a generic BSD system. The
  77. #    generic BSD getopt is reported to not work with gawk. The
  78. #    gnu getopt is supplied in gnu.getopt.c. The Public Domain
  79. #    getopt from AT&T is in att.getopt.c. Choose one of these,
  80. #    and rename it getopt.c.
  81. GETOPT=getopt.obj
  82.  
  83. # LIBOBJS
  84. #    Stuff that awk uses as library routines, but not in /lib/libc.a.
  85. LIBOBJS= regex.obj random.obj $(S5OBJS) $(GETOPT)
  86.  
  87. UPDATES = Makefile awk.h awk.y \
  88.     $(SRC) regex.c regex.h
  89.  
  90. INFOFILES= gawk-info gawk-info-1 gawk-info-2 gawk-info-3 gawk-info-4 \
  91.            gawk-info-5 gawk.aux gawk.cp gawk.cps gawk.dvi gawk.fn gawk.fns \
  92.            gawk.ky gawk.kys gawk.pg gawk.pgs gawk.texinfo gawk.toc \
  93.            gawk.tp gawk.tps gawk.vr gawk.vrs
  94.  
  95. # DOCS
  96. #    Documentation for users
  97. #
  98. DOCS=gawk.1 $(INFOFILES)
  99.  
  100. # We don't distribute shar files, but they're useful for mailing.
  101. SHARS = $(DOCS) COPYING README PROBLEMS $(UPDATES) awk.tab.c \
  102.     alloca.s alloca.c att_getopt.c gnu_getopt.c $(PCSTUFF)
  103.   
  104. gawk: $(ALLOBJS) $(LIBOBJS)
  105.     link @names.lnk,gawk.exe $(LINKFLAGS);
  106.  
  107. # this kludge necessary because MSC 5.1 compiler bombs with -Oa or -Ol (where
  108. # -Ox == "-Oailt -Gs")
  109. regex.obj: regex.c
  110.     $(CC) -c -Oit -AL regex.c
  111.  
  112. $(AWKOBJS): awk.h
  113.  
  114. awk_tab.obj: awk.h awk_tab.c
  115.  
  116. awk_tab.c: awk.y
  117.     @-del awk_tab.c
  118.     $(PARSER) $(PARSFLAGS) awk.y
  119.     -rename $(PARSOUT) awk_tab.c
  120.  
  121. # Alloca: uncomment this if your system (notably System V boxen)
  122. # does not have alloca in /lib/libc.a
  123. #
  124. #alloca.o: alloca.s
  125. #    /lib/cpp < alloca.s | sed '/^#/d' > t.s
  126. #    as t.s -o alloca.o
  127. #    rm t.s
  128.  
  129. install: gawk
  130.     install -s gawk $(DESTDIR)$(BINDIR)
  131.     install -c gawk.1 $(DESTDIR)$(MANDIR)/gawk.$(MANEXT)
  132.  
  133. # If your machine is not supported by the assembly version of alloca.s,
  134. # use the C version instead.  This uses the default rules to make alloca.o.
  135. #
  136. #alloca.o: alloca.c
  137.  
  138. lint: $(SRC)
  139.     lint -hcbax $(FLAGS) $(SRC) awk_tab.c
  140.  
  141. clean:
  142.     rm -f gawk *.obj core awk.output gmon.out make.out #awk_tab.c
  143.  
  144. awk.shar: $(SHARS)
  145.     shar -f awk -c $(SHARS)
  146.  
  147. awk.tar: $(SHARS)
  148.     tar cvf awk.tar $(SHARS)
  149.  
  150. updates.tar:    $(UPDATES)
  151.     tar cvf gawk.tar $(UPDATES)
  152.  
  153. awk.tar.Z:    awk.tar
  154.     compress < awk.tar > awk.tar.Z
  155.  
  156. doc: $(DOCS)
  157.     nroff -man $(DOCS) | col > $(DOCS).out
  158.  
  159. # This command probably won't be useful to the rest of the world, but makes
  160. # life much easier for me.
  161. dist:    awk.tar awk.tar.Z
  162.  
  163. diff:
  164.     for i in RCS/*; do rcsdiff -c -b $$i > `basename $$i ,v`.diff; done
  165.  
  166. update:    $(UPDATES)
  167.     sendup $?
  168.     touch update
  169.  
  170. release: $(SHARS)
  171.     -rm -fr gawk-dist
  172.     mkdir gawk-dist
  173.     cp $(SHARS) gawk-dist
  174.     tar -cvf - gawk-dist | compress > dist.tar.Z
  175.