TOP=../..

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

#USR_CFLAGS += -DlinuxRT

# ===============================================
# Let's build a debug test
# ===============================================
PROD_IOC_Linux = Debugger
Debugger_SRCS += Debug_Test.c

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

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

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

# evrLab.dbd will be made up from these files:
evrLab_DBD += base.dbd
evrLab_DBD += devIocStats.dbd
evrLab_DBD += autosaveSupport.dbd
evrLab_DBD += caPutLog.dbd

evrLab_DBD += drvUioPciGen.dbd
evrLab_DBD += devBusMapped.dbd
evrLab_DBD += epicspci.dbd
evrLab_DBD += $(CEXP_DBDS)

# Add support for pvlistServer
#evrLab_DBD += pvlistServer.dbd

# The system command is available for all architectures
#evrLab_DBD += system.dbd

# If you have an EVR uncomment the following two lines:
evrLab_DBD += evrSupport.dbd
evrLab_DBD += devMrfEr.dbd

# ======================================================================
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
evrLab_SRCS += evrLab_registerRecordDeviceDriver.cpp

evrLab_SRCS_DEFAULT += evrLabMain.cpp

evrLab_SRCS_vxWorks += -nil-

# ========================================================================
# ========================================================================
# Add locally compiled object code
# For example, subroutines
# ========================================================================
# evrLab_SRCS += file1.c
# evrLab_SRCS += file2.c

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

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

# Needed to link in autosave support
evrLab_LIBS += autosave

# Needed to link caPutLog support
evrLab_LIBS += caPutLog

# Add support for pvlistServer
#evrLab_LIBS += pvlistServer

# ===================================
# Needed to link in the EVR support
# ===================================
evrLab_LIBS += evrSupport
evrLab_LIBS += devMrfEr

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

 ifeq ($(T_A),linuxRT-x86)
  evrLab_LIBS += drvMrf
 endif

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

 ifeq ($(T_A),linuxRT_glibc-x86_64)
  evrLab_LIBS += drvMrf
 endif
 
 ifeq ($(T_A),linux-x86)
  evrLab_LIBS += drvMrf
 endif

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

evrLab_LIBS += drvUioPciGen
evrLab_LIBS += devBusMapped
evrLab_LIBS += epicspci

evrLab_LIBS += $(CEXP_LIBS)

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

# NOTE: To build SNL programs, SNCSEQ must be defined
# in the <top>/configure/RELEASE file

ifneq ($(SNCSEQ),)
    # This builds sncExample as a component of evrLab
    evrLab_SNCFLAGS += +r
    evrLab_DBD += sncExample.dbd
    evrLab_SRCS += sncExample.stt
    evrLab_LIBS += seq pv

    # The following builds sncProgram as a standalone application
  ifneq ($(T_A),linuxRT-x86)
    PROD_HOST += sncProgram
    sncProgram_SNCFLAGS += +m
    sncProgram_SRCS += sncProgram.st
    sncProgram_LIBS += seq pv
    sncProgram_LIBS += $(EPICS_BASE_HOST_LIBS)
  endif
endif

evrLab_LIBS += $(EPICS_BASE_IOC_LIBS)

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

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

