TOP=../..

include $(TOP)/configure/CONFIG

CROSS_COMPILER_TARGET_ARCHS=RTEMS-beatnik
#----------------------------------------

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

#==================================================
# Build an IOC support library

# Comment this line to build a host-ioc; you'd need to exclude
# several facilities (evr, micro, ...) for this to work.
BUILDFOR=_RTEMS

USR_CPPFLAGS         = -DVAR=value -Ddefine_for_all_systems

LIBRARY_IOC_RTEMS += vmeDigi
LIBRARY_IOC_RTEMS  += vmeDigiDevSup

# The following are compiled and added to the Support library
vmeDigi_SRCS += vme64x.c vmeDigi.c
vmeDigiDevSup_SRCS += devVmeDigiSupport.c devWfVmeDigi.c

#=============================
# build an ioc application

PROD_IOC_RTEMS += vmeDigiApp
PROD_IOC_RTEMS += vmeDigiDevSupMod

# create a fake library containing dependecies of vmeDigiDevSupMod
LIB_INSTALLS_RTEMS += libvmeDigiDevSupMod-symdeps.a

# vmeDigi.dbd will be created and installed
DBD += vmeDigiApp.dbd
DBD += vmeDigiSupport.dbd
DBD += waveformTest.dbd

# vmeDigi.dbd will be made up from these files:
vmeDigiApp_DBD += base.dbd
vmeDigiApp_DBD  += vmeDigiSupport.dbd
vmeDigiApp_DBD  += devBusMapped.dbd
vmeDigiApp_DBD  += waveformTest.dbd

vmeDigiDevSupMod_SRCS = vmeDigiSupport_registerRecordDeviceDriver.cpp
vmeDigiDevSupMod_SRCS+= $(vmeDigiDevSup_SRCS)

#waveformTest_SRCS += waveformTest_registerRecordDeviceDriver.cpp
#waveformTest_SRCS_DEFAULT += waveSubs.c

# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
vmeDigiApp_SRCS += vmeDigiApp_registerRecordDeviceDriver.cpp
vmeDigiApp_SRCS_DEFAULT += waveSubs.c epicsFFT.cpp vmeDigiMain.cpp

vmeDigiApp_LIBS += waveProc
vmeDigiApp_LIBS += vmeDigiDevSup
vmeDigiApp_LIBS += vmeDigi
vmeDigiApp_LIBS += devBusMapped
vmeDigiApp_LIBS += $(EPICS_BASE_IOC_LIBS)

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

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

