#=============================================================
#
#  Abs: Build EPICS IOC Application object and db
# 
#  Name: Makefile to install Restore Files 
#
#  Facility: High Power RF
#
#  Auth: 09-Apr-2010, Author's Name   (USERNAME)
#  Rev:  dd-mmm-yyyy, First Lastname  (USERNAME)
#--------------------------------------------------------------
#  Mod:
#        21-Aug-2014, K. Luchini      (LUCHINI):
#          Remove EPICS_V4, tdsSup, sncTds3x.dbd, 
#          and drvVxi11.dbd
#        21-Aug-2014, K. Luchini      (LUCHINI):
#          Add EPICS_V4 
#
#==============================================================
#
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
#  ADD MACRO DEFINITIONS AFTER THIS LINE
#=========================================
#
# Support Perl C regular expression library
USR_INCLUDES += -I$(PCRE_INCLUDE)
pcre_DIR = $(PCRE_LIB)
USR_LIBS_Linux += pcre

# Build an object
PROD_IOC = HighPowerRF
# Build a library for Klystron IOCs
LIBRARY_IOC = HPRFLib

# Generate and install the database
DBD += HighPowerRF.dbd
DBD += HPRFLib.dbd

# The dbd file will be made up from these files:
HighPowerRF_DBD += base.dbd
HighPowerRF_DBD += iocAdmin.dbd
HighPowerRF_DBD += asSupport.dbd
HighPowerRF_DBD += system.dbd

# Ether-ip
HighPowerRF_DBD += ether_ip.dbd

# ps Subroutine functions
HighPowerRF_DBD += kly_sub.dbd
HPRFLib_DBD += kly_sub.dbd

# Stream
HighPowerRF_DBD += asyn.dbd
HighPowerRF_DBD += stream.dbd
HighPowerRF_DBD += drvAsynIPPort.dbd

# For gdb debug flags
USR_CFLAGS_DEFAULT += -DHOST_TEST -g
USR_CFLAGS         += -DDEBUG_PRINT

# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
HighPowerRF_SRCS         += HighPowerRF_registerRecordDeviceDriver.cpp
HighPowerRF_SRCS_DEFAULT += HighPowerRFMain.cpp
HighPowerRF_SRCS_vxWorks += -nil-
HighPowerRF_SRCS_RTEMS   += -nil-

USR_SRCS += kly_sub.c

# The following adds support from base/src/vxWorks
HighPowerRF_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary

# Add in device support libraries
HighPowerRF_LIBS += devIocStats
HighPowerRF_LIBS += ether_ip
HighPowerRF_LIBS += autosave

# The order matters.
HighPowerRF_LIBS += stream
HighPowerRF_LIBS += asyn

# Build SNL programs
# NOTE: to build SLN programs, SNCSEQ must be defined
# in the <top>/configure/RELEASE file
#
ifneq ($(SNCSEQ),)
 USR_SNCFLAGS  += +r
 USR_SNCFLAGS  += -a
 USR_SNCFLAGS  += +c
 USR_SNCFLAGS  += +d
 USR_SRCS      += ModulatorRamp.st
 HighPowerRF_DBD  += ModulatorRamp.dbd
 HPRFLib_DBD   += ModulatorRamp.dbd
 USR_LIBS      += seq pv
endif

HighPowerRF_LIBS += $(EPICS_BASE_IOC_LIBS)

#========================================
include $(TOP)/configure/RULES
#----------------------------------------
#  ADD RULES AFTER THIS LINE
#========================================
#
# End of file


