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.orig < prev    next >
Makefile  |  1988-12-31  |  4KB  |  140 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. INCLUDE= -I.
  42. OPTIMIZE= #-O
  43. DEBUG= -DDEBUG
  44. DEBUGGER= -g
  45. PROFILE=#-pg
  46. SUNOS=#-Bstatic
  47. SYSV=#-DVPRINTF
  48. BSD= -DBSD
  49.  
  50. FLAGS= $(INCLUDE) $(OPTIMIZE) $(SYSV) $(DEBUG) $(BSD)
  51. CFLAGS = $(FLAGS) $(DEBUGGER) $(SUNOS) $(PROFILE) 
  52.  
  53. SRC =    awk1.c awk2.c awk3.c awk4.c awk5.c \
  54.     awk6.c awk7.c awk8.c awk9.c regex.c obstack.c version.c
  55.  
  56. AWKOBJS = awk1.o awk2.o awk3.o awk4.o awk5.o awk6.o awk7.o awk8.o awk9.o \
  57.         version.o
  58. ALLOBJS = $(AWKOBJS) awk.tab.o
  59.  
  60. # Parser to use on grammar -- if you don't have bison use the first one
  61. #PARSER = yacc
  62. PARSER = bison
  63.  
  64. # S5OBJS
  65. #    Set equal to alloca.o if your system is S5 and you don't have
  66. #    alloca. Uncomment the rule below to actually make alloca.o.
  67. S5OBJS=
  68.  
  69. # LIBOBJS
  70. #    Stuff that awk uses as library routines, but not in /lib/libc.a.
  71. LIBOBJS= obstack.o regex.o $(S5OBJS)
  72.  
  73. # DOCS
  74. #    Documentation for users
  75. DOCS= gawk.1
  76.  
  77. # We don't distribute shar files, but they're useful for mailing.
  78. SHARS = $(DOCS) COPYING Makefile README.1.01 README awk.h awk.y \
  79.     $(SRC) obstack.h regex.h awk.tab.c\
  80.     alloca.s 
  81.  
  82. gawk: $(ALLOBJS) $(LIBOBJS)
  83.     $(CC) -o gawk $(CFLAGS) $(ALLOBJS) $(LIBOBJS) -lm
  84.  
  85. $(AWKOBJS): awk.h
  86.  
  87. awk.tab.o: awk.h awk.tab.c
  88.  
  89. awk.tab.c: awk.y
  90.     $(PARSER) -v awk.y
  91.     -mv y.tab.c awk.tab.c
  92. #    -if [ $(PARSER) = "yacc" ] ; \
  93. #    then \
  94. #        if cmp -s y.tab.h awk.tab.h ; \
  95. #        then : ; \
  96. #        else \
  97. #            cp y.tab.h awk.tab.h ; \
  98. #            grep '^#.*define' awk.tab.h | \
  99. #    sed 's/^# define \([^ ]*\) [^ ]*$$/    "\1",/' >y.tok.h ; \
  100. #            mv y.tab.c awk.tab.c; \
  101. #        fi; \
  102. #    fi
  103.  
  104. # Alloca: uncomment this if your system (notably System V boxen)
  105. # does not have alloca in /lib/libc.a
  106. #
  107. #alloca.o: alloca.s
  108. #    /lib/cpp < alloca.s | sed '/^#/d' > t.s
  109. #    as t.s -o alloca.o
  110. #    rm t.s
  111.  
  112. lint: $(SRC)
  113.     lint -h $(FLAGS) $(SRC) awk.tab.c
  114.  
  115. clean:
  116.     rm -f gawk *.o core awk.output awk.tab.c gmon.out make.out
  117.  
  118. awk.shar: $(SHARS)
  119.     shar -f awk -c $(SHARS)
  120.  
  121. awk.tar: $(SHARS)
  122.     tar cvf awk.tar $(SHARS)
  123.  
  124. awk.tar.Z:    awk.tar
  125.     compress < awk.tar > awk.tar.Z
  126.  
  127. doc: $(DOCS)
  128.     nroff -man $(DOCS) | col > $(DOCS).out
  129.  
  130. # This command probably won't be useful to the rest of the world, but makes
  131. # life much easier for me.
  132. dist:    awk.tar awk.tar.Z
  133.  
  134. diff:
  135.     for i in RCS/*; do rcsdiff -c -b $$i > `basename $$i ,v`.diff; done
  136.  
  137. update:    $(SHARS)
  138.     sendup $?
  139.     touch update
  140.