# 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.
CROSS_COMPILER_TARGET_ARCHS := $(filter-out linuxRT-i686,       $(CROSS_COMPILER_TARGET_ARCHS))
CROSS_COMPILER_TARGET_ARCHS := $(filter-out linuxRT_glibc-i686, $(CROSS_COMPILER_TARGET_ARCHS))
CROSS_COMPILER_TARGET_ARCHS := $(filter-out linuxRT-arm_zynq,   $(CROSS_COMPILER_TARGET_ARCHS))
CROSS_COMPILER_TARGET_ARCHS := $(filter-out vxWorks%,           $(CROSS_COMPILER_TARGET_ARCHS))
CROSS_COMPILER_TARGET_ARCHS := $(filter-out RTEMS%,             $(CROSS_COMPILER_TARGET_ARCHS))

# To build areaDetector so that it only depends on libCom and asyn set the following flag
#EPICS_LIBCOM_ONLY	= YES

# Configure which 3rd party libraries to use and where to find them.
# For each library XXX the following definitions are used:
# WITH_XXX      Build the plugins and drivers that require this library.
#               Build the source code for this library in ADSupport if XXX_EXTERNAL=NO.
# XXX_EXTERNAL  If NO then build the source code for this library in ADSupport.
# XXX_INCLUDE   If XXX_EXTERNAL=YES then this is the path to the include files for XXX.
#               However, if XXX is a system library whose include files are in a 
#               standard include search path then do not define XXX_INCLUDE.
# XXX_LIB       If XXX_EXTERNAL=YES then this is the path to the library files for XXX.
#               However, if XXX is a system library whose library files in a 
#               standard library search path then do not define XXX_LIB.
#

# BOOST is required for the ADCore/pluginTests unit tests
#WITH_BOOST     = NO
#BOOST_LIB     =
#BOOST_INCLUDE =

# WITH_PVA is required for NDPluginPva and pvaDriver
WITH_PVA  = YES
WITH_QSRV = YES

# We inherit the WITH_HDF5, WITH_JPEG, ... macros that were here via
# ADSUPPORT/cfg/CONFIG_ADSupport
#

# OPENCV is required for the ADPluginEdge plugin
WITH_OPENCV     = NO
OPENCV_EXTERNAL = YES
#OPENCV_INCLUDE =
#OPENCV_LIB     =

# GraphicsMagick is required for NDFileMagick and the URL driver.
WITH_GRAPHICSMAGICK     = NO
GRAPHICSMAGICK_EXTERNAL = YES
#GRAPHICSMAGICK_INCLUDE =
#GRAPHICSMAGICK_LIB     =

# 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>

AREA_DETECTOR	= $(TOP)
# Get settings from AREA_DETECTOR, so we only have to configure once for all detectors if we want to
-include $(AREA_DETECTOR)/configure/CONFIG_SITE
-include $(AREA_DETECTOR)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH)
-include $(AREA_DETECTOR)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).Common
ifdef T_A
  -include $(AREA_DETECTOR)/configure/CONFIG_SITE.Common.$(T_A)
  -include $(AREA_DETECTOR)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
endif

# Build shared and static libs
ifeq (Linux, $(OS_CLASS))
	SHARED_LIBRARIES=YES
	STATIC_BUILD=YES
    BOOST_USE_STATIC_LINK=YES
endif

ifndef PACKAGE_SITE_TOP
    PACKAGE_SITE_TOP=/afs/slac/g/lcls/package
endif
