TOP=../..

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

# Headers for the Gnu Scientific Library
USR_INCLUDES = -I$(GSL_INC)


#==========================================
# Build the IOC application
# =========================================
PROD_IOC = LLRFHLA

# LLRFHLA.dbd will be created and installed
DBD += LLRFHLA.dbd

# LLRFHLA.dbd will be made up from these files:
LLRFHLA_DBD += base.dbd
LLRFHLA_DBD += initTrace.dbd

# Add iocAdmin database
LLRFHLA_DBD += iocAdmin.dbd
LLRFHLA_DBD += autosaveSupport.dbd

# LLRFHLA_registerRecordDeviceDriver.cpp derives from LLRFHLA.dbd
LLRFHLA_SRCS += LLRFHLA_registerRecordDeviceDriver.cpp
LLRFHLA_SRCS += initTrace.c

# Link locally-provided code
LLRFHLA_SRCS += my_c_routine.c
LLRFHLA_SRCS += MultiParamLinearFit.c
LLRFHLA_SRCS += meaENoload.c
LLRFHLA_SRCS += calibIQMod.c


# Build the main IOC entry point on workstation OSs.
LLRFHLA_SRCS_DEFAULT += LLRFHLAMain.cpp

# Link in the iocAdmin libraries
### LLRFHLA_LIBS += devIocStats

# Link in the Gnu Scientific Library
PROD_SYS_LIBS += gsl gslcblas


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

ifneq ($(SNCSEQ),)
    # Build sncExample into LLRFHLASupport
    sncExample_SNCFLAGS += +r
    LLRFHLA_DBD += sncExample.dbd
    LLRFHLA_SRCS += sncExample.stt
    LLRFHLA_DBD += LLRFHLApplications.dbd
    LLRFHLA_SRCS += LLRFHLApplications.st
    LLRFHLA_LIBS += seq pv
    LLRFHLA_LIBS += devIocStats autosave

    # 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
LLRFHLA_LIBS += $(EPICS_BASE_IOC_LIBS)

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

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

