# -*- Mode: Text;  -*-
# File: Makefile.site
# Author: Heinz Schmidt (hws@csis.dit.csiro.AU)
# Copyright (C) CSIRO Division of Information Technology, 1992
#
# COPYRIGHT NOTICE: This code is provided "AS IS" WITHOUT ANY WARRANTY
# and is subject to the terms of the SATHER LIBRARY GENERAL PUBLIC
# LICENSE contained in the file: "sather/doc/license.txt" of the Sather
# distribution. The license is also available from ICSI, 1947 Center
# St., Suite 600, Berkeley CA 94704, USA.
#*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#* FUNCTION: Makefile header included by all Makefiles. The file 
#*    consists of three parts: 
#*        Makefile.site: you normally need to edit only this one.
#*        Makefile.mach: the machine dependent part and defaults.
#*           This is machine generated you do not want to change it.
#*           When porting you want to change Makefile.mach.cpp
#*           instead.
#*        Makefile.gen: the generic make plans.
#*
#* HISTORY:
#*  Feb  1 19:32 1992 (hws): Extracted from top level Makefile. Avoids
#*    the need to adapt 10 Makefiles when defaults change upon ports.
#* Created: Sat Feb  1 19:30:33 1992 (hws)
#*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# These are the variables that you should adjust.

# The ultimate location of your Sather installation.
SATHER_HOME = /proj/hop/sather

# The location of the untarred sather distribution (i.e. the path locating
# the directory this Makefile is in).
TOPDIR = /proj/hop/dist

# The architecture for which the executables are generated defines
# the bin directory. This may also be used to conditionalize
# compiles. See the file Makefile.mach for architecture dependent settings.
# We used the following symbols: sparc, mips, vax, sony,...
# You may have to differentiate further (mips-dec-ultrix,littlemips ...). 
ARCH = sun4

# After installing you may run "make setgrp" to set group and permissions
# of the directory tree, if your defaults are different from what you want
# the installation to be. The default group name is "sather".
SATHERGRP = csis

# During installation all files generated by the Sather compiler, including
# the boot compiler in the distribution, are built using $SATHER_MAKE.
# Note that with SATHER_MAKE = pmake, c_makefiles mentioned in .sather
# are still run using "make" since "pmake" does not seem to support "include"
# yet.
SATHER_MAKE = make

# The Garbage collector runs silent in the background by default.
# GCSILENT=SILENT, or is prints statistics GCSILENT=NOSILENT
GCSILENT=SILENT

# The Garbage collector allocates chunks of memory. The maximum number
# is defined in sys/GC/gc.h MAXHBLKS = 6144 and is fine for ~ 64MB
# configured swap space. The initial setting MAXHBLKS = 4096 seems to be
# meant for about 32MB swap space. Reached the previous limit when trying
# to compile the compiler with all checking and debugging options switched
# on.

# The Sather to C (sac) interface provides some predefined 
# classes, C files etc that simplify interfacing to C. But it
# is not necessary to include them. You may want to follow different
# conventions. If you have Emacs users in your site, sac also includes
# a generator for generating C interface classes from higher level
# sather like description of C packages. 
# YES or NO controls whether sac installation skipped.
SKIPSAC = NO

# The release version that users refer to in bug reports to sather-admin.
RELEASEVERSION = 0.2g

# This should expand into the current date on your host. If not
# enter the current date as a string like "Thu Mar 19 16:09:31 EST 1992".
# The compiler will get to know about this and allow you to
# distinguish compiler listings of different versions at your site.
# The hostname may help us ask funny questions when tracking down compiler 
# errors due to compiling the compiler on that host.
CONFIG_DATE = `date`
HOSTNAME = `hostname`




# 1 "Mkf.mach.cpp" 
# -*- Mode: Text;  -*-
# File: Makefile.mach.cpp
# 
# Copyright (C) CSIRO Division of Information Technology, 1992
#
# COPYRIGHT NOTICE: This code is provided "AS IS" WITHOUT ANY WARRANTY
# and is subject to the terms of the SATHER LIBRARY GENERAL PUBLIC
# LICENSE contained in the file: "sather/doc/license.txt" of the Sather
# distribution. The license is also available from ICSI, 1947 Center
# St., Suite 600, Berkeley CA 94704, USA.
#*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#* FUNCTION: Makefile header included by all Makefiles. The file 
#*    consists of three parts: 
#*        Makefile.site: you normally need to edit only this one.
#*        Makefile.mach: the machine dependent part and defaults.
#*           This is machine generated you do not want to change it.
#*           When porting you want to change Makefile.mach.cpp
#*           instead.
#*        Makefile.gen: the generic make plans.
#*  
#*    This file contains the default macros possible overridden
#*    by machine dependent settings.
#*
#* HISTORY:
#*  Feb  1 19:32 1992 (hws): Extracted from top level Makefile. Avoids
#*    the need to adapt 10 Makefiles when defaults change upon ports.
#* Created: Sat Feb  1 19:30:33 1992 (hws)
#*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# These are default options you do *NOT* want to modify.


# 37 "Mkf.mach.cpp" 



# 44 "Mkf.mach.cpp" 

AR = /bin/ar


AR = /bin/ar
AS = /bin/as
AWK = /bin/awk

COMPRESS = /usr/ucb/compress
CP = /bin/cp

# I tried /lib/cpp on NeXT but this confuses make by  "/**/#" -> " #"
# If your cc is not properly installed you may
# do         make CPP="(/lib/cpp | sed s,' \#','#',g ) <" config
# instead, overriding the current CPP setting
CPP = cc -E

ECHO = /bin/echo
ED = /bin/ed
FALSE = /bin/false
FIND = /usr/bin/find

# 69 "Mkf.mach.cpp" 

INSTALL = /usr/bin/install
LN = /bin/ln -s


# 75 "Mkf.mach.cpp" 
# 78 "Mkf.mach.cpp" 

# 81 "Mkf.mach.cpp" 

MATHLIB=/usr/lib/libm.a



MD = /bin/mkdir
MV = /bin/mv

# 92 "Mkf.mach.cpp" 

# 95 "Mkf.mach.cpp" 

RANLIB = /usr/bin/ranlib



RM = /bin/rm -f
SED = /bin/sed
SHELL = /bin/sh

# 106 "Mkf.mach.cpp" 

TAR = /bin/tar


TRUE = /bin/true
WC = /usr/ucb/wc
YACC = /usr/bin/yacc

# Problems with your ARCHITECTURE or PORTING? 
# You may have to change here if you are porting.
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Architecture specific settings, extended with each port and perhaps
# replacing some of the defaults above.

# #include ${TOPDIR}/makemach
# -*- Mode: Text;  -*-
# File: makemach.cpp
# 
# 
# Copyright (C) CSIRO Division of Information Technology, 1992
# COPYRIGHT NOTICE: This code is provided "AS IS" WITHOUT ANY WARRANTY
# and is subject to the terms of the SATHER LIBRARY GENERAL PUBLIC
# LICENSE contained in the file: "sather/doc/license.txt" of the Sather
# distribution. The license is also available from ICSI, 1947 Center
# St., Suite 600, Berkeley CA 94704, USA.
#*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#* FUNCTION: Machine dependent setting for Makefile.header
#*           (All makefiles should be rewritten to use imake).
#* HISTORY:
#* Created: Mon Feb  3 00:27:40 1992 (hws)
#*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# The following conditionals are used so far and the
# current setting is depicted in the generated file.
# If you are porting to a new machine please record the new option here.
# It may help someone else interpreting compile conditionalizations.
# 
# Architectures:
# sparc_: 1, sun3_: sun3, sun4_: sun4,
# mips_: mips, hpux_: hpux, vax_: vax, sony_: sony,
# sequent_: sequent, vax_: vax, mips_: mips, MIPSEL_: MIPSEL,
# NeXT_: NeXT, mc68000_: mc68000, hp9000s300_: hp9000s300,
# i386_: i386, ibm032_: ibm032, _IBMR2_: _IBMR2,
# SCO_: SCO
# 
# Operating systems:
# unix_: 1, bsd4_2_: bsd4_2, bsd4_3_: bsd4_3, SYSTYPE_BSD: SYSTYPE_BSD
# SYSV_: SYSV, SYSTYPE_SYSV_: SYSTYPE_SYSV, M_SYSV_: M_SYSV
# ultrix_: ultrix, __MACH___: __MACH__

# MACHINE DEPENDENT REDEFINITIONS OF FLAGS

# -O is a bad option for compiling the cs MAIN_.c
# because cc crashes due to size. The main routine
# itself is relatively small. Other than this the options can be
# just like CFLAGS. MAINFLAGS is used when the MAIN_.c of 
# the sather compiler is processed. It has lots of symbols
# and requires special table sizes on some unixes.
# Since we include this header file, every make file sees the
# defaults, can save them or append to them or replace them.

# These are passed to cc, TCLIBS is only used in some tests etc/test
CC = cc
CFLAGS = -O -DSATHER -DGC_ 
TCLIBS =
MFLAGS =

# cc flags when compiling the big compiler MAIN_.c
MAINFLAGS= -DSATHER -DGC_
# some systems even want a different compiler in this case.
MAINCC=${CC}

# These are only passed to the make step which compiles the
# boot compiler and can be used to override flags in the make file
# that was generated when the distribution was constructed on another
# machine: compiler/cs.cs.boot/mkCS
BOOTFLAGS=
# These are passed to cs and can include -cflags, -cc etc., cf.
# doc/cs_options.txt. Will show up in the make file created
# by the compiler during the installation.
CSFLAGS = -w

# 192 "Mkf.mach.cpp" 


# 206 "Mkf.mach.cpp" 


# 215 "Mkf.mach.cpp" 

 
# 232 "Mkf.mach.cpp" 


# 237 "Mkf.mach.cpp" 


# 242 "Mkf.mach.cpp" 


# 246 "Mkf.mach.cpp" 


# 252 "Mkf.mach.cpp" 


# 260 "Mkf.mach.cpp" 


# WHILE PORTING ...
# MACHINE DEPENDENT SUBSYSTEM INCLUSION
# The following variables help skipping installations of part of the
# system that may require adaptation.

# The Sather debugger (sdb) is based on the GNU debugger. The current
# distribution contains only the setting for 1. You need
# to run your local Gnu gdb directory against debugger/C and
# edit the local make file there. We really should make this
# via a gdb.${ARCH} directory and links into it for the 3 or 4 files
# that are machine dependent.
# YES or NO controls whether sdb installation skipped.


SKIPSDB = NO
# 279 "Mkf.mach.cpp" 


# The Garbage Collector (GC) may require a new machine dependent
# patch if the machine is not yet supported.
# YES or NO controls whether gc installation skipped.
# 286 "Mkf.mach.cpp" 

SKIPGC = NO

# GC V1.9 runs now on Dec mipses and RT too.
# #if defined(mips) & defined(ultrix) & defined(bsd4_2)
# SKIPGC = YES
# #else
# SKIPGC = NO
# #endif

# 
# Local flags while developing, porting etc.
LOCFLAGS =


# This part should perhaps stay as it is. See also the note below.
# 
# Do not delete param passing for sather home and topdir, ever.
# "make dist" will run clean on the development system!
# Do not include CFLAGS param passing here, so every make file 
# can see the shared defaults (XCFLAGS) and append to them or redefine them
# appropirately.
# Moreover pass on make parameters (${MAKE}) so we can do the few non-interfering
# things "make ARCH=mips -f Makefile" on disjoint subdirectories for different
# architectures. 

MKCMD = ${MAKE} SATHER_HOME=${SATHER_HOME} TOPDIR=${TOPDIR}

CS = ${TOPDIR}/bin.${ARCH}/cs -mak ${SATHER_MAKE}
# File: Makefile.gen
# Author: Jeff Bilmes
# Copyright (C) International Computer Science Institute, 1991
# Changes: Heinz Schmidt (hws@csis.dit.csiro.AU)
# Copyright (C) CSIRO Division of Information Technology, 1992
#
# COPYRIGHT NOTICE: This code is provided "AS IS" WITHOUT ANY WARRANTY
# and is subject to the terms of the SATHER LIBRARY GENERAL PUBLIC
# LICENSE contained in the file: "sather/doc/license.txt" of the Sather
# distribution. The license is also available from ICSI, 1947 Center
# St., Suite 600, Berkeley CA 94704, USA.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# FUNCTION:
#    Makefile for handling precompiled base classes
#
# HISTORY:
#* Last edited: Feb  1 17:46 1992 (hws)
#*  Feb  1 19:33 1992 (hws): include shared defaults now.
#*  Feb  1 17:46 1992 (hws): ARCH itecture dependent bin introduced 
#* Created: Mon Jan  7 09:33:08 1991
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Local defaults
PROGNAME = mk_pre

all:
	(ARCH=${ARCH}; export ARCH; \
	 SATHER_HOME=${TOPDIR}; export SATHER_HOME; \
	 ${CS} ${CSFLAGS} -mak ${SATHER_MAKE} -hom ${TOPDIR} -gen -info -all ${PROGNAME})

install:
	-[ -d ${TOPDIR}/sys/C/pre.${ARCH} ] || ${MD} ${TOPDIR}/sys/C/pre.${ARCH}
	@echo -n "Installing precompiled files in ${TOPDIR}/sys/C/pre.${ARCH}: "
	@for i in array_1.o array22.o array33.o array44.o array_24.o bool__16.o \
	char__14.o double18.o err___7.o file__11.o in____8.o int___15.o \
	out___9.o real__17.o str___20.o str_cu12.o sys___13.o sux___22.o array_1.c \
	array22.c array33.c array44.c array_24.c bool__16.c char__14.c \
	double18.c err___7.c file__11.c in____8.c int___15.c out___9.c \
	real__17.c str___20.c str_cu12.c sys___13.c sux___22.c c_names_.h offsets_.h; \
	do \
	   ${ECHO} -n $$i' ' ; \
	   ${CP} ${PROGNAME}.cs/$$i ${TOPDIR}/sys/C/pre.${ARCH}/ ; \
	done


clean:
	-${RM} -r ${PROGNAME} ${PROGNAME}.cs *~
	-${RM} -r ../pre.${ARCH}
