# configHints.txt: configuration hints for ballista configure
# Copyright (C) 1998-2001  Carnegie Mellon University
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#

#############################
####                     ####
####  HOST sections      ####
####                     ####
#############################

##########
# Settings for Solaris hosts
##########
<Begin host:solaris>

          # The name of your C compiler.
	  #
	host-CC		   [CC = g++]

          # Any flags that should be passed to the C compiler.
          # NOTE - You should always include ${TARGET_DEF}, which allows
          #  the host components to conditionally compile things, based on
          #  the target being used.
	  #
	host-CFLAGS	   [CFLAGS = -DSUN ${TARGET_DEF}]

          # Any libraries to include when compiling newgo.
          # NOTE - This should also include any non-library flags needed to
          #  support compiling a dynamicly linked executable.
	  #
	host-CLIBS	   [CLIBS = -ldl -lnsl -lposix4]

<End host:solaris>

##########
# Settings for Linux hosts
##########
<Begin host:linux>
	host-CC		   [CC = g++]
	host-CFLAGS	   [CFLAGS = -w -O ${TARGET_DEF}]
	host-CLIBS	   [CLIBS = -lpthread -ldl -lnsl -rdynamic]
<End host:linux>


##########
# Settings for Digital UNIX hosts
##########
<Begin host:osf1>
	host-CC		   [CC = cxx]
	host-CFLAGS	   [CFLAGS = -w -O0 ${TARGET_DEF}]
	host-CLIBS	   [CLIBS =  -lc]
<End host:osf1>

##########
# Settings for DEFAULT hosts
##########
<Begin host:default>

          # The name of your C compiler.
          #
        host-CC            [CC = g++]

          # Any flags that should be passed to the C compiler.
          # NOTE - You should always include ${TARGET_DEF}, which allows
          #  the host components to conditionally compile things, based on
          #  the target being used.
          #
        host-CFLAGS        [CFLAGS = ${TARGET_DEF}]

          # Any libraries to include when compiling newgo.
          # NOTE - This should also include any non-library flags needed to
          #  support compiling a dynamicly linked executable.
          #
        host-CLIBS         [CLIBS = -ldl -lnsl -lposix4]

<End host:default>


###############################
####                       ####
####  TARGET sections      ####
####                       ####
###############################

##########
# Settings for VxWorks targets
##########
<Begin target:vxworks>

          # The file (without extension) that defines the Test Manager
	  #  to use.
	  #
	host-TEST_MAN_FILE [TEST_MAN_FILE = vxworks]

	  # The C preprocessor macro to define to allow code to be
	  #  conditionally compiled, based on the target being used.
	  #
	TARGET_DEF	   [TARGET_DEF    = -DB_VXWORKS]

	  # The name of your C compiler.
	  #
	target-CC	   [CC = cc68k]

	  # Flags to pass to your C compiler.
	  #
	target-CFLAGS	   [CFLAGS = ${TARGET_DEF} -fno-builtin -nostdinc \
				-I${WINDBASE}/target/h/ \
				-DCPU=MC68060 -DB_VXWORKS -w
			   ]

        target-LDFLAGS [LDFLAGS = -r]

          # Any miscellaneous variables that need to be set in order
	  #  to get the C compiler to work properly.
	  #
	  # NOTE - You can set many variables in MISC_VARS, each on
	  #  a seperate line.  Use backslashes at the end of the line
	  #  only when you want a value for a variable that you cannot
	  #  fit on a single line.
	  #
	target-MISC_VARS   [WINDBASE=/opt/wind
			     WIND_HOST_TYPE=sun4-solaris2
			     LD=ld68k
			     NM=nm68k
			     GCC_EXEC_PREFIX = \
			     ${WINDBASE}/host/${WIND_HOST_TYPE}/lib/gcc-lib/
			   ]

          # The C compiler for Digital UNIX (cxx) does not recognize
	  #  the -o flag when generating shared object files.  On all
	  #  platforms except OSF1, set this to "-o mut.o" to indicate
	  #  the output file when compiling the mut.  On OSF1, leave this
	  #  empty, and make sure to have "mv a.out mut.out" in the
	  #  munch phase.  
	  #
	target-MUT_O       [MUT_O = -o mut.o]

          # Some platforms require a seperate munching phase after
	  #  code has been compiled.  Set MUNCH to whatever needs to be
	  #  done in the munching phase.
	  #
	  # NOTE - Even if your target platform does not need a seperate
	  #  munching phase, this command should at least move
	  #  mut.o to mut.out
	  #
	  # NOTE - If your target platform needs a munching phase, it
	  #  will probably involve several commands.  Each of these
	  #  commands should be seperated by a semicolon (in traditional
	  #  shell style), and you can split the value of MUNCH across
	  #  several lines with backslashes.
	  #
	target-MUNCH       [MUNCH = ${NM} mut.o | munch > __mut.c ;\
			    ${CC} -traditional ${CFLAGS} -c __mut.c ;\
			    ${LD} -r -o mut.out __mut.o mut.o ;\
			    rm mut.o __mut.c __mut.o
			   ]

	  # make(1) is invoked twice, in order to compile the code in
	  #  the templates/ directory.  Unfortunately, macros are not
	  #  automatically propogated when make(1) is invoked recursively.
	  #  Use the RECURSIVE_FLAGS to pass any important macros
	  #  when make(1) is invoked recursively.  This will always include
	  #  CC and CFLAGS, and will proabably include anything set in
	  #  MISC_VARS
	  #
	target-RECURSIVE_FLAGS
			   [RECURSIVE_FLAGS = CC="${CC}" CFLAGS="${CFLAGS}" \
			    GCC_EXEC_PREFIX="${GCC_EXEC_PREFIX}" \
			    WINDBASE="${WINDBASE}"
			   ]

<End target:vxworks>

##########
# Settings for Solaris targets
##########
<Begin target:solaris>
	host-TEST_MAN_FILE [TEST_MAN_FILE = selfHost]
	TARGET_DEF	   [TARGET_DEF    = -DB_SELFHOST]

	target-CC	   [CC = g++]
	target-CFLAGS	   [CFLAGS = -w -O ${BFLAGS} -DSUN ${TARGET_DEF} \
				   -D__EXTENSIONS__ -D_XPG4_2 -DB_HANDLE_EXCEPTIONS]

	  #Note the use of ${BFLAGS} first appearing here.
	  #This is an environmental variable set by the perl script
	  #downloaded from the ballista web page.  Any compiler 
	  #directives or libraries specified will
	  #be set into this environmental variable, and compiled
	  #with the test case code.
	  #
	  #You should include this if you will be using the web page
	  #GUI front end to ballista

        target-LDFLAGS     [LDFLAGS = ${BFLAGS} -Xlinker -r -lm]
	target-MISC_VARS   []
	target-MUT_O       [MUT_O = -o mut.o]
	target-MUNCH       [MUNCH = mv mut.o mut.out]
	target-RECURSIVE_FLAGS
			   [RECURSIVE_FLAGS = CC="${CC}" CFLAGS="${CFLAGS}"]
<End target:solaris>

##########
# Settings for Linux targets
##########
<Begin target:linux>
	host-TEST_MAN_FILE [TEST_MAN_FILE = selfHost]
	TARGET_DEF	   [TARGET_DEF    = -DB_SELFHOST]

	target-CC	   [CC = g++]
	target-CFLAGS	   [CFLAGS = ${BFLAGS} -DPOSIX_NO_REALTIME -w -O -fPIC -DB_HANDLE_EXCEPTIONS]
        target-LDFLAGS     [LDFLAGS = -shared ${BFLAGS} -lm]
	target-MISC_VARS   []
	target-MUT_O       [MUT_O = -o mut.o]
	target-MUNCH       [MUNCH = mv mut.o mut.out]
	target-RECURSIVE_FLAGS
			   [RECURSIVE_FLAGS = CC="${CC}" CFLAGS="${CFLAGS}"]
<End target:linux>


##########
# Settings for Digital UNIX targets
##########
<Begin target:osf1>
	host-TEST_MAN_FILE [TEST_MAN_FILE = selfHost]
	TARGET_DEF	   [TARGET_DEF    = -DB_SELFHOST]

	target-CC	   [CC = cxx]
	target-CFLAGS	   [CFLAGS = -w -O ${BFLAGS} -DB_HANDLE_EXCEPTIONS]
        target-LDFLAGS     [LDFLAGS = -shared ${BFLAGS} -lm -lrt -laio_raw]
	target-MISC_VARS   []
	target-MUT_O       []
	target-MUNCH       [MUNCH = mv -f a.out mut.out]
	target-RECURSIVE_FLAGS
			   [RECURSIVE_FLAGS = CC="${CC}" CFLAGS="${CFLAGS}"]

<End target:osf1>

########## 
# Settings for DEFAULT targets
##########
<Begin target:default>
        host-TEST_MAN_FILE [TEST_MAN_FILE = selfHost]
        TARGET_DEF         [TARGET_DEF    = -DB_SELFHOST]
          
        target-CC          [CC = g++]
        target-CFLAGS      [CFLAGS = -w -O ${BFLAGS} ${TARGET_DEF} \
                                   -D__EXTENSIONS__ -DB_HANDLE_EXCEPTIONS]
             
          #Note the use of ${BFLAGS} first appearing here.
          #This is an environmental variable set by the perl script   
          #downloaded from the ballista web page.  Any compiler 
          #directives or libraries specified will   
          #be set into this environmental variable, and compiled
          #with the test case code.
          # 
          #You should include this if you will be using the web page 
          #GUI front end to ballista

        target-LDFLAGS     [LDFLAGS = ${BFLAGS} -Xlinker -r -lm]
        target-MISC_VARS   []
        target-MUT_O       [MUT_O = -o mut.o]
        target-MUNCH       [MUNCH = mv mut.o mut.out]
        target-RECURSIVE_FLAGS
                           [RECURSIVE_FLAGS = CC="${CC}" CFLAGS="${CFLAGS}"] 
<End target:default>



