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 = ip330Test

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

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

# ip330Test.dbd will be made up from these files:
ip330Test_DBD += base.dbd
ip330Test_DBD += devIocStats.dbd
ip330Test_DBD += autosave.dbd
ip330Test_DBD += caPutLog.dbd
ip330Test_DBD += asyn.dbd
ip330Test_DBD += drvIpac.dbd
ip330Test_DBD += ip330Support.dbd

ifeq ($(T_A),linuxRT-x86)
 ip330Test_DBD += systemCommand.dbd
endif

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

# ======================================================================
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
ip330Test_SRCS += ip330Test_registerRecordDeviceDriver.cpp

ifneq ($(T_A),linuxRT-x86)
 ip330Test_SRCS_DEFAULT += ip330TestMain.cpp
endif

ip330Test_SRCS_vxWorks += -nil-

ifeq ($(T_A),linuxRT-x86)
ip330Test_SRCS_DEFAULT += ip330TestlinuxRT_Main_.cpp
ip330Test_SRCS += systemCommand.c
endif
# ========================================================================
# ========================================================================
# Add locally compiled object code
# For example, subroutines
# ========================================================================
# ip330Test_SRCS += file1.c
# ip330Test_SRCS += file2.c

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

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

# Needed to link in autosave support
ip330Test_LIBS += autosave

# Needed to link caPutLog support
ip330Test_LIBS += caPutLog

ip330Test_LIBS += asyn
ip330Test_LIBS += Ipac 
ip330Test_LIBS += ip330

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

# ifneq ($(T_A),linuxRT-x86)
#   ifneq ($(T_A),linux-x86)
#       ip330Test_LIBS += mrfVme64x
#   endif
# endif

# ifeq ($(T_A),linuxRT-x86)
#  ip330Test_LIBS += drvMrf
#  ip330Test_LIBS += mrfApi
# endif
 
# ifeq ($(T_A),linux-x86)
#  ip330Test_LIBS += drvMrf
#  ip330Test_LIBS += mrfApi
# endif



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

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

ifneq ($(SNCSEQ),)
    # This builds sncExample as a component of ip330Test
    ip330Test_SNCFLAGS += +r
    ip330Test_DBD += sncExample.dbd
    ip330Test_SRCS += sncExample.stt
    ip330Test_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

ip330Test_LIBS += $(EPICS_BASE_IOC_LIBS)

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

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

