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 += EK1101.template
DB += EL3702.template
DB += EL7041.template

# scondam: 7-Jun-2018: There are three versions of the etherCAT-based motor drive chassis.
#          (1) Booster Tuner Drive in B140 : The production unit is in b140 
#              (a) Coupler module 0: device EK1101 revision 0x120000
#              (b) Analog read back module 1: device EL3702 revision 0x20000
#              (c) Stepper 1  motor Cavity Cell 1 and 5 modules 2 and 3: device EL7041 revision 0x160000
#
#          (2) Booster Tuner Drive in B122 : Spare chassis in test setup in B122
#              (a) Coupler module 0: device EK1100 revision 0x120000
#              (b) Analog read back module 1: device EL3702 revision 0x30000
#              (c) Stepper 1  motor Cavity Cell 1 and 5 modules 2 and 3: device EL7041 revision 0x190000
#
#          (3) Spear Tuner Drive in Bxyz : This is for Spear upgrade and that chassis will need test setup
#              (a) Coupler module 0: device EK1100 revision 
#              (b) Analog read back module Ch1(Cavity A)-Ch2(Cavity B): device EL3702 revision 
#              (c) Analog Read Back module Ch3( Cavity C) -Ch4 (Cavity D) : device EL3702 revision
#              (d) Stepper 1  motor Cavity A with Limit switches. Upper/Lower : device EL3702 revision 
#              (d) Stepper 2  motor Cavity B with Limit switches. Upper/Lower : device EL3702 revision 
#              (d) Stepper 3  motor Cavity C with Limit switches. Upper/Lower : device EL3702 revision 
#              (d) Stepper 4  motor Cavity D with Limit switches. Upper/Lower : device EL3702 revision 
#          (4) LINAC Gun Phase shifter drive in Bxyz : 
#              (a) Coupler module 0: device EK1100 revision 
#              (b) Analog read back module 1: device EL3702 revision
#              (c) Stepper 1 motor Gun Phase Shifter with Limit switches. Upper/Lower: device EL7041 revision

# DB += EK1100_0x120000.template
# DB += EL3702_0x30000.template
# DB += EL7041_0x190000.template

# Install Common databases needed by All IOCs
# ========================================================
# Install databases from iocAdmin package
# These databases support IOC Health and Monitoring
# ========================================================
# SoftIOC
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

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

# Install Database to support asyn:
DB_INSTALLS += $(ASYN)/db/asynRecord.db

# scondam: 03-Nov-2016
# Use "tuner_motor.template" instead of $(MOTOR)/db/basic_asyn_motor.db
# as the later is missing some important macros.
# DB_INSTALLS +=$(MOTOR)/db/basic_asyn_motor.db

# Install Database to support for Booster RF Cavity Cell1 and Cell2 Tuner Motors
DB += tuner_motor.template
DB += soft-ioctuner-boo-rf.db
# Install Database to support for B122 Development Cell1 and Cell2 Tuner Motors
DB += ioctunerdev.db
# Install Database to support for Linac Gun Phase Shifter Motors in dev and in prod
DB += ioclintunerdev.db
DB += soft-ioctuner-gtl-rf.db

# =======================================================================

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

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

