TOP=../..

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

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

LIBRARY_IOC_vxWorks += lensctlSupport

# xxxRecord.h will be created from xxxRecord.dbd
DBDINC += xxxRecord
# Install devXxxSoft.dbd into <top>/dbd
DBD += xxxSupport.dbd

# Compile and add the code to the support library
lensctlSupport_SRCS += xxxRecord.c
lensctlSupport_SRCS += devXxxSoft.c

# Link locally-provided code into the support library,
# rather than directly into the IOC application.
lensctlSupport_SRCS += dbSubExample.c
lensctlSupport_SRCS += lensctlHello.c
lensctlSupport_SRCS += initTrace.c

lensctlSupport_LIBS += $(EPICS_BASE_IOC_LIBS)

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

PROD_IOC_vxWorks = lensctl
# lensctl.dbd will be created and installed
DBD += lensctl.dbd

# lensctl.dbd will be made up from these files:
lensctl_DBD += base.dbd
lensctl_DBD += xxxSupport.dbd
lensctl_DBD += dbSubExample.dbd
lensctl_DBD += lensctlHello.dbd
lensctl_DBD += initTrace.dbd
lensctl_DBD += devA16Vme.dbd


# lensctl_registerRecordDeviceDriver.cpp derives from lensctl.dbd
lensctl_SRCS += lensctl_registerRecordDeviceDriver.cpp

# Build the main IOC entry point on workstation OSs.
lensctl_SRCS_DEFAULT += lensctlMain.cpp
lensctl_SRCS_vxWorks += -nil-

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

# Link in the code from the support library
lensctl_LIBS += lensctlSupport
lensctl_LIBS += a16Vme
lilaser_LIBS += asdstd


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

ifneq ($(SNCSEQ),)
    # Build sncExample into lensctlSupport
    sncExample_SNCFLAGS += +r
    lensctl_DBD += sncExample.dbd
    lensctlSupport_SRCS += sncExample.stt
    lensctlSupport_LIBS += seq pv
    lensctl_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

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

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

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

