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

  1. # Makefile for GNU Awk - ST version
  2. #
  3. # This is a subset of the full Makefile cut down for Atari ST
  4. # gcc compiler is assumed
  5. # It is known to work with gulam shell.
  6. # It may need some customization depending on your setup!
  7. # Replace with it 'Makefile' from the source directory.
  8. #
  9. # You need sed.ttp for an automatic creation of config.h file!
  10. # Check gulam script mkconf.g in atari directory.
  11. # In a pinch you may create one by checking config/atari file and
  12. # editing config.h-dist by hand.
  13. #
  14. # Copyright (C) 1986, 1988, 1989 the Free Software Foundation, Inc.
  15. #
  16. # This file is part of GAWK, the GNU implementation of the
  17. # AWK Progamming Language.
  18. #
  19. # GAWK is free software; you can redistribute it and/or modify
  20. # it under the terms of the GNU General Public License as published by
  21. # the Free Software Foundation; either version 1, or (at your option)
  22. # any later version.
  23. #
  24. # GAWK is distributed in the hope that it will be useful,
  25. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  26. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  27. # GNU General Public License for more details.
  28. #
  29. # You should have received a copy of the GNU General Public License
  30. # along with GAWK; see the file COPYING.  If not, write to
  31. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  32.  
  33. # User tunable macros
  34.  
  35. DESTDIR=
  36. BINDIR=    c:\bin
  37. MANDIR=    c:\man\manl
  38. MANEXT=    l
  39. RM=rm -f
  40.  
  41. # CFLAGS: options to the C compiler
  42. #
  43. #    -O    optimize
  44. #    -mshort use integers which are 16-bits wide (a "correct" size on ST)
  45. #
  46. # Set LIBS to any libraries that are machine specific
  47.  
  48.  
  49. # Comment out the next line if you don't have gcc.
  50. # Also choose just one of -g and -O.
  51. CC=         gcc
  52. # if cross-compiler
  53. #CC=         cgcc
  54. LIBS = -lpml16
  55.  
  56. OPTIMIZE=    -O -fstrength-reduce -fcombine-regs -fomit-frame-pointer
  57. #OPTIMIZE=    -O
  58. AFLAGS  =    -G -x -mshort # -Wall
  59. DEBUG=        #-DMALLOCDEBUG #-DMEMDEBUG #-DDEBUG #-DFUNC_TRACE #-DMPROF
  60. WARN=        #-W -Wunused -Wimplicit -Wreturn-type -Wcomment    # for gcc only
  61.  
  62. # Parser to use on grammar -- if you don't have bison use the first one
  63. #PARSER = yacc
  64. PARSER = byacc
  65. #PARSER = bison -y
  66.  
  67. #
  68. # With the exception of names of parser output files
  69. # need to customize this file below this point.
  70. #
  71.  
  72. FLAGS=  $(DEBUG) $(AFLAGS)
  73. CFLAGS= $(FLAGS) $(LINKSTATIC) $(PROFILE) $(OPTIMIZE) $(WARN)
  74.  
  75. # object files
  76. AWKOBJS = main.o eval.o builtin.o msg.o iop.o io.o field.o \
  77.  array.o node.o missing.o re.o version.o
  78.  
  79. # basename of parser output
  80. #POUTPUT = awk.tab
  81. POUTPUT = awk_tab
  82.  
  83. ALLOBJS = $(AWKOBJS) $(POUTPUT).o
  84.  
  85. # GNUOBJS
  86. #    GNU stuff that gawk uses as library routines.
  87. GNUOBJS= regex.o dfa.o $(ALLOCA)
  88.  
  89. # source and documentation files
  90. SRC =    main.c eval.c builtin.c msg.c \
  91.     iop.c io.c field.c array.c node.c missing.c re.c version.c
  92.  
  93. ALLSRC= $(SRC) $(POUTPUT).c
  94. #ALLSRC= $(SRC) awk_tab.c
  95.  
  96. AWKSRC= awk.h awk.y $(ALLSRC) patchlevel.h protos.h config.h-dist
  97.  
  98. GNUSRC = alloca.c alloca.s dfa.c dfa.h regex.c regex.h
  99.  
  100. COPIES = missing/getopt.c missing/system.c missing/tzset.c \
  101.     missing/memcmp.c missing/memcpy.c missing/memset.c \
  102.     missing/random.c missing/strcase.c missing/strchr.c \
  103.     missing/strerror.c missing/strtod.c missing/vprintf.c \
  104.     missing/strftime.c missing/strftime.3 missing/strtol.c
  105.  
  106. SUPPORT = support/texindex.c support/texinfo.tex
  107.  
  108. DOCS= gawk.1 gawk.texinfo
  109.  
  110. #INFOFILES= gawk-info gawk-info-1 gawk-info-2 gawk-info-3 gawk-info-4 \
  111. #       gawk-info-5 gawk-info-6 gawk.aux gawk.cp gawk.cps gawk.fn \
  112. #       gawk.fns gawk.ky gawk.kys gawk.pg gawk.pgs gawk.toc \
  113. #       gawk.tp gawk.tps gawk.vr gawk.vrs
  114.  
  115. ALLDOC= gawk.dvi $(INFOFILES)
  116.  
  117. # rules to build gawk
  118. gawk: $(ALLOBJS) $(GNUOBJS) $(REOBJS)
  119.     $(CC) -o gawk.ttp $(CFLAGS) $(ALLOBJS) $(GNUOBJS) $(REOBJS) $(LIBS)
  120.     toglclr gawk.ttp
  121.  
  122. $(AWKOBJS): awk.h config.h
  123.  
  124. dfa.o:    awk.h config.h dfa.h
  125. regex.o:    awk.h config.h regex.h
  126. main.o: patchlevel.h
  127.  
  128. $(POUTPUT).o: awk.h $(POUTPUT).c
  129.  
  130. $(POUTPUT).c: awk.y awk.h
  131.     $(PARSER) awk.y
  132.     sed '/^extern char .malloc(), .realloc();$$/d' ytab.c > $(POTPUT).c
  133.     rm ytab.c
  134.  
  135. config.h: config.h-dist
  136.     pushd atari
  137.     mkconf.g
  138.     popd
  139.  
  140. # One of these rules should have already been selected by running mkconf.
  141.  
  142. ##MAKE_ALLOCA_S## alloca.o: alloca.s
  143. ##MAKE_ALLOCA_S##     /lib/cpp < alloca.s | sed '/^#/d' > t.s
  144. ##MAKE_ALLOCA_S##     as t.s -o alloca.o
  145. ##MAKE_ALLOCA_S##     rm t.s
  146. ##MAKE_ALLOCA_C## alloca.o: alloca.c
  147. install: gawk
  148.     cp gawk.ttp $(DESTDIR)$(BINDIR)
  149.     cp gawk.1 $(DESTDIR)$(MANDIR)/gawk.$(MANEXT)
  150.  
  151. clean:
  152.     $(RM) gawk.ttp *.o core awk.output $(POUTPUT).c gmon.out make.out \
  153.     y.output
  154.  
  155. clobber: clean
  156.     $(RM) $(ALLDOC) gawk.log
  157.  
  158. gawk.dvi: gawk.texinfo
  159.     tex gawk.texinfo ; texindex gawk.??
  160.     tex gawk.texinfo ; texindex gawk.??
  161.     tex gawk.texinfo
  162.  
  163. #$(INFOFILES): gawk.texinfo
  164. #    makeinfo gawk.texinfo
  165.  
  166. # Many tests in test directory depend on having Bourne shell around.
  167. # Before using this target edit test Makefile and test scripts adapting
  168. # them to your local conditions.
  169. test:    gawk
  170.     pushd test
  171.     make
  172.     popd
  173.