;# ------------------------------------------------------------------ ;# CONFIG.AMI -- configuration script for A6 for Amiga DOS ;# This is free software, please see the file ;# "COPYING" for copyright and licence details ;# ------------------------------------------------------------------ echo "A6 configure script for AmigaDOS v0.0.1, by Simon Collis" echo "" echo "(C) The A6 Development Team 1997" echo "" echo "This is free software, please see the file" echo "'COPYING' for copyright and licence details" echo "" echo "Attempting to configure A6..." echo "" ;# ------------------------------------------------------------------ ;# MAKEFILE ;# ------------------------------------------------------------------ echo "Building makefile..." echo >makefile "# ------------------------------------------------------------------" echo >>makefile "# Makefile for A6" echo >>makefile "# This is free software, please see the file" echo >>makefile "# 'COPYING' for copyright and licence details" echo >>makefile "# ------------------------------------------------------------------" echo >>makefile "" echo >>makefile "# This file has been automatically generated;" echo >>makefile "# please make any necessary changes to config.ami" echo >>makefile "" ;# Standard definitions echo >>makefile "# Standard definitions" echo >>makefile "PROG=A6" echo >>makefile "DEFD=NODEBUG" echo >>makefile "" ;# Objects and etc echo >>makefile "# Objects" echo >>makefile "OBJS1=$(PROG).o asmfile.o assemble.o error.o" echo >>makefile "OBJS2=global.o label.o outf.o psexpr.o" echo >>makefile "OBJS3=psop.o pspop.o pstext.o treefind.o ustring.o" echo >>makefile "" echo >>makefile "OBJS=$(OBJS1) $(OBJS2) $(OBJS3)" echo >>makefile "" ;# ------------------------------------------------------------------ ;# Compilers ;# ------------------------------------------------------------------ echo "Checking for compiler..." ;# *** SAS C -- untested, please fix and send to trireme@powerfield.demon.co.uk IF NOT EXISTS conf.cc echo "Checking for SAS C..." IF EXISTS :sc/smake echo "Found SAS C..." echo >conf.cc "" echo >conf.sc "" echo >>makefile "# Configuration for SAS C" echo >>makefile "CC=sc" echo >>makefile "LN=slink" echo >>makefile "CFLAGS=-b0 -cs" echo >>makefile "AUX_CFLAGS=-DAMIGA" echo >>makefile "LFLAGS=" echo >>makefile "FROM=FROM LIB:c.o" echo >>makefile "TO=TO" echo >>makefile "EXTRA_LIBS=LIB LIB:sc.lib" echo >>makefile "LOBJS=$(OBJS)" ENDIF ENDIF ;# *** Lattice C IF NOT EXISTS conf.cc echo "Checking for Lattice C..." IF EXISTS :lc/c/lmk echo "Found Lattice C..." echo >conf.cc "" echo >conf.lat "" echo >>makefile "# Configuration for Lattice C" echo >>makefile "CC=lc" echo >>makefile "LN=blink" echo >>makefile "CFLAGS=-b0 -cs" echo >>makefile "AUX_CFLAGS=-DAMIGA" echo >>makefile "LFLAGS=" echo >>makefile "FROM=FROM LIB:c.o" echo >>makefile "TO=TO" echo >>makefile "EXTRA_LIBS=LIB LIB:lc.lib" echo >>makefile "LOBJS=$(OBJS)" ENDIF ENDIF IF NOT EXISTS conf.cc echo "No supported C compilers found... A6 configuration stopped." DELETE QUIET makefile conf.h QUIT ELSE echo >>makefile "" DELETE QUIET conf.cc ENDIF ;# ------------------------------------------------------------------ ;# Targets ;# ------------------------------------------------------------------ ;# Standard targets echo >>makefile "# Targets" echo >>makefile "all: $(PROG) compare" echo >>makefile "" echo >>makefile "test:" echo >>makefile " cd test" echo >>makefile " /a6 -fp -o test.prg test.asm" echo >>makefile " /compare test.prg good.prg" echo >>makefile "" echo >>makefile "clean:" echo >>makefile " delete QUIET a6 compare \#?.o" echo >>makefile "" echo >>makefile "distclean:" echo >>makefile " delete QUIET a6 compare \#?.o test/test.prg" echo >>makefile "" echo >>makefile "install:" echo >>makefile " copy $(PROG) C:" echo >>makefile "" echo >>makefile "$(PROG): $(OBJS)" echo >>makefile " $(LN) $(LFLAGS) $(AUX_LFLAGS) $(TO) $(PROG) $(FROM) $(LOBJS) $(EXTRA_LIBS) $(AUX_LIBS)" echo >>makefile "" echo >>makefile "compare: compare.o" echo >>makefile " $(LN) $(LFLAGS) $(AUX_LFLAGS) $(TO) compare $(FROM) compare.o $(EXTRA_LIBS) $(AUX_LIBS)" echo >>makefile "" echo >>makefile ".c.o:" echo >>makefile " $(CC) -c -D$(DEFD) $(CFLAGS) $(AUX_CFLAGS) $<" ;# ------------------------------------------------------------------ ;# CONF.H ;# ------------------------------------------------------------------ echo "Building conf.h..." echo >conf.h "/** ------------------------------------------------------------------" echo >>conf.h " CONF.H -- configuration details for the A6 cross-assembler" echo >>conf.h " This is free software, please see the file" echo >>conf.h " 'COPYING' for copyright and licence details" echo >>conf.h " ------------------------------------------------------------------ **/" echo >>conf.h "" echo >>conf.h "/** This file has been automatically generated; **" echo >>conf.h " ** please make any necessary changes to config.ami **/" echo >>conf.h "" echo >>conf.h "#ifndef _CONF_H" echo >>conf.h "#define _CONF_H" echo >>conf.h "" echo >>conf.h "#define PATH_SEPARATOR ':'" echo >>conf.h "#define PATH_SLASH '/'" echo >>conf.h "" ;# Compensate for Lattice missing stuff IF EXISTS conf.lat echo >>conf.h "#include *"global.h*"" echo >>conf.h "" echo >>conf.h "/** If no exit prototypes **/" echo >>conf.h "#ifndef EXIT_SUCCESS" echo >>conf.h "#define EXIT_SUCCESS (0)" echo >>conf.h "#define EXIT_FAILURE g_errorcount" echo >>conf.h "#endif" echo >>conf.h "" echo >>conf.h "/** If no size_t **/" echo >>conf.h "#ifndef size_t" echo >>conf.h "#define size_t int" echo >>conf.h "#endif" echo >>conf.h "" echo >>conf.h "/** Cope with non-ANSI stdio.h (THIS worries me!!!) **/" echo >>conf.h "#ifndef SEEK_SET" echo >>conf.h "#define SEEK_SET (0)" echo >>conf.h "#endif" ENDIF echo >>conf.h "#endif" echo "" echo "The configuration of A6 succeeded, to make A6 type" IF EXISTS conf.lat echo " lmk all" echo " lmk test" echo " lmk install" DELETE QUIET conf.lat ENDIF IF EXISTS conf.sc echo " smake all" echo " smake test" echo " smake install" DELETE QUIET conf.sc ENDIF