TOP=../..

include $(TOP)/configure/CONFIG
#----------------------------------------
#  ADD MACRO DEFINITIONS AFTER THIS LINE
#========================================

# =====================================================
# Path to "NON EPICS" External PACKAGES: USER INCLUDES
# =====================================================
# Perl C regular expression library
USR_INCLUDES += -I$(PCRE_INCLUDE)

# ======================================================
# PATH TO "NON EPICS" EXTERNAL PACKAGES: USER LIBRARIES
# ======================================================
pcre_DIR = $(PCRE_LIB)

# ======================================================
# LINK "NON EPICS" EXTERNAL PACKAGE LIBRARIES STATICALLY
# =======================================================
USR_LIBS_Linux += pcre

# ================================================
# Build the IOC application
# ================================================
PROD_IOC = cryomodules
DBD += cryomodules.dbd

# cryomodules.dbd will be made up from these files:
cryomodules_DBD += base.dbd
cryomodules_DBD += devIocStats.dbd
cryomodules_DBD += asSupport.dbd
cryomodules_DBD += caPutLog.dbd
cryomodules_DBD += ether_ip.dbd
cryomodules_DBD += PVAServerRegister.dbd
cryomodules_DBD += qsrv.dbd
cryomodules_DBD += system.dbd
cryomodules_DBD += asyn.dbd
cryomodules_DBD += stream.dbd
cryomodules_DBD += drvAsynIPPort.dbd

# ======================================================================
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
cryomodules_SRCS += cryomodules_registerRecordDeviceDriver.cpp
cryomodules_SRCS_DEFAULT += cryomodulesMain.cpp

# ========================================================================
# ========================================================================
# Add locally compiled object code
# For example, subroutines
# ========================================================================
# cryomodules_SRCS += file1.c
# cryomodules_SRCS += file2.c

# =====================================================
# Link in code from other libraries
# =====================================================
cryomodules_LIBS += devIocStats 
cryomodules_LIBS += autosave
cryomodules_LIBS += caPutLog
cryomodules_LIBS += ether_ip
cryomodules_LIBS += qsrv
cryomodules_LIBS += stream
cryomodules_LIBS += asyn
cryomodules_LIBS += $(EPICS_BASE_PVA_CORE_LIBS)
# =====================================================

# NOTE: To build SNL programs, SNCSEQ must be defined
# in the <top>/configure/RELEASE file
ifneq ($(SNCSEQ),)
cryomodules_SNCFLAGS += +r
cryomodules_LIBS += seq pv
endif

# epics base libs
cryomodules_LIBS += $(EPICS_BASE_IOC_LIBS)

#===========================

include $(TOP)/configure/RULES
#----------------------------------------
#  ADD RULES AFTER THIS LINE

