TOP=../..

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

# build an ioc application
PROD_IOC_Linux = cud

# cud.dbd will be created and installed
DBD += cud.dbd

# cud.dbd will be made up from these files:

cud_DBD += base.dbd
cud_DBD += iocAdmin.dbd
cud_DBD += asSupport.dbd
cud_DBD += caPutLog.dbd
cud_DBD += calcSupport.dbd
cud_DBD += sCalcoutRecord.dbd


# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
cud_SRCS         += cud_registerRecordDeviceDriver.cpp
cud_SRCS_DEFAULT += cudMain.cpp
cud_SRCS += devCudControlVersion.c

# ===========================================================
# Auto-generate a header file containing a version string.
# ===========================================================
# Version comes from the VCS if available, else date+time.
GENVERSION = CudControlVersion.h
# Macro name
GENVERSIONMACRO = CudControlVERSION

cud_DBD += devCudControlVersion.dbd
# ===========================================================



# Order MATTERS!
cud_LIBS += calc
cud_LIBS += sscan
cud_LIBS += devIocStats
cud_LIBS += autosave
cud_LIBS += caPutLog

# Link QSRV (pvAccess Server) if available
ifdef EPICS_QSRV_MAJOR_VERSION
    BucketJump_LIBS += qsrv
    BucketJump_LIBS += $(EPICS_BASE_PVA_CORE_LIBS)
    BucketJump_DBD += PVAServerRegister.dbd
    BucketJump_DBD += qsrv.dbd
endif

# =================================================================
# NOTE: To build SNL programs, SNCSEQ must be defined
# in the <top>/configure/RELEASE file
# =================================================================
ifneq ($(SNCSEQ),)
   #This builds sncExample as a component of chiller
    cud_SNCFLAGS += +r
    cud_DBD += sncExample.dbd
    cud_SRCS += sncExample.stt
    cud_LIBS += seq pv

   #The following builds sncProgram as a standalone application
     ifneq ($(T_A),linuxRT-x86_64)
       PROD_HOST += sncProgram
       sncProgram_SNCFLAGS += +m
       sncProgram_SRCS += sncProgram.st
       sncProgram_LIBS += seq pv
       sncProgram_LIBS += $(EPICS_BASE_HOST_LIBS)
     endif
endif
# ==================================================================
  
cud_LIBS += $(EPICS_BASE_IOC_LIBS)



# ======================================================
# Explicit dependency needed for generated header file
# ======================================================
devCudControlVersion$(DEP): $(COMMON_DIR)/$(GENVERSION)
# =======================================================


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

