#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
#     National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
#     Operator of Los Alamos National Laboratory.
# EPICS BASE Versions 3.13.7
# and higher are distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution. 
#*************************************************************************
# $Id$
#
# This file contains definitions for Vx builds

#--------------------------------------------------
# operating system class (include/os/<os_class>)
OS_CLASS = LynxOS

lynx_pc486 =YES

CC = gcc
CXX = g++

#--------------------------------------------------
# vxWorks directory definitions

# The definitions VX_DIR, VX_GNU, GNU_DIR and GNU_LIB
# can be overridden for specific host architectures
# by creating a CONFIG_SITE.Vx.<host_arch> file with
# the override definitions.
 
# Tornado directory definitions
VX_INCLUDE_YES =
VX_GNU_YES =
VX_GNU_BIN_YES =
VX_GNU_LIB_YES =


# pre Torando directory definitions
VX_INCLUDE_NO =
VX_GNU_NO =
VX_GNU_BIN_NO =
 
# directory definitions
VX_DIR =
VX_INCLUDE =
VX_GNU = 

GNU_BIN = /usr/local/bin
GNU_LIB = /usr/local/lib

#--------------------------------------------------
# VxWorks command definitions

#GCC = $(GNU_BIN)/cc$(CMPLR_SUFFIX) -B$(GNU_LIB)/gcc-lib/ -nostdinc
#AR = $(GNU_BIN)/ar$(CMPLR_SUFFIX)
#CPP = $(GNU_BIN)/cpp$(CMPLR_SUFFIX) -nostdinc
#RANLIB = $(GNU_BIN)/ranlib$(CMPLR_SUFFIX)
#LD = $(GNU_BIN)/ld$(CMPLR_SUFFIX) -r

AR = ar -rc
ARCMD = $(AR) $@
RANLIB = ranlib -t
GCC = gcc 
CPP = cpp
LD = ld -r


#--------------------------------------------------
# Tornado C++ crosscompiler definitions

#CPLUSPLUS_YES = G++
#G++ = $(GNU_BIN)/cc$(CMPLR_SUFFIX) -B$(GNU_LIB)/gcc-lib/ -nostdinc
#LD_G++ = $(GNU_BIN)/ld$(CMPLR_SUFFIX) -r
#NM = $(GNU_BIN)/nm$(CMPLR_SUFFIX)
#MUNCH = $(GNU_BIN)/munch

CPLUSPLUS_YES = g++ -DLynxOS -DLynxOS_pc486 -mposix -D_X86_ -DEXPL_TEMP
G++ = g++ -DLynxOS -DLynxOS_pc486 -mposix -D_X86_ -DEXPL_TEMP
LD_G++ = ld -r
NM = nm

#--------------------------------------------------
# Pre Tornado C++ crosscompiler definitions
# These are pre tornado definitions for Hideos builds (defined for 68k only)

#CPLUSPLUS_NO = CCC
#CCC = $(GNU_DIR)/bin/sun3-g++ -B$(GNU_DIR)/lib/gcc-lib/ -nostdinc -DEXPL_TEMPL
#LD_CCC = $(GNU_DIR)/bin/sun3-ld $(OLD_ARCH_DEP_LDFLAGS) -r

CPLUSPLUS_NO = g++ -DLynxOS -DLynxOS_pc486 -mposix -D_X86_ -DEXPL_TEMP
CCC = g++ -DLynxOS -DLynxOS_pc486 -mposix -D_X86_ -DEXPL_TEMP
LD_CCC = ld -r

CCC_NORMAL = $(CCC) $(OLD_ARCH_DEP_CFLAGS)
CCC_STRICT = $(CCC) -ansi -pedantic -Wall -traditional $(OLD_ARCH_DEP_CFLAGS)
CCC_TRAD = $(CCC) -traditional $(OLD_ARCH_DEP_CFLAGS)
CCC_TEMPL_INST_FLAG = -DEXPL_TEMP
CCC_WARN_YES = -Wall
CCC_WARN_NO = -w
CCC_OPT_YES = -O
CCC_OPT_NO = -g
CCC_DEPENDS_FLAG =  -pedantic -DLynxOS -DLynxOS_pc486 -mposix -D_X86_
CPU = i486
OS = lynxos
OLD_ARCH_DEP_CFLAGS = -DLynxOS -DLynxOS_pc486 -mposix -D_X86_
#	 --no-builtin -Wa,"-m68040" -DOS_EQ_$(OS) \
#	-DBOARD_EQ_$(BOARD) -DCPU_EQ_$(CPU) -DBOARD=$(BOARD)
OLD_ARCH_DEP_LDFLAGS = -mposix -lc -lbsd -lnsl -lm -lposix4d9 -llynx
#	 -Ur -N -T$(EPICS_BASE_BIN)/vxldscript.MRI

#--------------------------------------------------
# C compiler definitions  
ANSI = gcc -ansi

#--------------------------------------------------
# Command definitions
CPLUSPLUS = g++
#	 $(CPLUSPLUS_$(TORNADO))
LD_CXX = ld -r
#	 $(LD_$(CPLUSPLUS))

#--------------------------------------------------
# Operating system flags
OP_SYS_INCLUDES =
#	 -I$(VX_INCLUDE)
OP_SYS_CFLAGS =  -DLynxOS -DLynxOS_pc486 -mposix -D_X86_
#		-DvxWorks -DV5_vxWorks -fno-builtin 
OP_SYS_LDFLAGS = -DLynxOS -DLynxOS_pc486 -mposix -D_X86_
OP_SYS_LDLIBS = -lc -lbsd -lnsl -lm -lposix4d9 -llynx

#--------------------------------------------------
# Optimization flag overrides
GCC_OPT_YES = -O	
#	2 -fstrength-reduce
G++_OPT_YES = -O
#	2 -fstrength-reduce

#--------------------------------------------------
# Link definitions
LINK.c = $(LD) $(LDFLAGS) -o
LINK.cc = $(LD_CXX) $(LDFLAGS) -o

