# OCS project definitions for: booting & testing new OC
#
# $Id: ProjectDefs 615 2010-09-30 15:49:42Z florenz@TU-BERLIN.DE $


# This version of OCS ProjectDefs is for booting and self-testing 
# a new compiler.

# By default, it sets full optimization AND debugging.

# It sets the EXP compiler and libray to an OCS system located by
# the variable TOCS. 

# Installation pathes are also set to $(TOCS)/{bin,lib,man}.


# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Miscellaneous

# Flags for call of mkatfs




# Additional C librarys 

#JDKHOME         =/home/uebb/uebb/java/jdk
#TCL := /usr/tcl/8.0
CINCPATH        += -I/usr/gnu/include #-I$(TCL)/include -I$(JDKHOME)/include
#CLDLIBS         += -lreadline -lcurses -ltcl8.0 
CLDLIBPATH      += -L$(TCL)/lib -L/usr/gnu/lib \
                   -R$(TCL)/lib -R/usr/gnu/lib #\
#                   -L$(JDKHOME)/lib/sparc/green_threads \
#                   -R$(JDKHOME)/lib/sparc/green_threads


# Setup to -keep C sources so we might analyze booting problems.

REL_GENOPTIONS += -keep 

# Deactivate derived object cache

.BPOOL:

# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Variants

# Default variant selection 

ocs	:= expocs	# expocs
opt	:= full		# no modest medium full
debug	:= opal		# c opal
profile	:= no       	# gprof

# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Definition of experimental ocs
# all variables are defined by default as for stdocs


#       For shape, import any environment variables needed:

#       Define here alternate oc1, oc2, genmake, or opalimports:
# EXP_OC1         := $(NEWOCS)/bin/oc1
# EXP_OC2         := $(NEWOCS)/bin/oc2
# EXP_GENMAKE     := $(NEWOCS)/bin/genmake
# EXP_OPALIMPORTS := $(NEWOCS)/bin/opalimports

#       Add here flags passed to oc1 resp. oc2
#       Those variables are already initialized with standard options
#       (e.g. language extensions). To overwrite these defaults use
#       `:=', to extend them use `+='
 EXP_OC1FLAGS    += -v1
 EXP_OC2FLAGS    += -v1

#       The OCSYSPARAM value is passed to every call of oc1 or oc2 and
#       defines where the predefined and builtin structures are located:
EXP_OCSYSPARAM  := \
	-h$(OCSSRC)/lib/Internal/Compiler BOOL DENOTATION ABORT BUILTIN \
	-h$(OCSSRC)/lib/Internal/Strange CAST

OPAL_LIBS = 

# Proposals Java/JavaCheck Java/JavaBase Java/JavaVM OpalWinAdditions OpalWin
#  $(addprefix Tools/, 		 \
#				Readline  \
#				Tk Tcl Formatting ParserLight) \

OPAL_LIBS_FINE = \
  $(addprefix Tools/,           Formatting) \
  $(addprefix System/, 		Streams Unix Commands Debugging) \
  $(addprefix AggregateTypes/,  Algorithms MapLike SetLike TreeLike SeqLike \
				UnionLike ProductLike) \
  $(addprefix Functions/, 	Special Orderings General) \
              BasicTypes \
  $(addprefix Internal/,	Strange Compiler)

EXP_GENSTDSYS   := $(addprefix -s $(OCSSRC)/lib/, $(OPAL_LIBS_FINE))

GENSTDSYS = $(EXP_GENSTDSYS)

EXP_CCFLAGS := -I. -I$(OCSDIR) \
	       $(addprefix -I $(OCSSRC)/lib/, $(OPAL_LIBS_FINE)) \
	       $(patsubst %, -I $(OCSSRC)/lib/%/$(OCSDIR),\
			$(OPAL_LIBS_FINE)) \
	       $(CINCPATH)



#       The OSTART parameter defines the startup file used for OPAL
#       programs.
EXP_OSTART      := $(OCSSRC)/lib/System/Commands/_ostart.c

