TOP=../..

include $(TOP)/configure/CONFIG

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

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

ifeq ($(T_A),RTEMS-uC5282)

LIBRARY_IOC_RTEMS += bpmPadSupport genPadSupport

# install driver header
INC += drvPad.h drvPadBpm.h

# The following are compiled and added to the Support library
bpmPadSupport_SRCS += devWfPadBpm.c
genPadSupport_SRCS += devWfPadBpm.c

bpmPadSupport_SRCS += drvPadAfeQspi.c
bpmPadSupport_SRCS += subPadDetect.c

genPadSupport_SRCS += drvPadNoAfe.c

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

PROD_IOC_RTEMS = bpmPadApp genPadApp
# example.dbd will be created and installed
DBD += bpmPadApp.dbd genPadApp.dbd

# example.dbd will be made up from these files:
bpmPadApp_DBD += base.dbd
genPadApp_DBD += base.dbd
ifndef TEST_ONLY
bpmPadApp_DBD += iocAdmin.dbd
genPadApp_DBD += iocAdmin.dbd
endif
bpmPadApp_DBD += bpmPadSupport.dbd
bpmPadApp_DBD += afeAttSupport.dbd
genPadApp_DBD += genPadSupport.dbd

bpmPadApp_DBD += fcomUtil.dbd
genPadApp_DBD += fcomUtil.dbd

# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
bpmPadApp_SRCS += bpmPadApp_registerRecordDeviceDriver.cpp
genPadApp_SRCS += genPadApp_registerRecordDeviceDriver.cpp

# Add locally compiled object code

ifndef TEST_ONLY
bpmPadApp_LIBS += devIocStats
genPadApp_LIBS += devIocStats
endif
bpmPadApp_LIBS += bpmPadSupport devBusMapped padSupport udpComm fcomUtil afeAttSupportLib
genPadApp_LIBS += genPadSupport padSupport udpComm fcomUtil 
bpmPadApp_LIBS += $(EPICS_BASE_IOC_LIBS)
genPadApp_LIBS += $(EPICS_BASE_IOC_LIBS)

endif
#===========================

include $(TOP)/configure/RULES
#----------------------------------------
#  ADD RULES AFTER THIS LINE
hubba:
	echo $(CROSS_LDFLAGS)
