#==============================================================
#
#  Abs:  Makefile to build EPICS ACR Cud Control Application
#
#  Name: Makefile
#
#  Desc: This file generates a database definition file
#        file for a soft ioc cud.dbd and the binary cud.obj
#
#  Facility:  SLAC Cud Controls
#
#  Auth: dd-mmm-yyyy, Author's Name       (USERNAME)
#  Rev:  dd-mmm-yyyy, Reviewer's Name     (USERNAME)
#--------------------------------------------------------------
#  Mod:
#       16-Oct-2019, K. Luchini           (LUCHINI):
#         add qsrv.dbd and remove PVAServerRegister.dbd
#       09-Oct-2019, K. Luchini           (LUCHINI):
#         add header
#         remove V7 app versioning as it the incldue
#         file is missing and I can't find any information
#         on the EPICS web site to describe how this is done.
#
#==============================================================
#
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
#  ADD MACRO DEFINITIONS AFTER THIS LINE
#=========================================

# Sequence Flags
cud_SNCFLAGS  += +r

# 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  += devSeqCar.dbd
cud_DBD  += caPutLog.dbd
cud_DBD  += calcSupport.dbd
cud_DBD  += sscanSupport.dbd
cud_DBD  += sCalcoutRecord.dbd
cud_DBD  += devCudControlVersion.dbd
cud_DBD  += qsrv.dbd

cud_SRCS += ChangeLogger.st
cud_DBD  += ChangeLogger.dbd

cud_SRCS += KLYSActive.st
cud_DBD  += KLYSActive.dbd

cud_SRCS += BPMS_UNDH_CUD.st
cud_DBD  += BPMS_UNDH_CUD.dbd

cud_SRCS += BPMS_UNDS_CUD.st
cud_DBD  += BPMS_UNDS_CUD.dbd

cud_SRCS += XCOR_UNDH_CUD.st
cud_DBD  += XCOR_UNDH_CUD.dbd

cud_SRCS += YCOR_UNDH_CUD.st
cud_DBD  += YCOR_UNDH_CUD.dbd

cud_SRCS += XCOR_UNDS_CUD.st
cud_DBD  += XCOR_UNDS_CUD.dbd

cud_SRCS += YCOR_UNDS_CUD.st
cud_DBD  += YCOR_UNDS_CUD.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

# Include libraries
# Order MATTERS!
cud_LIBS += devIocStats
cud_LIBS += autosave
cud_LIBS += caPutLog
cud_LIBS += calc
cud_LIBS += sscan
cud_LIBS += qsrv
cud_LIBS += seqCar
cud_LIBS += seq
cud_LIBS += pv

USR_LIBS  += $(EPICS_BASE_IOC_LIBS)
USR_LIBS  += $(EPICS_BASE_PVA_CORE_LIBS)

include $(TOP)/configure/RULES
#----------------------------------------
#  ADD RULES AFTER THIS LINE
#========================================
#
# Explicit dependency needed for generated header file
devCudControlVersion$(DEP): $(COMMON_DIR)/$(GENVERSION)

# End of file


