#
# macdefs for utility makes
#

MAKE=/bin/make
include $(IROOT)/integ.defs

################################################################################
###                 P  A  T  H  S                                ###############
################################################################################

# ROOT is where the root and usr binaries are installed if the install option is
# requested.
# SECROOT is where the security overlay binaries are installed if the install 
# option is requested.
# MAPDIR and DOMMAPDIR are the directory tree that the maps are put into.

XROOT		=	$(BUILD)/util
ROOT		=	$(XROOT)/bin/root
SECROOT		=	$(XROOT)/bin/secroot

# Where the source was loaded (this file is in $(SROOT)/tools
SROOT		=	$(XROOT)/src

# the source of all creation
SGS_ROOT	=	$(ROOT)

# This variable may be modified in the sgsdefs files
CC_ROOT		=	$(IROOT)


#############################################################################
###            GLOBAL COMPILER SETTINGS                       ###############
#############################################################################

SGS_PFX	=

CC		=	$(CC_ROOT)/$(SGS_PFX)cc
LD		=	$(SGS_ROOT)/bin/$(SGS_PFX)ld
AS		=	$(SGS_ROOT)/bin/$(SGS_PFX)as
CPP		=	$(SGS_ROOT)/lib/$(SGS_PFX)cpp
YACC		=	$(SGS_ROOT)/usr/bin/yacc
LEX		=	$(SGS_ROOT)/usr/bin/lex
#AR		=	$(SGS_ROOT)/bin/ar   #gone to sgsdef1 & sgsdef2
LORDER		=	$(IROOT)/lorder
CP		=	/bin/cp

# kernel version - 0 for arete - 2 for pure (historical reasons).  See
# coff (prog guide) pg 11-7; must be a short
VERS	=	-VS 53004

# the release date for this make.
# Please modify this file every global make 
include $(IROOT)/newdate.file

# override the sgs's change in default include and libraries -- last one
# wins and CFLAGS is last!

# where the proper include files live (utility include files only)
INCRT		=	$(ROOT)/usr/include

PROD	 =	S3000

# To turn off optimization set OPTFLAG= in your *.mk file
OPTFLAG  =	-O

# To make a posix binary set SVID_FLAG= in your *.mk file
SVID_FLAG=	-SYSV

# LOCAL_CFLAGS is where your set local options for compiles
# LOCAL_LDFLAGS is where your set local options for link

SCOCFLAGS	= -I$(INC)
CFLAGS		= $(LOCAL_CFLAGS) $(SVID_FLAG) $(OPTFLAG) -D$(PROD) \
		  -D$(MACH) -D$(FAMILY) -U$(NOTMACH) -Z$(NEWDATE)
CFLAGS_NATIVE	=	$(CFLAGS)

SCOLIBNET	= -lsocket

# we should really have the library search paths in LDFLAGS only, and not
# in CFLAGS as well; for now, I don't see anyway to avoid duplication,  
# until we change all makefiles to be uniform in this respect
SCOLDFLAGS	=
LDFLAGS		= $(LOCAL_LDFLAGS) $(SVID_FLAG) $(LDFLAGS_POSIX)

NDYNFLAGS	=	-i -D_NODYNAMIC

CUST	=	ARETE

FAMILY	=	m68k

SCOINS	=	$(CP)
INS	=	$(IROOT)/ins

# needed to make such things as the local "tic" (libcurses/screen)
LOCAL_TIC	=	/tmp/tic

LOCALINCS	=	$(SGS_NATIVE)/usr/include

SGSXINST	=	0
SGSXMK		=	0

# Variables for use with installations
REW		=	/dev/rmt1
NOREW		=	/dev/rmt0
SGS_INSTALL	=	$(BUILD)/install_files/sgs
SEC_INSTALL	=	$(BUILD)/install_files/secure
DOM_INSTALL	=	$(BUILD)/install_files/dom
