TOP=../..

include $(TOP)/configure/CONFIG

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

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

ifeq ($(T_A),RTEMS-uC5282)

# genPadSupport comprises of standard source files common to all PAD applications
LIBRARY_IOC_RTEMS += genPadSupport

# llrfPadSupport comprises of LLRF application-specific source files for LLRF PADs.
LIBRARY_IOC_RTEMS += llrfPadSupport

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

# The following are compiled and added to the Support library
# These are standard, common PAD source files
genPadSupport_SRCS += devWfPadBpm.c
genPadSupport_SRCS += drvPadNoAfe.c

# These are LLRF app-specific source files
llrfPadSupport_SRCS += drvPadQspi.c
llrfPadSupport_SRCS += devAiPadQspi.c
llrfPadSupport_SRCS += devLonginPad.c
#=============================
# build an ioc application

PROD_IOC_RTEMS = genPadApp

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

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

genPadApp_DBD += fcomUtil.dbd

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

# Add locally compiled object code

ifndef TEST_ONLY
genPadApp_LIBS += devIocStats
endif
genPadApp_LIBS += autosave
genPadApp_LIBS += llrfPadSupport devBusMapped 
genPadApp_LIBS += genPadSupport padSupport udpComm fcomUtil 

genPadApp_LIBS += $(EPICS_BASE_IOC_LIBS)

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

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