#	Copyright (c) 1988 AT&T
#	All Rights Reserved 
#	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
#	The copyright notice above does not evidence any 
#	actual or intended publication of such source code.

#ident	"@(#)xenv:m32/README	1.17"
#
#	MASTER README FOR WE-32000 SGS
#
#
This README file is in a directory called ....(path name).../xenv/m32 .

The source files composing the WE-32000 SGS are stored in a directory
structure of the form:

	../../inc/m32
	../../inc/common
	../../inc/3b
	../../<tool>/m32
	../../<tool>/common
	../../../make
	../../../../<lib>/m32
	../../../../<lib>/common

where ../../inc/* contain the header files, ../../<tool>/* contains the
source files used to build a particular tool, e.g. "as", and ../../../../<lib>/*
contains the source files used to build a particular library, e.g. "libc".
While some tools are composed principally of common files, all of them are
built in the m32 structure.

The directory containing this README file also contains the following
files:
	pathedit-- shell script to set path names in paths.h, sgs.h,
		   makefile, make-m32, env-m32,
		   ../../sgs.mk and ../../../../.lib.mk

	pted.shlink-- file to link the libc source files to shlibc
                      (this file is invoked by pathedit)

	paths.h	-- a reusable skeleton of ../../inc/m32/paths.h

	sgs.h	-- a reusable copy of ../../inc/m32/sgs.h

	template.mk -- a reusable skeleton of WE 32000 Master SGS makefile

	make-m32 -- a reusable skeleton of the front-end to make.

	env-m32 -- a reusable skeleton of the cross-environment script

To build the tools, the paths.h file (in ../../inc/m32/paths.h)
must be set up properly.  This file contains the absolute path
names for various tools and directories.  These path names can
be set using the pathedit shell program in this directory.
Pathedit will also set the path names in the master SGS makefile
(./makefile), the global makefile (../../sgs.mk) which makes both the SGS
and the cross-libraries, the master library makefile (../../../../.lib.mk),
the front-end to make (./make-m32) and the cross-environment script (./env-m32), 
as well as the SGS prefix in sgs.h (../../inc/m32/sgs.h).

$(BASE) will denote the directory where the SGS source is rooted.

Let:
	MACH 	= Target machine, i.e. the machine for which SGS will produce
		  code. This parameter is used to define the appropriate
		  variable in the C preprocessor. Legal responses are
		  3b15, 3b5 and 3b2.

	BINDIR = directory containing the tools which are called
		 directly, such as m32cc, m32size, etc.. Default value
		 is $(BASE)/$(MACH)/bin.

	LIBDIR = directory containing indirectly called passes of
		 various tools, such as comp and cpp, as well as the
		 libraries (libld.a, libc.a, etc.). Default value 
		 is $(BASE)/$(MACH)/lib.

        USRINC  = the ABSOLUTE name of the default include directory for
                  the cpp. This is the directory in which the cross
		  cpp will look for header files. Default value is
		  $(BASE)/$(MACH)/usr/include.

	PREFIX = generic prefix used for command names, e.g. setting
		 this to "m32" causes the command name for the C
		 compiler to be called "m32cc". Default value is the target 
		 machine name, $(MACH).

To set the pathnames, run pathedit giving the names of the parameters
as requested.  Pathedit should be executed with /bin/sh and thus execute
it as follows:

        sh pathedit <cr>

Now the cross-SGS can be made. Simply type the following:

	cd ../..		- go the root directory of the SGS source

	make -f sgs.mk		- builds all WE 32000 SGS tools and the 
				  cross-libraries and installs them in BINDIR and
				  LIBDIR


Some other make capabilities are:

	make -f sgs.mk sgs	- builds the WE32000 SGS tools and libraries only
				  This does not build the cross-libraries.

	make -f sgs.mk install	- installs tools in BINDIR and LIBDIR 

	make -f sgs.mk shrink	- removes ALL non-source files (i.e. .o and
			  	  executable) from the m32 and common directory
			  	  structures. This DOES NOT remove the
			  	  installed files.
	
