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

#----------------------------------------------------
#  Optimization of db files using dbst (DEFAULT: NO)
#DB_OPT = YES

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

# ATCA
## 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
DB_INSTALLS += $(YCPSWASYN)/db/waveform_in.template
DB_INSTALLS += $(YCPSWASYN)/db/waveform_out.template
DB_INSTALLS += $(YCPSWASYN)/db/waveform_8_in.template
DB_INSTALLS += $(YCPSWASYN)/db/waveform_8_out.template
DB_INSTALLS += $(YCPSWASYN)/db/waveform_in_float.template
DB_INSTALLS += $(YCPSWASYN)/db/waveform_out_float.template
DB_INSTALLS += $(YCPSWASYN)/db/mbbi.template
DB_INSTALLS += $(YCPSWASYN)/db/mbbo.template
DB_INSTALLS += $(YCPSWASYN)/db/bo.template
DB_INSTALLS += $(YCPSWASYN)/db/waveform_stream16.template
DB_INSTALLS += $(YCPSWASYN)/db/waveform_stream32.template

## For manually created record
DB_INSTALLS += $(YCPSWASYN)/db/RegisterIn.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterOut.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterOutRBV.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterArrayChar.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterArrayIn.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterArrayOut.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterEnumBIn.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterEnumMBBIn.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterEnumBOut.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterEnumBOutRBV.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterEnumMBBOut.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterEnumMBBOutRBV.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterDoubleIn.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterDoubleOut.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterDoubleOutRBV.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterCommand.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterStream.template
DB_INSTALLS += $(YCPSWASYN)/db/RegisterStream16.template
DB_INSTALLS += $(YCPSWASYN)/db/example.substitutions

# iocAdmin 
DB_INSTALLS += $(IOCADMIN)/db/iocAdminSoft.db
DB_INSTALLS += $(IOCADMIN)/db/iocAdminScanMon.db
DB_INSTALLS += $(IOCADMIN)/db/iocScanMonSum.db
DB_INSTALLS += $(IOCADMIN)/db/iocScanMon.db
IOCRELEASE_DB += iocRelease.db
 
# Autosave
DB_INSTALLS += $(AUTOSAVE)/db/save_restoreStatus.db

# Sequencer
DB_INSTALLS += $(SNCSEQ)/db/devSeqCar.db

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

# ATCA common
DB_INSTALLS += $(ATCACOMMON)/db/crossbarCtrl.db
DB_INSTALLS += $(ATCACOMMON)/db/ATCACommon.db
DB_INSTALLS += $(ATCACOMMON)/db/Stream.db

# Production .req files
REQ += sioc-sys0-ms01.req
REQ += sioc-sys0-ms09.req
REQ += sioc-sys0-ms10.req
REQ += sioc-sys0-ms11.req
REQ += sioc-sys0-ms12.req

# Dev .req files
REQ += sioc-b084-ms09.req
REQ += sioc-b084-ms10.req
REQ += sioc-b084-ms11.req
REQ += sioc-b084-ms12.req

# Agilent Frequency Counter
DB_INSTALLS += $(AGILENT53220A)/db/Agilent53220A.proto
DB_INSTALLS += $(AGILENT53220A)/db/Agilent53220A.db

# Asyn
DB_INSTALLS += $(ASYN)/db/asynRecord.db

# Modbus
DB_INSTALLS += $(MODBUS)/db/statistics.template

# For saving and loading yaml configuration
DB += saveLoadConfig.db

# For automatic initialization (requires saveLoadConfig.db)
DB += monitorFPGAReboot.db

# SIM module and supporting records
DB += freq_locker.db
DB += pll_master.db
DB += pll_slave.db
DB += pll_linacLock.db

# Beckhoff
DB += bkh_l0vco.db
DB += bkh_ms_test.db
DB += bkh_atten_test.db
DB += bkh_ms02.db
DB += bkh_ms03.db
DB += bkh_ms04.db

# Phase Locker
DB += subR_phaseLocker.db
DB += phaseLocker.db

# RFoF
DB += rfof_status.db
DB += rfof_tx.db
DB += rfof_rx.db

# Trigger Alignment
DB += trigAlignAsynDriver.db

#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
# <anyname>_template = <templatename>

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

