1# Copyright 2018 Oticon A/S 2# Copyright 2023 Nordic Semiconductor ASA 3# SPDX-License-Identifier: Apache-2.0 4 5include make_inc/pre.mk 6 7HW_SRCS_FILE=make_inc/5340_hw_files 8HAL_NET_SRCS_FILE=make_inc/5340_net_hal_files 9HAL_APP_SRCS_FILE=make_inc/5340_app_hal_files 10 11SRCS_HW=$(shell cat ${HW_SRCS_FILE}) 12SRCS_HAL_NET=$(shell cat ${HAL_NET_SRCS_FILE}) 13SRCS_HAL_APP=$(shell cat ${HAL_APP_SRCS_FILE}) 14 15ifneq (,$(findstring hal_net,$(MAKECMDGOALS))) 16 SRCS:=${SRCS_HAL_NET} 17 LIB_VARIANT:=_hal_net 18 HAL_VARIANT=NRF5340_XXAA_NETWORK 19else ifneq (,$(findstring hal_app,$(MAKECMDGOALS))) 20 SRCS:=${SRCS_HAL_APP} 21 LIB_VARIANT:=_hal_app 22 HAL_VARIANT=NRF5340_XXAA_APPLICATION 23else #hw 24 SRCS:=${SRCS_HW} 25 LIB_VARIANT:= 26 HAL_VARIANT=NRF5340_XXAA_NETWORK 27endif 28VARIANT=NRF5340${LIB_VARIANT} 29 30hw: all 31hal_net: all 32hal_app: all 33 34INCLUDES:=-I${NATIVE_SIM_PATH}/common/src/include/ \ 35 -I${NATIVE_SIM_PATH}/common/src/ \ 36 -I${libUtilv1_COMP_PATH}/src/ \ 37 -I${libPhyComv1_COMP_PATH}/src/ \ 38 -I${2G4_libPhyComv1_COMP_PATH}/src \ 39 -I${libRandv2_COMP_PATH}/src/ \ 40 -Isrc/nrfx/mdk_replacements \ 41 -Isrc/HW_models/ \ 42 -Isrc/nrfx_config \ 43 -Isrc/nrfx/nrfx_replacements \ 44 -I${NRFX_BASE} \ 45 -I${NRFX_BASE}/mdk 46 47NRF_HW_MODELS_LIB_SUFFIX?= 48LIB_NAME=libnRF_hw_models.${VARIANT}.32${NRF_HW_MODELS_LIB_SUFFIX} 49A_LIBS:= 50A_LIBS32:= 51SO_LIBS:= 52DEBUG:=-g 53OPT:= 54ARCH:=-m32 55WARNINGS:=-Wall -Wpedantic 56COVERAGE:= 57CFLAGS=${ARCH} ${DEBUG} ${OPT} ${WARNINGS} -MMD -MP -std=gnu11 \ 58 ${INCLUDES} -fdata-sections -ffunction-sections \ 59 -DNRF5340 -D_XOPEN_SOURCE=500 -D${HAL_VARIANT} 60LDFLAGS:=${ARCH} ${COVERAGE} 61CPPFLAGS:= 62 63include make_inc/common_post.mk 64 65.PHONY: hw hal_net hal_app 66 67# Let's explicitly tell make there is rule to make this file 685340.mk: ; 69