diff options
Diffstat (limited to 'atari/Makefile.st')
-rw-r--r-- | atari/Makefile.st | 187 |
1 files changed, 80 insertions, 107 deletions
diff --git a/atari/Makefile.st b/atari/Makefile.st index b1ca4988..38e3eadc 100644 --- a/atari/Makefile.st +++ b/atari/Makefile.st @@ -1,4 +1,5 @@ -# Makefile for GNU Awk - ST version +# Makefile for GNU Awk - sample ST version. +# This makefile for ST version of gcc compiler and associated libraries. # # This is a subset of the full Makefile cut down for Atari ST # gcc compiler is assumed @@ -9,9 +10,9 @@ # You need sed.ttp for an automatic creation of config.h file! # Check gulam script mkconf.g in atari directory. # In a pinch you may create one by checking config/atari file and -# editing config.h-dist by hand. +# editing config.in by hand. # -# Copyright (C) 1986, 1988, 1989 the Free Software Foundation, Inc. +# Copyright (C) 1986, 1988-1992 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Progamming Language. @@ -26,147 +27,119 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with GAWK; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# User tunable macros - -DESTDIR= -BINDIR= c:\bin -MANDIR= c:\man\manl -MANEXT= l -RM=rm -f - -# CFLAGS: options to the C compiler -# -# -O optimize -# -mshort use integers which are 16-bits wide (a "correct" size on ST) -# -# Set LIBS to any libraries that are machine specific - - -# Comment out the next line if you don't have gcc. -# Also choose just one of -g and -O. -CC= gcc -# if cross-compiler -#CC= cgcc -LIBS = -lpml16 - -OPTIMIZE= -O -fstrength-reduce -fcombine-regs -fomit-frame-pointer -#OPTIMIZE= -O -AFLAGS = -G -x -mshort # -Wall -DEBUG= #-DMALLOCDEBUG #-DMEMDEBUG #-DDEBUG #-DFUNC_TRACE #-DMPROF -WARN= #-W -Wunused -Wimplicit -Wreturn-type -Wcomment # for gcc only - -# Parser to use on grammar -- if you don't have bison use the first one +# cross-compiler +CC= cgcc +# native +CC= gcc +# comment out the following two lines if you do not want use +# 16-bit wide ints +WIDTH = -mshort +EXT=16 + +# for gcc 1.40 +OPTIMIZE= -O -fstrength-reduce -fcombine-regs -fomit-frame-pointer +# for gcc 2.2.2 +#OPTIMIZE= -O2 -fstrength-reduce -fomit-frame-pointer +PROFILE= #-pg +DEBUG= #-DMALLOCDEBUG #-DDEBUG #-DFUNC_TRACE #-DMPROF +LINKSTATIC= #-Bstatic +WARN= #-W -Wunused -Wimplicit -Wreturn-type -Wcomment # for gcc only + +# Parser to use on grammar - any one of the following will work #PARSER = yacc PARSER = byacc #PARSER = bison -y +# basename of parser output - adjust to your parser requirements +POUTPUT = awk_tab -# -# With the exception of names of parser output files -# need to customize this file below this point. -# +# Set LIBS to any libraries that are machine specific +LIBS = -lpml$(EXT) -FLAGS= $(DEBUG) $(AFLAGS) -CFLAGS= $(FLAGS) $(LINKSTATIC) $(PROFILE) $(OPTIMIZE) $(WARN) +FLAGS=-G -Xlinker -x $(WIDTH) -# object files -AWKOBJS = main.o eval.o builtin.o msg.o iop.o io.o field.o \ - array.o node.o missing.o re.o version.o +CFLAGS= -DGAWK $(FLAGS) $(DEBUG) $(LINKSTATIC) $(PROFILE) $(OPTIMIZE) $(WARN) -# basename of parser output -#POUTPUT = awk.tab -POUTPUT = awk_tab +# object files +AWKOBJS = main.o eval.o builtin.o msg.o iop.o io.o field.o array.o \ + node.o version.o missing.o re.o # getopt.o -ALLOBJS = $(AWKOBJS) $(POUTPUT).o +ALLOBJS = $(AWKOBJS) awktab.o # GNUOBJS -# GNU stuff that gawk uses as library routines. +# GNU stuff that gawk uses as library routines. GNUOBJS= regex.o dfa.o $(ALLOCA) # source and documentation files -SRC = main.c eval.c builtin.c msg.c \ - iop.c io.c field.c array.c node.c missing.c re.c version.c +SRC = main.c eval.c builtin.c msg.c version.c \ + iop.c io.c field.c array.c node.c missing.c re.c getopt.c -ALLSRC= $(SRC) $(POUTPUT).c -#ALLSRC= $(SRC) awk_tab.c +ALLSRC= $(SRC) awktab.c -AWKSRC= awk.h awk.y $(ALLSRC) patchlevel.h protos.h config.h-dist +AWKSRC= awk.h awk.y $(ALLSRC) patchlevel.h protos.h config.in getopt.h GNUSRC = alloca.c alloca.s dfa.c dfa.h regex.c regex.h -COPIES = missing/getopt.c missing/system.c missing/tzset.c \ +COPIES = missing/system.c missing/tzset.c \ missing/memcmp.c missing/memcpy.c missing/memset.c \ missing/random.c missing/strcase.c missing/strchr.c \ - missing/strerror.c missing/strtod.c missing/vprintf.c \ - missing/strftime.c missing/strftime.3 missing/strtol.c + missing/strerror.c missing/strtod.c \ + missing/strftime.c missing/strftime.3 SUPPORT = support/texindex.c support/texinfo.tex -DOCS= gawk.1 gawk.texinfo +DOCS= gawk.1 gawk.texi + +INFOFILES= gawk.info gawk.info-* \ + gawk.aux gawk.cp gawk.cps gawk.fn gawk.fns gawk.ky gawk.kys \ + gawk.pg gawk.pgs gawk.toc gawk.tp gawk.tps gawk.vr gawk.vrs + +MISC = NEWS COPYING FUTURES Makefile.* PROBLEMS README* PORTS POSIX \ + mungeconf configure ACKNOWLEDGMENT LIMITATIONS -#INFOFILES= gawk-info gawk-info-1 gawk-info-2 gawk-info-3 gawk-info-4 \ -# gawk-info-5 gawk-info-6 gawk.aux gawk.cp gawk.cps gawk.fn \ -# gawk.fns gawk.ky gawk.kys gawk.pg gawk.pgs gawk.toc \ -# gawk.tp gawk.tps gawk.vr gawk.vrs +OTHERS= pc/* atari/* vms/* ALLDOC= gawk.dvi $(INFOFILES) +ALLFILES= $(AWKSRC) $(GNUSRC) $(COPIES) $(MISC) $(DOCS) $(ALLDOC) $(OTHERS) \ + $(SUPPORT) + +# set this for a version of toglclr you are using +TOGLFLAGS = -fload + # rules to build gawk -gawk: $(ALLOBJS) $(GNUOBJS) $(REOBJS) - $(CC) -o gawk.ttp $(CFLAGS) $(ALLOBJS) $(GNUOBJS) $(REOBJS) $(LIBS) - toglclr gawk.ttp +gawk.ttp: $(ALLOBJS) $(GNUOBJS) $(REOBJS) + $(CC) -o $@ $(CFLAGS) $(ALLOBJS) $(GNUOBJS) $(REOBJS) $(LIBS) + toglclr $(TOGLFLAGS) $@ -$(AWKOBJS): awk.h config.h +$(AWKOBJS) regex.o dfa.o: awk.h dfa.h regex.h -dfa.o: awk.h config.h dfa.h -regex.o: awk.h config.h regex.h -main.o: patchlevel.h +getopt.o: getopt.h -$(POUTPUT).o: awk.h $(POUTPUT).c +main.o: patchlevel.h -$(POUTPUT).c: awk.y awk.h - $(PARSER) awk.y - sed '/^extern char .malloc(), .realloc();$$/d' ytab.c > $(POTPUT).c - rm ytab.c +awktab.c: awk.y + $(PARSER) -v awk.y + sed '/^extern char .malloc(), .realloc();$$/d' $(POUTPUT).c >awktab.c + rm $(POUTPUT).c -config.h: config.h-dist - pushd atari - mkconf.g - popd +config.h: config.in + @echo You must provide a config.h! + @echo Run \"./configure\" to build it for known systems + @echo or copy config.in to config.h and edit it.; exit 1 -# One of these rules should have already been selected by running mkconf. +gawk.dvi: gawk.texi + tex gawk.texi; texindex gawk.?? + tex gawk.texi -##MAKE_ALLOCA_S## alloca.o: alloca.s -##MAKE_ALLOCA_S## /lib/cpp < alloca.s | sed '/^#/d' > t.s -##MAKE_ALLOCA_S## as t.s -o alloca.o -##MAKE_ALLOCA_S## rm t.s -##MAKE_ALLOCA_C## alloca.o: alloca.c -install: gawk - cp gawk.ttp $(DESTDIR)$(BINDIR) - cp gawk.1 $(DESTDIR)$(MANDIR)/gawk.$(MANEXT) +gawk.info: gawk.texi + makeinfo gawk.texi clean: - $(RM) gawk.ttp *.o core awk.output $(POUTPUT).c gmon.out make.out \ - y.output + rm *.o *.orig *.rej */*.orig */*.rej + +cleaner: clean + rm gawk.ttp awktab.c clobber: clean - $(RM) $(ALLDOC) gawk.log - -gawk.dvi: gawk.texinfo - tex gawk.texinfo ; texindex gawk.?? - tex gawk.texinfo ; texindex gawk.?? - tex gawk.texinfo - -#$(INFOFILES): gawk.texinfo -# makeinfo gawk.texinfo - -# Many tests in test directory depend on having Bourne shell around. -# Before using this target edit test Makefile and test scripts adapting -# them to your local conditions. -test: gawk - pushd test - make - popd + rm $(ALLDOC) gawk.log |