TOP=../..

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

# ================================================
# Build the IOC application
# ================================================
# This will attempt to build an IOC application 
# for every target including the host computer.
PROD_IOC = mpsBSAProcessor

# Use the following for RTEMS Only IOCs
#PROD_IOC_RTEMS = mpsBSAProcessor

# mpsBSAProcessor.dbd will be created and installed
DBD += mpsBSAProcessor.dbd

# mpsBSAProcessor.dbd will be made up from these files:
mpsBSAProcessor_DBD += base.dbd
mpsBSAProcessor_DBD += devIocStats.dbd
mpsBSAProcessor_DBD += autosaveSupport.dbd
mpsBSAProcessor_DBD += caPutLog.dbd
mpsBSAProcessor_DBD += mpsBSAProcessorDBD.dbd
mpsBSAProcessor_DBD += drvPerfMeasure.dbd
mpsBSAProcessor_DBD += $(CEXP_DBDS)

# ================================================================================
# The system command is available for all architectures
# We do not need to use ifdefs.
# The problem with the following is that the last architecture to be built
# will override this.
# ================================================================================
mpsBSAProcessor_DBD += system.dbd

# If you don't have an EVR comment the following two lines:
mpsBSAProcessor_DBD += evrSupport.dbd
mpsBSAProcessor_DBD += devMrfEr.dbd

# ======================================================================
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
mpsBSAProcessor_SRCS += mpsBSAProcessor_registerRecordDeviceDriver.cpp
mpsBSAProcessor_SRCS_DEFAULT += mpsBSAProcessorMain.cpp

# ========================================================================
# ========================================================================
# Add locally compiled object code
# For example, subroutines
# ========================================================================

# =====================================================
# Link in the code from other libraries
# =====================================================
# Needed to link in iocAdmin support
mpsBSAProcessor_LIBS += devIocStats

# Needed to link in autosave support
mpsBSAProcessor_LIBS += autosave

# Needed to link caPutLog support
mpsBSAProcessor_LIBS += caPutLog

# Needed to link cexpsh() support
mpsBSAProcessor_LIBS += $(CEXP_LIBS)



# =============================================
# Begin to link in the EVR support for
# RTEMS, linux, and linuxRT
# If you don't have an EVR, you can comment out 
# the lines below.
# =============================================
 mpsBSAProcessor_LIBS += evrSupport
 mpsBSAProcessor_LIBS += devMrfEr
 mpsBSAProcessor_LIBS += perfMeasure

  ifneq ($(T_A),linuxRT-x86_64)
   ifneq ($(T_A),linuxRT_glibc-x86_64)
      ifneq ($(T_A),linux-x86_64)
	ifneq ($(T_A),linux-x86)
          mpsBSAProcessor_LIBS += mrfVme64x
          mpsBSAProcessor_LIBS += udpComm     
      endif
    endif
   endif
  endif

 ifeq ($(T_A),linuxRT-x86_64)
  mpsBSAProcessor_LIBS += drvMrf
  mpsBSAProcessor_LIBS += udpCommBSD
 endif

 ifeq ($(T_A),linuxRT_glibc-x86_64)
  mpsBSAProcessor_LIBS += drvMrf
  mpsBSAProcessor_LIBS += udpCommBSD
 endif

 ifeq ($(T_A),linux-x86_64)
  mpsBSAProcessor_LIBS += drvMrf
  mpsBSAProcessor_LIBS += udpCommBSD
 endif

 ifeq ($(T_A),linux-x86)
  mpsBSAProcessor_LIBS += drvMrf
  mpsBSAProcessor_LIBS += udpCommBSD
 endif


# =====================================================
# END EVR libraries
# =====================================================

mpsBSAProcessor_LIBS += $(EPICS_BASE_IOC_LIBS)

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

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

