Skip to content

Commit b2b7b50

Browse files
committed
Conditionally compile mesh files.
1 parent 33d36dc commit b2b7b50

29 files changed

+124
-0
lines changed

src/nimble/nimble/host/mesh/src/access.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*/
88

99
#include "nimble/porting/nimble/include/syscfg/syscfg.h"
10+
#if MYNEWT_VAL(BLE_MESH)
11+
1012
#define MESH_LOG_MODULE BLE_MESH_ACCESS_LOG
1113

1214
#include <errno.h>
@@ -1311,3 +1313,5 @@ void bt_mesh_access_init(void)
13111313
"Failed to register bt_mesh_access conf");
13121314
#endif
13131315
}
1316+
1317+
#endif /* MYNEWT_VAL(BLE_MESH) */

src/nimble/nimble/host/mesh/src/adv.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
*/
99

1010
#include "nimble/porting/nimble/include/syscfg/syscfg.h"
11+
#if MYNEWT_VAL(BLE_MESH)
12+
1113
#define MESH_LOG_MODULE BLE_MESH_ADV_LOG
1214

1315
#include "nimble/nimble/host/mesh/include/mesh/mesh.h"
@@ -255,3 +257,5 @@ int bt_mesh_scan_disable(void)
255257

256258
return 0;
257259
}
260+
261+
#endif /* MYNEWT_VAL(BLE_MESH) */

src/nimble/nimble/host/mesh/src/adv_legacy.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
* SPDX-License-Identifier: Apache-2.0
88
*/
99

10+
#include "nimble/porting/nimble/include/syscfg/syscfg.h"
11+
#if MYNEWT_VAL(BLE_MESH)
12+
1013
#define MESH_LOG_MODULE BLE_MESH_ADV_LOG
1114

1215
#include "adv.h"
@@ -250,3 +253,5 @@ int bt_mesh_adv_start(const struct ble_gap_adv_params *param, int32_t duration,
250253
return bt_le_adv_start(param, ad, ad_len, sd, sd_len);
251254
}
252255
#endif
256+
257+
#endif /* MYNEWT_VAL(BLE_MESH) */

src/nimble/nimble/host/mesh/src/aes-ccm.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
* SPDX-License-Identifier: Apache-2.0
66
*/
77

8+
#include "nimble/porting/nimble/include/syscfg/syscfg.h"
9+
#if MYNEWT_VAL(BLE_MESH)
10+
811
#include "crypto.h"
912
#define MESH_LOG_MODULE BLE_MESH_LOG
1013

@@ -222,3 +225,5 @@ int bt_ccm_encrypt(const uint8_t key[16], uint8_t nonce[13], const uint8_t *msg,
222225

223226
return 0;
224227
}
228+
229+
#endif /* MYNEWT_VAL(BLE_MESH) */

src/nimble/nimble/host/mesh/src/app_keys.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
* SPDX-License-Identifier: Apache-2.0
66
*/
77

8+
#include "nimble/porting/nimble/include/syscfg/syscfg.h"
9+
#if MYNEWT_VAL(BLE_MESH)
10+
811
#include <string.h>
912
#include <stdlib.h>
1013
#include "nimble/nimble/host/mesh/include/mesh/mesh.h"
@@ -715,3 +718,5 @@ void bt_mesh_app_key_init(void)
715718
"Failed to register bt_mesh_app_key conf");
716719
#endif
717720
}
721+
722+
#endif /* MYNEWT_VAL(BLE_MESH) */

src/nimble/nimble/host/mesh/src/beacon.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*/
88

99
#include "nimble/porting/nimble/include/syscfg/syscfg.h"
10+
#if MYNEWT_VAL(BLE_MESH)
11+
1012
#define MESH_LOG_MODULE BLE_MESH_BEACON_LOG
1113

1214
#include <errno.h>
@@ -470,3 +472,5 @@ void bt_mesh_beacon_disable(void)
470472
(void)k_work_cancel_delayable(&beacon_timer);
471473
}
472474
}
475+
476+
#endif /* MYNEWT_VAL(BLE_MESH) */

src/nimble/nimble/host/mesh/src/cdb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
#include "nimble/porting/nimble/include/syscfg/syscfg.h"
8+
#if MYNEWT_VAL(BLE_MESH)
9+
710
#define MESH_LOG_MODULE BLE_MESH_LOG
811
#include "nimble/porting/nimble/include/log/log.h"
912
#include <stdlib.h>
@@ -1140,3 +1143,5 @@ void bt_mesh_cdb_init(void)
11401143
#endif
11411144
}
11421145
#endif
1146+
1147+
#endif /* MYNEWT_VAL(BLE_MESH) */

src/nimble/nimble/host/mesh/src/cfg.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
#include "nimble/porting/nimble/include/syscfg/syscfg.h"
8+
#if MYNEWT_VAL(BLE_MESH)
9+
710
#include "nimble/nimble/host/mesh/include/mesh/mesh.h"
811
#include "mesh_priv.h"
912
#include "net.h"
@@ -386,3 +389,5 @@ void bt_mesh_cfg_default_set(void)
386389
atomic_set_bit(bt_mesh.flags, BT_MESH_FRIEND);
387390
}
388391
}
392+
393+
#endif /* MYNEWT_VAL(BLE_MESH) */

src/nimble/nimble/host/mesh/src/cfg_srv.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*/
88

99
#include "nimble/porting/nimble/include/syscfg/syscfg.h"
10+
#if MYNEWT_VAL(BLE_MESH)
11+
1012
#define MESH_LOG_MODULE BLE_MESH_MODEL_LOG
1113

1214
#include <string.h>
@@ -2643,3 +2645,5 @@ void bt_mesh_model_reset(void)
26432645
{
26442646
bt_mesh_model_foreach(mod_reset, NULL);
26452647
}
2648+
2649+
#endif /* MYNEWT_VAL(BLE_MESH) */

src/nimble/nimble/host/mesh/src/crypto.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*/
88

99
#include "nimble/porting/nimble/include/syscfg/syscfg.h"
10+
#if MYNEWT_VAL(BLE_MESH)
11+
1012
#define MESH_LOG_MODULE BLE_MESH_CRYPTO_LOG
1113

1214
#include <string.h>
@@ -603,3 +605,5 @@ int bt_mesh_beacon_auth(const uint8_t beacon_key[16], uint8_t flags,
603605

604606
return err;
605607
}
608+
609+
#endif /* MYNEWT_VAL(BLE_MESH) */

0 commit comments

Comments
 (0)