TOP=../..

include $(TOP)/configure/CONFIG

USR_CXXFLAGS += -std=c++0x
#USR_CXXFLAGS += -DHAVE_YAML

#=====================================================
# Path to "NON EPICS" External PACKAGES: USER INCLUDES
#======================================================
#USR_INCLUDES += -I$(YAML_INCLUDE)
#USR_INCLUDES += -I$(BOOST_INCLUDE)

# this part is just for yaml loader driver
#USR_INCLUDES += -I$(CPSW_FRAMEWORK_INCLUDE)

#==================================
# PATH TO THE EXTERNAL LIBRARIES
#==================================
#commonATCA_DIR = $(COMMONATCA_LIB)
#cpsw_DIR = $(CPSW_FRAMEWORK_LIB)
#yaml-cpp_DIR  += $(YAML_LIB)

# ================================================
# Build the IOC application
# ================================================
ifeq ($(T_A),linuxRT-x86_64)
PROD_IOC = llo
endif

# llock.dbd will be created and installed
DBD += llo.dbd

# llo.dbd will be made up from these files:
llo_DBD += base.dbd
llo_DBD += devIocStats.dbd
llo_DBD += asSupport.dbd
llo_DBD += caPutLog.dbd

# ================================================================================
# The system command will be mainly used by linux hosted IOCs
# Very useful for changing kernel thread priorities for kernel drivers
# Used to set real-time priorities on linuxRT
# ================================================================================
llo_DBD += system.dbd

# Add epics sequencer CAR DBDs
llo_DBD += devSeqCar.dbd

# Add PV Access support
#llo_DBD += qsrv.dbd
#llo_DBD += pvxsIoc.dbd
#llo_DBD += PVAServerRegister.dbd

llo_DBD += asyn.dbd
llo_DBD += lloAsynDriver.dbd
#llo_DBD += yamlLoader.dbd
#llo_DBD += drvPerfMeasure.dbd

#===================================================================
# Build an IOC support library
# ==================================================================
# Comment this line to build a host-ioc; you'd need to exclude
# several facilities (evr, micro, ...) for this to work.
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
#
# Build the main IOC entry point on workstation OS.
llo_SRCS_DEFAULT += lloMain.cpp
llo_SRCS         += llo_registerRecordDeviceDriver.cpp
llo_SRCS_vxWorks += -nil-

# Install external package binaries
ifeq ($(T_A),linuxRT-x86_64)
BIN_INSTALLS += $(EPICS_BASE_BIN)/caRepeater
BIN_INSTALLS += $(EPICS_BASE_BIN)/caget
BIN_INSTALLS += $(EPICS_BASE_BIN)/caput
BIN_INSTALLS += $(EPICS_BASE_BIN)/camonitor
BIN_INSTALLS += $(EPICS_BASE_BIN)/cainfo
#BIN_INSTALLS += $(CPSW_FWLOADER_BIN)/FirmwareLoader
#BIN_INSTALLS += $(DHCPD_BIN)/dhcpd
endif

llo_SRCS += lloAsynDriver.cpp
llo_SRCS += tprLLO.cpp

# =====================================================
# Link in the code from other libraries
# =====================================================
llo_LIBS += devIocStats
llo_LIBS += autosave
llo_LIBS += caPutLog
llo_LIBS += asyn
#llo_LIBS += qsrv
#llo_LIBS += cpsw
#llo_LIBS += yaml-cpp
#llo_LIBS += yamlLoader
#llo_LIBS += pvxsIoc
#llo_LIBS += pvxs
#llo_LIBS += perfMeasure

# NOTE: To build SNL programs, SNCSEQ must be defined
# in the <top>/configure/RELEASE file
ifneq ($(SNCSEQ),)
    llo_DBDS += devSeqCar.dbd
    llo_LIBS += seqCar seq pv
endif

llo_LIBS += $(EPICS_BASE_IOC_LIBS)
llo_LIBS += $(EPICS_BASE_PVA_CORE_LIBS)

PROD_IOC += llotpr
llotpr_SRCS = tprLLO.cc llotpr.cc
#llotpr_LIBS = pthread rt dl

#===============================
include $(TOP)/configure/RULES
#-------------------------------
#  ADD RULES AFTER THIS LINE
#
# End of file

