#==============================================================
#
#  Abs:  Makefile to build EPICS Database components
#
#  Name: Makefile
#
#  Facility: LCLS Shared Platform Controls
#
#  Auth: 09-Sep-2021, Kyle Leleux     (KLELEUX)
#  Rev:  dd-mmm-yyyy, First Lastname  (USERNAME)
#--------------------------------------------------------------
#  Mod:
#        11-May-2022, K. Luchini      (LUCHIN):
#          install sioc-diag0-sp01.db
#          add standard header
#          chg CROSSBARCONTROL to ATCACOMMON
#
#==============================================================
#
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
#  ADD MACRO DEFINITIONS AFTER THIS LINE

#----------------------------------------------------
# Create and install (or just install) into <top>/db
# databases, templates, substitutions like this
#DB += xxx.db

## For automatic generated records
DB_INSTALLS += $(YCPSWASYN)/db/ai.template
DB_INSTALLS += $(YCPSWASYN)/db/ao.template
DB_INSTALLS += $(YCPSWASYN)/db/longin.template
DB_INSTALLS += $(YCPSWASYN)/db/longout.template

## For manually created records:
DB_INSTALLS += $(YCPSWASYN)/db/RegisterIn.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterOut.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterEnumBIn.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterEnumBOut.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterCommand.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterArrayChar.template

# ==========================================
# LCLS2 MPS application specific databases
# ==========================================
# Common database to all applications
DB_INSTALLS += $(L2MPSASYN)/db/mps.db
# Application specific database
DB_INSTALLS += $(L2MPSASYN)/db/mps_blm.db
DB_INSTALLS += $(L2MPSASYN)/db/mps_scale_factor.db
# ==========================================

# Install Common databases needed by All IOCs
# ========================================================
# Install databases from iocAdmin package
# These databases support IOC Health and Monitoring
# ========================================================
DB_INSTALLS += $(IOCADMIN)/db/iocAdminSoft.db
DB_INSTALLS += $(IOCADMIN)/db/iocAdminScanMon.db
IOCRELEASE_DB += iocRelease.db

# Install Database to support reading the status of the autosave package:
DB_INSTALLS += $(AUTOSAVE)/db/save_restoreStatus.db

# Install Database to support reading the status of the seq package:
DB_INSTALLS += $(SEQ)/db/devSeqCar.db

# Install Database for tprTrigger module
DB_INSTALLS += $(TPRTRIGGER)/db/tprTrig.db
DB_INSTALLS += $(TPRTRIGGER)/db/tprDeviceNamePV.db

# Install Database for tprPattern module
DB_INSTALLS += $(TPRPATTERN)/db/tprPattern.db

# Install Database for crossbarControl module
DB_INSTALLS += $(ATCACOMMON)/db/crossbarCtrl.db

#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
# <anyname>_template = <templatename>
DB += llrf_bsa_all.db
DB += llrf_bsa_core.db
DB += amc_carrier_core.db
DB += sioc-diag0-sp01.db

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

