# CONFIG_SITE

# Make any application-specific changes to the EPICS build
#   configuration variables in this file.
#
# Host/target specific settings can be specified in files named
#   CONFIG_SITE.$(EPICS_HOST_ARCH).Common
#   CONFIG_SITE.Common.$(T_A)
#   CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)

# CHECK_RELEASE controls the consistency checking of the support
#   applications pointed to by the RELEASE* files.
# Normally CHECK_RELEASE should be set to YES.
# Set CHECK_RELEASE to NO to disable checking completely.
# Set CHECK_RELEASE to WARN to perform consistency checking but
#   continue building anyway if conflicts are found.
CHECK_RELEASE = YES

# Set this when you only want to compile this application
#   for a subset of the cross-compiled target architectures
#   that Base is built for.



#
#  Comment out the following line for South Pole TPG
#
CROSS_COMPILER_TARGET_ARCHS = linuxRT-x86_64

# To install files into a location other than $(TOP) define
#   INSTALL_LOCATION here.
#INSTALL_LOCATION=</path/name/to/install/top>

# Set this when your IOC and the host use different paths
#   to access the application. This will be needed to boot
#   from a Microsoft FTP server or with some NFS mounts.
# You must rebuild in the iocBoot directory for this to
#   take effect.
#IOCS_APPL_TOP = </IOC/path/to/application/top>
#
# =======================================================
# Let's install our IOC boot products:
# envPaths and st.cmd
# =======================================================
INSTALL_LOCATION_STARTUP += $(INSTALL_LOCATION)/startup
DIRECTORY_TARGETS += $(INSTALL_LOCATION_STARTUP)
# =======================================================

## =============================
## Build Application Statically
## =============================
SHARED_LIBRARIES=NO
STATIC_BUILD=YES


# Build for any RHEL where "make" is being used
ifdef T_A
PKG_ARCH=$(T_A)
endif
#
#
#

# for LCLS2 TPG
PACKAGE_AREA=/afs/slac/g/lcls/package
#
# # Use the following line for South Pole TPG
# #PACKAGE_AREA=/usr/local/controls/package
#
#
# # ========================================================================================================================
# # Support for EtherCAT
# # ========================================================================================================================
#
 XZ_LIB=$(PACKAGE_AREA)/xz/5.2.2/$(PKG_ARCH)/lib
 XZ_INCLUDE = -I$(PACKAGE_AREA)/xz/5.2.2/$(PKG_ARCH)/include
#
 ZLIB_LIB=$(PACKAGE_AREA)/zlib/1.2.8/$(PKG_ARCH)/lib
 ZLIB_INCLUDE = -I$(PACKAGE_AREA)/zlib/1.2.8/$(PKG_ARCH)/include
#
#
 LIBXML2_LIB = $(PACKAGE_AREA)/libxml2/2.9.3/$(PKG_ARCH)/lib
 LIBXML2_INCLUDE = -I$(PACKAGE_AREA)/libxml2/2.9.3/$(PKG_ARCH)/include/libxml2
#
# # ======================================================================================================================
#
 CPSW_DEVICE_LIBRARY_PACKAGE_NAME=cpsw/deviceLibrary
 CPSW_DEVICE_LIBRARY_VERSION=R1.2.0
 CPSW_DEVICE_LIBRARY_TOP=$(PACKAGE_AREA)/$(CPSW_DEVICE_LIBRARY_PACKAGE_NAME)/$(CPSW_DEVICE_LIBRARY_VERSION)/$(PKG_ARCH)
 CPSW_DEVICE_LIBRARY_LIB = $(CPSW_DEVICE_LIBRARY_TOP)/lib
 CPSW_DEVICE_LIBRARY_INCLUDE = $(CPSW_DEVICE_LIBRARY_TOP)/include
#
#
 CPSW_FRAMEWORK_PACKAGE_NAME=cpsw/framework
 CPSW_FRAMEWORK_VERSION=R4.4.1
 CPSW_FRAMEWORK=$(PACKAGE_AREA)/$(CPSW_FRAMEWORK_PACKAGE_NAME)/$(CPSW_FRAMEWORK_VERSION)/$(PKG_ARCH)
 CPSW_FRAMEWORK_LIB     = $(CPSW_FRAMEWORK)/lib
 CPSW_FRAMEWORK_INCLUDE = $(CPSW_FRAMEWORK)/include
#

YAML_NAME=yaml-cpp
YAML_VERSION=yaml-cpp-0.5.3_boost-1.64.0
YAML_ARCH=$(PKG_ARCH)
YAML=$(PACKAGE_AREA)/$(YAML_NAME)/$(YAML_VERSION)/$(YAML_ARCH)
YAML_INCLUDE=$(YAML)/include
YAML_LIB=$(YAML)/lib

BOOST_PACKAGE_NAME=boost
BOOST_VERSION=1.64.0
BOOST_ARCH=$(PKG_ARCH)
BOOST=$(PACKAGE_AREA)/$(BOOST_PACKAGE_NAME)/$(BOOST_VERSION)/$(BOOST_ARCH)
BOOST_LIB     = $(BOOST)/lib
BOOST_INCLUDE = $(BOOST)/include

BSA_PACKAGE_NAME=timing/bsa
BSA_VERSION=R2.0.0-2.0
BSA_ARCH=$(PKG_ARCH)
BSA=$(PACKAGE_AREA)/$(BSA_PACKAGE_NAME)/$(BSA_VERSION)/$(BSA_ARCH)
BSA_LIB     = $(BSA)/lib
BSA_INCLUDE = $(BSA)/include

YAMLREADER_PACKAGE_NAME=cpsw/yamlReader
YAMLREADER_VERSION=R1.2.0
YAMLREADER_TOP=$(PACKAGE_SITE_TOP)/$(YAMLREADER_PACKAGE_NAME)/$(YAMLREADER_VERSION)/$(PKG_ARCH)
YAMLREADER_LIB= $(YAMLREADER_TOP)/lib
YAMLREADER_INCLUDE=$(YAMLREADER_TOP)/include

TPG_PACKAGE_NAME=timing/tpg
TPG_VERSION=R1.4.0
TPG_ARCH=$(PKG_ARCH)
TPG=$(PACKAGE_AREA)/$(TPG_PACKAGE_NAME)/$(TPG_VERSION)/$(TPG_ARCH)
TPG_LIB     = $(TPG)/lib
TPG_INCLUDE = $(TPG)/include

COMMONATCA_PACKAGE_NAME=atca/commonATCA
COMMONATCA_VERSION=R2.0.0-beta
COMMONATCA_TOP=$(PACKAGE_SITE_TOP)/$(COMMONATCA_PACKAGE_NAME)/$(COMMONATCA_VERSION)/$(PKG_ARCH)
COMMONATCA_LIB=$(COMMONATCA_TOP)/lib
COMMONATCA_INCLUDE=$(COMMONATCA_TOP)/include

PCRE := YES
PCRE_TOP := $(PACKAGE_AREA)/pcre/8.37/$(PKG_ARCH)
PCRE_INCLUDE := $(PCRE_TOP)/include
PCRE_LIB := $(PCRE_TOP)/lib

