#==============================================================
#
#  Abs:  build EPICS Database components for the 
#        Personnel Protection System
#
#  Name: Makefile
#
#  Facility: SLAC/LCLS
#
#  Auth: 09-Jan-2007, Arturo Alarcon  (ALARCON)
#  Rev:  dd-mmm-yyyy, First Lastname  (USERNAME)
#--------------------------------------------------------------
#  Mod:
#        14-Sep-2020, K. Luchini      (LUCHINI):
#          install pps-in20-alias.db
#        17-Aug-2020, K. Luchini      (LUCHINI):
#          install sioc-b34-pp03.db
#          install sioc-b34-pp03_bkhf.db
#        19-Dec-2019, K. Luchini      (LUCHINI):
#          install pps-30bsy-secureA.db (for testing only)
#          install pps-30bsy-secureB.db (for testing only)
#          install pps-D2-chainA.db (for testing only)
#          install pps-D2-chainB.db (for testing only)
#        16-Oct-2019, K. Luchini      (LUCHINI):
#          fix order of bsy db install
#        15-Oct-2019, K. Luchini      (LUCHINI):
#          remove install of pps-sum1.template
#          remove install of pps-sum2.template
#          remove install of pps-und-sum3.db
#          remove install of pps-xrt-sum3.db
#          remove install of pps-in20-sum3.db
#          remove install of pps-sys0-bsoic-warning.vdb
#          remove install of pps-sys0-btm-warning.vdg
#          remove install of pps-fee1-instance.db
#          remove install of pps-neh1-instance.db 
#          remove install of pps-acr-instance.db 
#          remove install of pps-in10-instance.db 
#          remove install of pps-linac-instance.db
#          remove install of pps-esa-instance.db
#          remove install of pps-in20-plcstat.db      
#          remove install of pps-in20-sum3.db
#          remove install of warning-summary-w-autobypass.template
#          remove install of warning-summary.template
#          remove install of  bsoic-w-bypass-alarm-summary.template
#          rename pps-linac2425.db t pps-linac24-25.db
#          install pps-linac.db
#          rename ams.db to sioc-bsy0-pp02.db
#        02-Mar-2018, K. Luchini      (LUCHINI):
#          install pps-neh1-bsoic.db
#        01-Mar-2018, K. Luchini      (LUCHINI):
#          move CONFIG_PROTO and CONFIG_SECURITY
#         to configure and add CNF to configure/Makefile
#        21-Sep-2017, K. Luchini      (LUCHINI):
#          add s10 injector db for facet-ii
#        22-Sep-2016, K. Luchini      (LUCHINI):
#          install ca security file into $TOP/db
#          install proto files in $TOP/db
#        15-AUG-2012, Matt Cyterski   (CYTERSKI)
#          Consolidate ppsS7App and ppsApp
#        02-Apr-2009, Kristi Luchini  (LUCHINI):
#          Install pps-und-loopi.db
#        28-Feb-2009, Kristina Turner (KKUBLER):
#          Add neh1 db
#        13-Feb-2007, arturo alarcon   (alarcon)
#          Added plc stat db
#
#===============================================================
#
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
#
# Install databbases from EPICS modules
DB_INSTALLS += $(ASYN)/db/asynRecord.db
DB_INSTALLS += $(IOCADMIN)/db/iocAdminSoft.db
DB_INSTALLS += $(IOCADMIN)/db/iocAdminRTEMS.db
DB_INSTALLS += $(AUTOSAVE)/db/save_restoreStatus.db
IOCRELEASE_DB += iocRelease.db

# Common 
DB += gamma.db

# Facet-ii
DB += pps-in10-alias.db
DB += pps-in10.db

# LCLS
DB += pps-gunb-plc.db
DB += pps-acr.db
DB += pps-in20.db
DB += pps-und.db
DB += pps-fee0.db
DB += pps-neh1-bsoic.db
DB += pps-neh1.db
DB += pps-xrt.db
DB += pps-feh.db
DB += pps-sys0.db
DB += pps-linac26-30.db
DB += pps-linac24-25.db
DB += pps-linac21-23.db
DB += pps-linac.db
DB += pps-bsy-btm.db
DB += pps-bsy-bsoic.db
DB += pps-30bsy-secure_AorB.db
DB += pps-bsy-D2_AorB.db
DB += pps-bsy-D2.db
DB += pps-bsy-ST34_AorB.db
DB += pps-bsy-ST34.db
DB += pps-bsy-clts_AorB.db
DB += pps-bsy-clts.db
DB += pps-bsy.db
DB += pps-ltu0.db
DB += sioc-bsy0-pp02.db
DB += pps-esa.db

# Klystron Test Lab (B44)
DB += pps-b44.db
DB += pps-b44-alias.db

# Development
DB += pps-30bsy_test.db
DB += pps-bsy-D2_test.db
DB += pps-bsy-ST34_test.db
DB += pps-bsy-clts_test.db
DB += pps-tst1.db
DB += pps-bench.db
DB += sioc-tst1-pp01.db
DB += sioc-b34-pp03.db
DB += sioc-b34-pp03_bkhf.db

# Install CA security file
SECURITY += pps.acf

# Install proto file
PROTO += gamma6032.proto
PROTO += gamma.proto
PROTO += hpi_6012.proto

#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
# <anyname>_template = <templatename>
# IPAC_TEMPLATE += $(IPAC)/db/IP330.template

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

