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

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

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

# QtWidgetSim.dbd will be made up from these files:
QtWidgetSim_DBD += base.dbd
QtWidgetSim_DBD += devIocStats.dbd
QtWidgetSim_DBD += autosaveSupport.dbd
QtWidgetSim_DBD += caPutLog.dbd
QtWidgetSim_DBD += $(CEXP_DBDS)

# =======================================================================
# The system command will be mainly used by linux hosted IOCs
# Very useful for changing kernel thread priorities for kernel drivers
# or just escaping out to the linux system to execute a command line
# program such as "ls"
# =======================================================================
QtWidgetSim_DBD += system.dbd

# ======================================================================
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
# ======================================================================
QtWidgetSim_SRCS += QtWidgetSim_registerRecordDeviceDriver.cpp

# ======================================================
# This will build the main EPICS IOC Shell
# ======================================================
QtWidgetSim_SRCS_DEFAULT += QtWidgetSimMain.cpp


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

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

# Needed to link in autosave support
QtWidgetSim_LIBS += autosave

# Needed to link caPutLog support
QtWidgetSim_LIBS += caPutLog

# Needed to link cexpsh() support
QtWidgetSim_LIBS += $(CEXP_LIBS)

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

ifneq ($(SNCSEQ),)
    # This builds sncExample as a component of QtWidgetSim
    QtWidgetSim_SNCFLAGS += +r
    QtWidgetSim_DBD += sncExample.dbd
    QtWidgetSim_SRCS += sncExample.stt
    QtWidgetSim_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

QtWidgetSim_LIBS += $(EPICS_BASE_IOC_LIBS)

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

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

