home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / TOP / USR / SRC / gawk2.0.t.Z / gawk2.0.t / Makefile < prev    next >
Makefile  |  1989-04-06  |  4KB  |  142 lines

  1. # Makefile for GNU Awk.
  2. #
  3. # Copyright (C) 1988 Free Software Foundation
  4. # Rewritten by Arnold Robbins, September 1988 
  5. #
  6. # GAWK is distributed in the hope that it will be useful, but WITHOUT ANY
  7. # WARRANTY.  No author or distributor accepts responsibility to anyone for
  8. # the consequences of using it or for whether it serves any particular
  9. # purpose or works at all, unless he says so in writing. Refer to the GAWK
  10. # General Public License for full details. 
  11. #
  12. # Everyone is granted permission to copy, modify and redistribute GAWK, but
  13. # only under the conditions described in the GAWK General Public License.  A
  14. # copy of this license is supposed to have been given to you along with GAWK
  15. # so you can know your rights and responsibilities.  It should be in a file
  16. # named COPYING.  Among other things, the copyright notice and this notice
  17. # must be preserved on all copies. 
  18. #
  19. # In other words, go ahead and share GAWK, but don't try to stop anyone else
  20. # from sharing it farther.  Help stamp out software hoarding! 
  21. #
  22.  
  23. # CFLAGS: options to the C compiler
  24. #
  25. #    -I.    so includes of <obstack.h> work. mandatory.    (fix?)
  26. #    -O    optimize
  27. #    -g    include dbx/sdb info
  28. #    -gg    include gdb debugging info; only for GCC
  29. #    -pg    include new (gmon) profiling info
  30. #    -p    include old style profiling info (System V)
  31. #
  32. #    -Bstatic - For SunOS 4.0, don't use dynamic linking
  33. #    -DUSG    - for System V boxen.
  34. #    -DSTRICT - remove anything not in Unix awk. Off by default.
  35. #    -DDEBUG - include debugging code and options
  36. #    -DVPRINTF - system has vprintf and associated routines
  37. #    -DBSD - system needs version of vprintf et al. defined in awk5.c
  38. #        (this is the only use at present, so don't define it if you
  39. #         *have* vprintf et al. in your library)
  40. #
  41. SH= sh
  42. INCLUDE= -V=.
  43. OPTIMIZE= -ixqt=/dd #-O
  44. DEBUG= -DDEBUG
  45. DEBUGGER= #-g
  46. PROFILE=#-pg
  47. SUNOS=#-Bstatic
  48. SYSV= -DVPRINTF        # use blarsons vprintf-package
  49. BSD= #-DBSD
  50.  
  51. FLAGS= $(INCLUDE) $(OPTIMIZE) $(SYSV) $(DEBUG) $(BSD) 
  52. CFLAGS = $(FLAGS) $(DEBUGGER) $(SUNOS) $(PROFILE) 
  53.  
  54. SRC =    awk1.c awk2.c awk3.c awk4.c awk5.c \
  55.     awk6.c awk7.c awk8.c awk9.c regex.c obstack.c version.c oskstuff.c
  56.  
  57. AWKOBJS = awk1.r awk2.r awk3.r awk4.r awk5.r awk6.r awk7.r awk8.r awk9.r \
  58.         version.r oskstuff.r
  59. ALLOBJS = $(AWKOBJS) awk.tab.r
  60.  
  61. # Parser to use on grammar -- if you don't have bison use the first one
  62. #PARSER = yacc
  63. PARSER = bison
  64.  
  65. # S5OBJS
  66. #    Set equal to alloca.r if your system is S5 and you don't have
  67. #    alloca. Uncomment the rule below to actually make alloca.r.
  68. S5OBJS= alloca.r
  69.  
  70. # LIBOBJS
  71. #    Stuff that awk uses as library routines, but not in /lib/libc.a.
  72. LIBOBJS= obstack.r regex.r $(S5OBJS)
  73.  
  74. # DOCS
  75. #    Documentation for users
  76. DOCS= gawk.1
  77.  
  78. # We don't distribute shar files, but they're useful for mailing.
  79. SHARS = $(DOCS) COPYING Makefile README.1.01 README awk.h awk.y \
  80.     $(SRC) obstack.h regex.h awk.tab.c\
  81.     alloca.s 
  82.  
  83. gawk: $(ALLOBJS) $(LIBOBJS)
  84.     $(CC) -M=20 -fd=gawk $(CFLAGS) $(ALLOBJS) $(LIBOBJS) \
  85.     -l=/h0/lib/os9lib.l -l=/h0/lib/getopt.r
  86.  
  87. $(AWKOBJS): awk.h
  88.  
  89. awk.tab.r: awk.h awk.tab.c
  90.  
  91. awk.tab.c: awk.y
  92.     $(PARSER) -v awk.y
  93. #    -mv y.tab.c awk.tab.c
  94. #    -if [ $(PARSER) = "yacc" ] ; \
  95. #    then \
  96. #        if cmp -s y.tab.h awk.tab.h ; \
  97. #        then : ; \
  98. #        else \
  99. #            cp y.tab.h awk.tab.h ; \
  100. #            grep '^#.*define' awk.tab.h | \
  101. #    sed 's/^# define \([^ ]*\) [^ ]*$$/    "\1",/' >y.tok.h ; \
  102. #            mv y.tab.c awk.tab.c; \
  103. #        fi; \
  104. #    fi
  105.  
  106. # Alloca: uncomment this if your system (notably System V boxen)
  107. # does not have alloca in /lib/libc.a
  108. #
  109. #alloca.r: alloca.s
  110. #    /lib/cpp < alloca.s | sed '/^#/d' > t.s
  111. #    as t.s -o alloca.r
  112. #    rm t.s
  113.  
  114. lint: $(SRC)
  115.     lint -h $(FLAGS) $(SRC) awk.tab.c
  116.  
  117. clean:
  118.     rm -f gawk *.r core awk.rutput awk.tab.c gmon.rut make.rut
  119.  
  120. awk.shar: $(SHARS)
  121.     shar -f awk -c $(SHARS)
  122.  
  123. awk.tar: $(SHARS)
  124.     tar cvf awk.tar $(SHARS)
  125.  
  126. awk.tar.Z:    awk.tar
  127.     compress <awk.tar >awk.tar.Z
  128.  
  129. doc: $(DOCS)
  130.     nroff -man $(DOCS) >$(DOCS).out
  131.  
  132. # This command probably won't be useful to the rest of the world, but makes
  133. # life much easier for me.
  134. dist:    awk.tar awk.tar.Z
  135.  
  136. diff:
  137.     for i in RCS/*; do rcsdiff -c -b $$i > `basename $$i ,v`.diff; done
  138.  
  139. update:    $(SHARS)
  140.     sendup $?
  141.     touch update
  142.