TOP=../..

include $(TOP)/configure/CONFIG


#----------------------------------------
#  ADD MACRO DEFINITIONS AFTER THIS LINE
#========================================


#=====================================================
# Path to "NON EPICS" External PACKAGES: USER INCLUDES
#======================================================
# Support Perl C regular expression library
USR_INCLUDES += -I$(PCRE_INCLUDE)


#======================================================
# PATH TO "NON EPICS" EXTERNAL PACKAGES: USER LIBRARIES
#======================================================
pcre_DIR = $(PCRE_LIB)


# ======================================================
# LINK "NON EPICS" EXTERNAL PACKAGE LIBRARIES STATICALLY
#=======================================================
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_Linux = 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 += asSupport.dbd
chiller_DBD += caPutLog.dbd

chiller_DBD += system.dbd


# streams:
chiller_DBD += asyn.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

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


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

#add a definition for each support application used by this application
-USR_SYS_LIBS += pcre

chiller_LIBS += asyn
chiller_LIBS += stream


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

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

ifneq ($(SNCSEQ),)
    # This builds sncExample as a component of chiller
    chiller_SNCFLAGS += +r
    chiller_DBD += sncExample.dbd
    chiller_SRCS += sncExample.stt
    chiller_LIBS += seq pv

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

chiller_LIBS += $(EPICS_BASE_IOC_LIBS)

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

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

