TOP=../..

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

#=============================
# build an ioc application

PROD_IOC = $(PROD_IOC_$(T_A))
PROD_IOC_RTEMS-beatnik = BunchLength
# BunchLength.dbd will be created and installed
DBD += BunchLength.dbd

USR_CFLAGS  += -g -DDEBUG_PRINT

DBDINC += aaiSubArrRecord

# BunchLength.dbd will be made up from these files:
BunchLength_DBD += base.dbd

BunchLength_DBD += aaiSubArrRecord.dbd

BunchLength_DBD += drvIpac.dbd
BunchLength_DBD += Xy2440.dbd
BunchLength_DBD += Xy2445.dbd

BunchLength_DBD += autosave.dbd

# Support for sending puts to the message log
# Uses hooks in CA Security to trap writes to PVs
# Records host and username
BunchLength_DBD += caPutLog.dbd

# Support for IOC Health Monitoring
BunchLength_DBD += devIocStats.dbd

# For Timing
BunchLength_DBD += evrSupport.dbd
BunchLength_DBD += devMrfEr.dbd


BunchLength_DBD += fbckSup.dbd

BunchLength_DBD += devBlm.dbd
BunchLength_DBD += drvBlm.dbd
BunchLength_DBD += padUdpCommSupport.dbd
BunchLength_DBD += fcomUtil.dbd


# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
BunchLength_SRCS += aaiSubArrRecord.c
BunchLength_SRCS += devMbboOnln.c
BunchLength_SRCS += drvBlm.c
BunchLength_SRCS += drvBlmUdpComm.c
BunchLength_SRCS += devAiBlm.c
BunchLength_SRCS += devAaiBlmProc.c
BunchLength_SRCS += devAaoBlmWght.c
BunchLength_SRCS += devWaveformBlm.c
BunchLength_SRCS += fbckSup.c
BunchLength_SRCS += fcomBlm.c
BunchLength_SRCS += BunchLength_registerRecordDeviceDriver.cpp
BunchLength_SRCS_DEFAULT += BunchLengthMain.cpp
BunchLength_SRCS_vxWorks += -nil-




# Add locally compiled object code
BunchLength_LIBS += Xy2440
BunchLength_LIBS += Xy2445
BunchLength_LIBS += Ipac
BunchLength_LIBS += devBusMapped #maybe don't need this
BunchLength_LIBS += fcom
BunchLength_LIBS += padUdpCommSupport
BunchLength_LIBS += padSupport
BunchLength_LIBS += udpComm
BunchLength_LIBS += miscUtils
BunchLength_LIBS += fcomIocshSupport
BunchLength_LIBS += fcomUtil

BunchLength_LIBS += autosave
BunchLength_LIBS += devIocStats

BunchLength_LIBS += evrSupport
BunchLength_LIBS += sSubRecord

BunchLength_LIBS += devMrfEr
BunchLength_LIBS += mrfVme64x


# Support for sending puts to the message log
# Uses hooks in CA Security to trap writes to PVs
# Records host and username
BunchLength_LIBS += caPutLog



# NOTE: To build SNL programs, SNCSEQ must be defined
# in the <top>/configure/RELEASE file

ifneq ($(SNCSEQ),)
    # This builds sncExample as a component of BunchLength
    # BunchLength_SNCFLAGS += +r
    # BunchLength_DBD += sncExample.dbd
    # BunchLength_SRCS += sncExample.stt
    # BunchLength_LIBS += seq pv
endif

BunchLength_LIBS += $(EPICS_BASE_IOC_LIBS)
# ======================================================

# ======================================================
# Let's install some external modules that we will
# load dynamically via out st.cmd file
# This allows us to only load what is necessary for each
# IOC.
# Here we will copy over the RTEMS Spy Utility into our
# IOC Application
# ======================================================
BIN_INSTALLS_RTEMS += $(RTEMSUTILS_BIN)/rtemsUtilsSup.obj
DBD_INSTALLS += $(RTEMSUTILS)/dbd/rtemsUtilsSup.dbd
# ======================================================


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

