TOP=../..

include $(TOP)/configure/CONFIG
ifneq ($(T_A),RTEMS-uC5282)
ifneq ($(T_A),RTEMS-beatnik)

# Build for all targets except RTEMS
#----------------------------------------
#  ADD MACRO DEFINITIONS AFTER THIS LINE
#========================================
# =====================================================
# Path to "NON EPICS" External PACKAGES: USER INCLUDES
# ======================================================
# Support Perl C regular expression library
# Used by streamdevice

PCRE_INCLUDE += -I/usr/include

ifeq ($(T_A),linux-x86)
    PCRE_LIB += /usr/lib
else
    ifeq ($(T_A),linux-x86_64)
        PCRE_LIB += /usr/lib64
    endif
endif

USR_INCLUDES += $(PCRE_INCLUDE)
LIB_LIBS_Linux    +=  pcre
pcre_DIR          = $(PCRE_LIB)

# =====================================
# LINK "NON EPICS" EXTERNAL PACKAGE LIBRARIES STATICALLY
# =======================================================
# Used by streamdevice
#USR_LIBS_Linux += pcre
# ================================================
# Build the IOC application
# ================================================
# This will attempt to build an IOC application 
# for every target including the host computer.
PROD_IOC = chiller

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

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

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

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

# streams:
chiller_DBD += asyn.dbd
chiller_DBD += asynRecord.dbd
chiller_DBD += stream.dbd
chiller_DBD += drvAsynIPPort.dbd
chiller_DBD += drvVxi11.dbd
chiller_DBD += drvAsynSerialPort.dbd

# ======================================================================
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
chiller_SRCS += chiller_registerRecordDeviceDriver.cpp
chiller_SRCS_DEFAULT += chillerMain.cpp
chiller_SRCS_vxWorks += -nil-

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

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

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

# Needed to link in autosave support
chiller_LIBS += autosave

# Needed to link caPutLog support
chiller_LIBS += caPutLog

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

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

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

#add a definition for each support application used by this application


chiller_LIBS += asyn
chiller_LIBS += stream
# =====================================================

chiller_LIBS += $(EPICS_BASE_IOC_LIBS)

#===========================
endif
endif

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

