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)
# databases, templates, substitutions like this
#DB += IOC-IN20-LS11FdBk_UV.db  # FBCKs moved to soft IOC
DB += IOC-IN20-LS11FdBk_LH.db

DB += IOC-IN20-LS11iris.db
DB += IOC-IN20-LS11.db
DB += IOC-IN20-LS12.db
DB += IOC-IN20-LS13.db
DB += IOC-IN20-LS14.db
DB += IOC-IN20-LS15.db
DB += IOC-LR20-LS01.db
DB += IOC-LR20-LS02.db
DB += IOC-LR20-LS03.db
DB += IOC-LR20-LS04.db
DB += IOC-LR20-LS05.db

DB += IOC-IN20-LS11bsa.db
DB += IOC-IN20-LS11misc.db
DB += IOC-IN20-LS11trig.db
DB += IOC-IN20-LS12trig.db
DB += IOC-IN20-LS13trig.db
DB += IOC-IN20-LS14trig.db
DB += IOC-IN20-LS15trig.db
DB += IOC-LR20-LS01misc.db
DB += IOC-LR20-LS01trig.db
DB += IOC-LR20-LS02trig.db
DB += IOC-LR20-LS03trig.db
DB += IOC-LR20-LS04trig.db
DB += IOC-LR20-LS05trig.db

# ========================================
# Install iocAdmin related databases
# ========================================
DB += IOC-LR20-LS01-iocAdmin.substitutions

# ========================================================
# Install databases from iocAdmin package
# These databases support IOC Health and Monitoring
# ========================================================
DB_INSTALLS += $(IOCADMIN)/db/iocAdminRTEMS.db
DB_INSTALLS += $(IOCADMIN)/db/iocAdminSoft.db
DB_INSTALLS += $(IOCADMIN)/db/iocAdminScanMon.db
DB_INSTALLS += $(IOCADMIN)/db/iocScanMonSum.db
DB_INSTALLS += $(IOCADMIN)/db/iocScanMon.db

DB_INSTALLS     += $(IOCADMIN)/db/access.db

IOCRELEASE_DB += iocRelease.db



#DB_INSTALLS += $(IOCADMIN)/db/baseSecurity.acf



#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
IOCADMIN_TEMPLATE += $(IOCADMIN)/db/access.db
#IOCADMIN_TEMPLATE += $(IOCADMIN)/db/iocAdmin.db
IOCADMIN_TEMPLATE += $(IOCADMIN)/db/iocAdminRTEMS.db 
IOCRELEASE_DB += iocRelease.db

MOTOR_TEMPLATE += $(MOTOR)/db/basic_asyn_motor.db
MOTOR_TEMPLATE += $(MOTOR)/db/XPSAuxAi.db
MOTOR_TEMPLATE += $(MOTOR)/db/XPSAuxAo.db
MOTOR_TEMPLATE += $(MOTOR)/db/XPSAuxBi.db
MOTOR_TEMPLATE += $(MOTOR)/db/XPSAuxBo.db
MOTOR_TEMPLATE += $(MOTOR)/db/XPSAuxLi.db
MOTOR_TEMPLATE += $(MOTOR)/db/XPSAuxLo.db
MOTOR_TEMPLATE += $(MOTOR)/db/XPS_extra.db

GENERALTIME_TEMPLATE += $(GENERALTIME)/db/generalTimeNonVx.template

STATS_TEMPLATE += $(STATS)/db/stats.db

EDT_CL_TEMPLATE += $(EDT_CL)/db/camera640480.db

IPAC_TEMPLATE += $(IPAC)/db/IP330.template
IPAC_TEMPLATE += $(IPAC)/db/IP231.template




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

# Use the gen_trig_edl below to create EDM displays automatically for official release!
# The ALIGNMENT_DB macro gives the path to the Db directory where the trig.substitutions file lives.
# The python file combines all of these files into a temporary concatenated file and uses that to create the automatic displays.

gen_trig_edl:
	create_edm_event_msi.py IOC-LR20-LS01trig.substitutions IOC-LR20-LS03trig.substitutions IOC-LR20-LS04trig.substitutions IOC-LR20-LS05trig.substitutions IOC-IN20-LS11trig.substitutions IOC-IN20-LS12trig.substitutions IOC-IN20-LS13trig.substitutions IOC-IN20-LS14trig.substitutions $(ALIGNMENT_DB)/IOC-IN20-AM01trig.substitutions
	create_edm_event_msi.py IOC-LR20-LS02trig.substitutions

