Support #define to overwrite what openthread-config file to use, since Windows does support autoconf. (#578)

This commit is contained in:
Nick Banks 2016-09-13 09:27:11 -07:00 committed by Jonathan Hui
parent ae545bb007
commit 6d2dfa5bb0
12 changed files with 70 additions and 14 deletions

View File

@ -26,9 +26,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <openthread-core-config.h>
#include <openthread.h>
#include <openthread-config.h>
#include <openthread-diag.h>
#include <cli/cli-uart.h>
#include <platform/platform.h>

View File

@ -26,9 +26,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <openthread-core-config.h>
#include <openthread.h>
#include <openthread-config.h>
#include <openthread-diag.h>
#include <common/debug.hpp>
#include <ncp/ncp.h>

View File

@ -31,12 +31,17 @@
* This file implements the CLI interpreter.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <openthread.h>
#include <openthread-config.h>
#include <openthread-diag.h>
#include <commissioning/commissioner.h>
#include <commissioning/joiner.h>

View File

@ -34,9 +34,13 @@
#ifndef CLI_HPP_
#define CLI_HPP_
#include <stdarg.h>
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <stdarg.h>
#include <cli/cli_server.hpp>
#include <net/icmp6.hpp>

View File

@ -31,12 +31,17 @@
* This file implements the CLI interpreter.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <openthread.h>
#include <openthread-config.h>
#include "cli.hpp"
#include "cli_dataset.hpp"

View File

@ -34,7 +34,12 @@
#ifndef OT_MBEDTLS_HPP_
#define OT_MBEDTLS_HPP_
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <mbedtls/memory_buffer_alloc.h>
namespace Thread {

View File

@ -31,9 +31,13 @@
* This file implements the subset of IEEE 802.15.4 primitives required for Thread.
*/
#include <string.h>
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <string.h>
#include <common/code_utils.hpp>
#include <common/debug.hpp>

View File

@ -31,9 +31,13 @@
* This file implements a Commissioner role.
*/
#include <stdio.h>
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <stdio.h>
#include <coap/coap_header.hpp>
#include <common/logging.hpp>

View File

@ -31,11 +31,15 @@
* This file implements the Joiner role.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <assert.h>
#include <stdio.h>
#include <openthread-config.h>
#include <common/code_utils.hpp>
#include <common/encoding.hpp>
#include <common/logging.hpp>

View File

@ -31,8 +31,13 @@
* This file implements the top-level interface to the OpenThread stack.
*/
#include <openthread.h>
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <openthread.h>
#include <common/code_utils.hpp>
#include <common/debug.hpp>
#include <common/logging.hpp>

View File

@ -34,7 +34,12 @@
#ifndef THREAD_NETIF_HPP_
#define THREAD_NETIF_HPP_
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <openthread-types.h>
#include <mac/mac.hpp>

View File

@ -33,8 +33,13 @@
#ifndef NCP_BASE_HPP_
#define NCP_BASE_HPP_
#include <openthread-types.h>
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <openthread-types.h>
#include <common/message.hpp>
#include <common/tasklet.hpp>