# Filename: Makefile
#
# This file is the makefile for building PORT example app.
#
#   Copyright (c) 2023 Texas Instruments Incorporated
#
#   All rights reserved. Property of Texas Instruments Incorporated.
#   Restricted rights to use, duplicate or disclose this code are
#   granted through contract.
#
#   The program may not be used without the written permission
#   of Texas Instruments Incorporated or against the terms and conditions
#   stipulated in the agreement under which this program has been
#   supplied.
#******************************************************************************

APP_NAME = port_app

SRCDIR = . ../Utils ../Utils/$(COMPILER)
SRCDIR += $(autosarConfigSrc_PATH)/Dio_Demo_Cfg/soc/$(SOC)/$(CORE)/src 
SRCDIR += $(autosarConfigSrc_PATH)/Port_Demo_Cfg/soc/$(SOC)/$(CORE)/src
SRCDIR += $(autosarConfigSrc_PATH)/Mcu_Demo_Cfg/soc/$(SOC)/$(CORE)/src
INCDIR = .
INCDIR += $(autosarConfigSrc_PATH)/Port_Demo_Cfg/soc/$(SOC)/$(CORE)/include

# List all the external components/interfaces, whose interface header files
# need to be included for this component
INCLUDE_EXTERNAL_INTERFACES = autoSARBSW autosarConfig dio mcu port app_utils

INCLUDE_INTERNAL_INTERFACES = portAppPriv
portAppPriv_INCLUDE =  $(mcal_PATH)/include $(mcal_PATH)/include/hw/$(SOCFAMILY) $(mcal_PATH)/include/hw

# List all the components required by the application
COMP_LIST_COMMON  =  dio mcu port app_utils

# Common source files and CFLAGS across all platforms and cores
SRCS_COMMON = portApp.c
SRCS_COMMON +=Dio_Cfg.c Dio_Lcfg.c Port_PBcfg.c Mcu_PBcfg.c Mcu_Cfg.c Port_Cfg.c
SRCS_COMMON += Dem.c
SRCS_COMMON += Det.c
SRCS_ASM_COMMON += sys_startup.asm sys_intvecs.asm

CFLAGS_LOCAL_COMMON = $(MCAL_CFLAGS) -D$(SOCFAMILY)

LNKCMD_FILE = ../lnk_r5_$(SOCFAMILY)_$(COMPILER).cmd


# Include common make files
ifeq ($(MAKERULEDIR), )
#Makerule path not defined, define this and assume relative path from ROOTDIR
  MAKERULEDIR := $(ROOTDIR)/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
