#
# This file is the makefile for building IPC driver library.
#
ifeq ($(RULES_MAKE), )
include $(PDK_INSTALL_PATH)/ti/build/Rules.make
else
include $(RULES_MAKE)
endif

MODULE_NAME = ipc_baremetal

SRCDIR = src
ifeq ($(SOC),$(filter $(SOC), am65xx))
  SRCDIR += soc/V0
endif
ifeq ($(SOC),$(filter $(SOC), j721e j7200))
  SRCDIR += soc/V1
endif
INCDIR =

#$(ECHO) $(ISA)

# List all the external components/interfaces, whose interface header files
# need to be included for this component
INCLUDE_EXTERNAL_INTERFACES = pdk osal_nonos csl_init

# Common source files and CFLAGS across all platforms and cores
SRCS_COMMON += ipc_api.c ipc_mp.c ipc_soc.c ipc_virtio.c
SRCS_COMMON += ipc_mailbox.c ipc_utils.c

PACKAGE_SRCS_COMMON = ipc.h ipc_component.mk makefile .gitignore include $(SRCDIR)
PACKAGE_SRCS_COMMON += soc/ipc_soc.h
PACKAGE_SRCS_COMMON += config_mk.bld ipcver.h
CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) $(IPC_CFLAGS) -DIPC_EXCLUDE_CTRL_TASKS -DIPC_EXCLUDE_POLLED_RX -DIPC_EXCLUDE_INTERRUPT_REG -DIPC_EXCLUDE_BLOCKING_RX -DIPC_EXCLUDE_INIT_PARAMS_INIT -DIPC_ONE_CONTEXT_FOR_HISRGATE_HWIGATE

# Core/SoC/platform specific source files and CFLAGS
# Example:
#   SRCS_<core/SoC/platform-name> =
#   CFLAGS_LOCAL_<core/SoC/platform-name> =

# Include common make files
ifeq ($(MAKERULEDIR), )
#Makerule path not defined, define this and assume relative path from ROOTDIR
  MAKERULEDIR := $(ROOTDIR)/ti/build/makerules
  export MAKERULEDIR
endif
include $(MAKERULEDIR)/common.mk

# OBJs and libraries are built by using rule defined in rules_<target>.mk
#     and need not be explicitly specified here

# Nothing beyond this point
