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_RTEMS = sis3302Test

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

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

# sis3302Test.dbd will be made up from these files:
sis3302Test_DBD += base.dbd
sis3302Test_DBD += devIocStats.dbd
sis3302Test_DBD += autosave.dbd
sis3302Test_DBD += caPutLog.dbd
sis3302Test_DBD += asyn.dbd
sis3302Test_DBD += calcSupport.dbd
sis3302Test_DBD += drvSis3302.dbd

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

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

# Support for SIS3302 Waveform Digitizer:
sis3302Test_DBD +=asyn.dbd
sis3302Test_DBD +=drvSis3302.dbd

# ======================================================================
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
sis3302Test_SRCS += sis3302Test_registerRecordDeviceDriver.cpp

ifneq ($(T_A),linuxRT-x86)
 sis3302Test_SRCS_DEFAULT += sis3302TestMain.cpp
endif

sis3302Test_SRCS_vxWorks += -nil-

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

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

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

# Needed to link in autosave support
sis3302Test_LIBS += autosave

# Needed to link caPutLog support
sis3302Test_LIBS += caPutLog

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

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

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

# Support for SIS3302 Waveform Digitizer:
sis3302Test_LIBS += sis3302
sis3302Test_LIBS += asyn
sis3302Test_LIBS += calc
sis3302Test_LIBS += sscan

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

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

ifneq ($(SNCSEQ),)
    # This builds sncExample as a component of sis3302Test
    sis3302Test_SNCFLAGS += +r
    sis3302Test_DBD += sncExample.dbd
    sis3302Test_SRCS += sncExample.stt
    sis3302Test_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

sis3302Test_LIBS += $(EPICS_BASE_IOC_LIBS)

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

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

