Bluetooth: controller: Cleanup makefiles

Cleanup controller's root makefile and add folder level
makefile to have better control over dependencies.

Also explicitly include folder paths in c files to clearly
depict the dependencies.

Change-id: Iac7b3a86eff11082111049ba48559c74f6c4d3fb
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
This commit is contained in:
Vinayak Chettimada 2017-03-18 07:07:56 +01:00 committed by Johan Hedberg
commit 0efd38885a
13 changed files with 42 additions and 51 deletions

View file

@ -1,17 +1,6 @@
ccflags-$(CONFIG_BLUETOOTH_LL_SW) += -I$(srctree)/subsys/bluetooth/controller/util
ccflags-$(CONFIG_BLUETOOTH_LL_SW) += -I$(srctree)/subsys/bluetooth/controller/hal
ccflags-$(CONFIG_BLUETOOTH_LL_SW) += -I$(srctree)/subsys/bluetooth/controller/ticker
ccflags-$(CONFIG_BLUETOOTH_LL_SW) += -I$(srctree)/subsys/bluetooth/controller/ll_sw
ccflags-$(CONFIG_BLUETOOTH_LL_SW) += -I$(srctree)/subsys/bluetooth/controller/include
obj-$(CONFIG_BLUETOOTH_LL_SW) += util/mem.o
obj-$(CONFIG_BLUETOOTH_LL_SW) += util/memq.o
obj-$(CONFIG_BLUETOOTH_LL_SW) += util/mayfly.o
obj-$(CONFIG_BLUETOOTH_LL_SW) += util/util.o
obj-$(CONFIG_BLUETOOTH_LL_SW) += hal/nrf5/cntr.o
obj-$(CONFIG_BLUETOOTH_LL_SW) += hal/nrf5/rand.o
obj-$(CONFIG_BLUETOOTH_LL_SW) += hal/nrf5/ecb.o
obj-$(CONFIG_BLUETOOTH_LL_SW) += hal/nrf5/radio.o
obj-$(CONFIG_BLUETOOTH_LL_SW) += ticker/ticker.o
obj-$(CONFIG_BLUETOOTH_CONTROLLER) += hci/
obj-$(CONFIG_BLUETOOTH_LL_SW) += util/
obj-$(CONFIG_BLUETOOTH_LL_SW) += hal/
obj-$(CONFIG_BLUETOOTH_LL_SW) += ticker/
obj-$(CONFIG_BLUETOOTH_LL_SW) += ll_sw/
obj-$(CONFIG_BLUETOOTH_CONTROLLER) += hci/hci_driver.o
obj-$(CONFIG_BLUETOOTH_CONTROLLER) += hci/hci.o

View file

@ -0,0 +1 @@
obj-y += nrf5/

View file

@ -0,0 +1,3 @@
ccflags-y += -I$(srctree)/subsys/bluetooth/controller
obj-y += cntr.o ecb.o radio.o rand.o

View file

@ -6,10 +6,10 @@
*/
#include <soc.h>
#include "cntr.h"
#include "hal/cntr.h"
#include <bluetooth/log.h>
#include "debug.h"
#include "hal/debug.h"
#ifndef NRF_RTC
#define NRF_RTC NRF_RTC0

View file

@ -9,12 +9,11 @@
#include <soc.h>
#include <arch/arm/cortex_m/cmsis.h>
#include "mem.h"
#include "ecb.h"
#include "util/mem.h"
#include "hal/ecb.h"
#include <bluetooth/log.h>
#include "debug.h"
#include "hal/debug.h"
struct ecb_param {
uint8_t key[16];

View file

@ -7,10 +7,10 @@
#include <soc.h>
#include <arch/arm/cortex_m/cmsis.h>
#include "mem.h"
#include "pdu.h"
#include "ccm.h"
#include "radio.h"
#include "util/mem.h"
#include "hal/ccm.h"
#include "hal/radio.h"
#include "ll_sw/pdu.h"
#if defined(CONFIG_SOC_SERIES_NRF51X)
#define RADIO_PDU_LEN_MAX (BIT(5) - 1)

View file

@ -7,10 +7,10 @@
#include <soc.h>
#include "rand.h"
#include "hal/rand.h"
#include <bluetooth/log.h>
#include "debug.h"
#include "hal/debug.h"
#define RAND_RESERVED (4)

View file

@ -0,0 +1,4 @@
ccflags-$(CONFIG_BLUETOOTH_LL_SW) += -I$(srctree)/subsys/bluetooth/controller/include
ccflags-$(CONFIG_BLUETOOTH_LL_SW) += -I$(srctree)/subsys/bluetooth/controller
obj-y += hci.o hci_driver.o

View file

@ -18,22 +18,16 @@
#include <misc/byteorder.h>
#include <misc/util.h>
#include "util.h"
#include "mem.h"
#include "ticker.h"
#include "cpu.h"
#include "rand.h"
#include "ecb.h"
#include "ccm.h"
#include "radio.h"
#include "pdu.h"
#include "ctrl.h"
#include "util/util.h"
#include "hal/ecb.h"
#include "ll_sw/pdu.h"
#include "ll_sw/ctrl.h"
#include "ll.h"
#include "hci_internal.h"
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BLUETOOTH_DEBUG_HCI_DRIVER)
#include <bluetooth/log.h>
#include "debug.h"
#include "hal/debug.h"
/* opcode of the HCI command currently being processed. The opcode is stored
* by hci_cmd_handle() and then used during the creation of cmd complete and

View file

@ -1,5 +1,4 @@
ccflags-$(CONFIG_BLUETOOTH_LL_SW) += -I$(srctree)/subsys/bluetooth/controller/include
ccflags-$(CONFIG_BLUETOOTH_LL_SW) += -I$(srctree)/subsys/bluetooth/controller
obj-$(CONFIG_BLUETOOTH_LL_SW) += ctrl.o
obj-$(CONFIG_BLUETOOTH_LL_SW) += ll.o
obj-$(CONFIG_BLUETOOTH_LL_SW) += crypto.o
ccflags-y += -I$(srctree)/subsys/bluetooth/controller/include
ccflags-y += -I$(srctree)/subsys/bluetooth/controller
obj-y += crypto.o ctrl.o ll.o

View file

@ -0,0 +1,3 @@
ccflags-y += -I$(srctree)/subsys/bluetooth/controller
obj-y += ticker.o

View file

@ -6,15 +6,14 @@
*/
#include <stdint.h>
#include <soc.h>
#include "cntr.h"
#include "util/config.h"
#include "hal/cntr.h"
#include "ticker.h"
#include "config.h"
#include <soc.h>
#include <bluetooth/log.h>
#include "debug.h"
#include "hal/debug.h"
/*****************************************************************************
* Defines
@ -1178,8 +1177,7 @@ static inline void ticker_job(struct ticker_instance *instance)
* TODO: decouple it from using work/mayfly in this file and dynamically
* import it.
****************************************************************************/
#include "mayfly.h"
#include "config.h"
#include "util/mayfly.h"
static uint8_t ticker_instance0_caller_id_get(uint8_t user_id)
{

View file

@ -0,0 +1 @@
obj-y += mayfly.o mem.o memq.o util.o