TOP=../..

include $(TOP)/configure/CONFIG
#----------------------------------------
#  ADD MACRO DEFINITIONS AFTER THIS LINE

#=============================
# Build the IOC support library

LIBRARY_IOC += Keithley_2701Support

Keithley_2701Support_LIBS += $(EPICS_BASE_IOC_LIBS)

#=============================
# Build the IOC application

PROD_IOC = Keithley_2701
# Keithley_2701.dbd will be created and installed
DBD += Keithley_2701.dbd

# Keithley_2701.dbd will be made up from these files:
Keithley_2701_DBD += base.dbd
Keithley_2701_DBD += drvAsynIPPort.dbd

# Keithley_2701_registerRecordDeviceDriver.cpp derives from Keithley_2701.dbd
Keithley_2701_SRCS += Keithley_2701_registerRecordDeviceDriver.cpp

# Build the main IOC entry point on workstation OSs.
Keithley_2701_SRCS_DEFAULT += Keithley_2701Main.cpp
Keithley_2701_SRCS_vxWorks += -nil-

# Add support from base/src/vxWorks if needed
#Keithley_2701_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary

# Link in the code from the support library
Keithley_2701_LIBS += Keithley_2701Support

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

ifneq ($(SNCSEQ),)
    # Build sncExample into Keithley_2701Support
    sncExample_SNCFLAGS += +r
    Keithley_2701_DBD += sncExample.dbd
    Keithley_2701Support_SRCS += sncExample.stt
    Keithley_2701Support_LIBS += seq pv
    Keithley_2701_LIBS += seq pv

    # Build sncProgram as a standalone program
    PROD_HOST += sncProgram
    sncProgram_SNCFLAGS += +m
    sncProgram_SRCS += sncProgram.st
    sncProgram_LIBS += seq pv
    sncProgram_LIBS += $(EPICS_BASE_HOST_LIBS)
endif

ifneq ($(ASYN),)
    Keithley_2701_DBD += asyn.dbd
    Keithley_2701_DBD += drvAsynIPPort.dbd              # IP Port Driver
#    Keithley_2701_DBD += drvAsynSerialPort.dbd  # Serial Port Driver
    Keithley_2701_LIBS += asyn

    ifneq ($(STREAM),)
        Keithley_2701_DBD += aaiRecord.dbd
        Keithley_2701_DBD += aaoRecord.dbd
        Keithley_2701_DBD += stream.dbd
        Keithley_2701_LIBS += stream
    endif
endif


# Finally link to the EPICS Base libraries
Keithley_2701_LIBS += $(EPICS_BASE_IOC_LIBS)

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

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

