TOP=../..

include $(TOP)/configure/CONFIG
#----------------------------------------
#  ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
# build an ioc application
PROD_IOC_RTEMS = lensctl
PROD_HOST      = ucmSoft

# ucmSoft.dbd will be made up from these files:
DBD          = ucmSoft.dbd
ucmSoft_DBD += base.dbd
ucmSoft_DBD += iocAdmin.dbd
ucmSoft_DBD += autosaveSupport.dbd
ucmSoft_DBD += caPutLog.dbd
ucmSoft_DBD += genSubRecord.dbd


# lensctl.dbd will be made up from these files:
#
ifeq ($(OS_CLASS),RTEMS)
DBD += lensctl.dbd
lensctl_DBD += ucmSoft.dbd
lensctl_DBD += motorSupport.dbd
lensctl_DBD += drvAsynSerialPort.dbd
lensctl_DBD += motorRecord.dbd
lensctl_DBD += drvAsynIPPort.dbd
lensctl_DBD += devSmartMotorMotor.dbd
lensctl_DBD += tyGSOctal.dbd
lensctl_DBD += ip330Support.dbd
lensctl_DBD += ipUnidigSupport.dbd
lensctl_DBD += drvIpac.dbd
lensctl_DBD += genPolySub.dbd
lensctl_DBD += initTrace.dbd
lensctl_DBD += devBusMapped.dbd
endif

# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
lensctl_SRCS  += lensctl_registerRecordDeviceDriver.cpp
ucmSoft_SRCS += ucmSoft_registerRecordDeviceDriver.cpp
USR_SRCS_DEFAULT += lensctlMain.cpp

# Add locally compiled object code
ifeq ($(OS_CLASS),RTEMS)

endif

# The following will get rid of the
# Unresolved symbol: rtemsTicksPerSecond_double
# That occurs at run time.
ifeq ($(OS_CLASS),RTEMS)

# Next, we will provide on our time provider for genralTime:
muon_SRCS += ntpProvider.cc
endif

USR_LIBS  += devIocStats
USR_LIBS  += autosave
USR_LIBS  += caPutLog
USR_LIBS  += genSub
 
# Add in VME drivers.
ifeq ($(OS_CLASS),RTEMS)
lensctl_LIBS += SmartMotor
lensctl_LIBS += motor
lensctl_LIBS += TyGSOctal
lensctl_LIBS += ip330
lensctl_LIBS += ipUnidig
lensctl_LIBS += Ipac
lensctl_LIBS += asyn
lensctl_LIBS += genPolySub
lensctl_LIBS += devBusMapped
endif

# Build SNL programs
# NOTE: to build SLN programs, SNCSEQ must be defined
# in the <top>/configure/RELEASE file
#
ifneq ($(SNCSEQ),)
 USR_SNCFLAGS += +r
 USR SNCFLAGS += -a
 USR_SNCFLAGS += +c
 USR_SNCFLAGS += +d
 USR_LIBS += seq pv
endif

USR_LIBS += $(EPICS_BASE_IOC_LIBS)

#=============================
include $(TOP)/configure/RULES
#----------------------------------------
#  ADD RULES AFTER THIS LINE
#========================================
#
# End of file
