Don't define in Makefile things that can be defined in project-conf.h

This commit is contained in:
George Oikonomou 2017-10-07 16:15:02 +01:00
parent 678bff4991
commit 4cc0a8d8bc
24 changed files with 92 additions and 13 deletions

View File

@ -3,5 +3,4 @@ CONTIKI=../..
MODULES += os/net/app-layer/http-socket
CONTIKI_WITH_RPL_LITE = 0
CFLAGS += -DUIP_CONF_TCP=1
include $(CONTIKI)/Makefile.include

View File

@ -0,0 +1,37 @@
/*
* Copyright (c) 2017, George Oikonomou - http://www.spd.gr
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*---------------------------------------------------------------------------*/
#ifndef PROJECT_CONF_H_
#define PROJECT_CONF_H_
/*---------------------------------------------------------------------------*/
#define UIP_CONF_TCP 1
/*---------------------------------------------------------------------------*/
#endif /* PROJECT_CONF_H_ */

View File

@ -1,5 +1,4 @@
all: ip64-router
CONTIKI=../..
CFLAGS += -DUIP_CONF_TCP=1
include $(CONTIKI)/Makefile.include

View File

@ -0,0 +1,37 @@
/*
* Copyright (c) 2017, George Oikonomou - http://www.spd.gr
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*---------------------------------------------------------------------------*/
#ifndef PROJECT_CONF_H_
#define PROJECT_CONF_H_
/*---------------------------------------------------------------------------*/
#define UIP_CONF_TCP 1
/*---------------------------------------------------------------------------*/
#endif /* PROJECT_CONF_H_ */

View File

@ -16,12 +16,10 @@ PROJECT_SOURCEFILES += slip-bridge.c
WITH_WEBSERVER=1
ifeq ($(WITH_WEBSERVER),1)
CFLAGS += -DUIP_CONF_TCP=1
CFLAGS += -DWEBSERVER=1
PROJECT_SOURCEFILES += httpd-simple.c
else ifneq ($(WITH_WEBSERVER), 0)
MODULES += $(WITH_WEBSERVER)
CFLAGS += -DUIP_CONF_TCP=1
CFLAGS += -DWEBSERVER=2
endif

View File

@ -39,4 +39,8 @@
#define WEBSERVER_CONF_CFS_CONNS 2
#endif
#if WEBSERVER
#define UIP_CONF_TCP 1
#endif
#endif /* PROJECT_ROUTER_CONF_H_ */

View File

@ -12,7 +12,6 @@ PROJECTDIRS += .. ../tools
PROJECT_SOURCEFILES += rpl-tools.c
CFLAGS += -DWITH_COAP
CFLAGS += -DUIP_CONF_TCP=0
MODULES += os/net/app-layer/coap
include $(CONTIKI)/Makefile.include

View File

@ -34,6 +34,8 @@
#ifndef __PROJECT_CONF_H__
#define __PROJECT_CONF_H__
#define UIP_CONF_TCP 0
#include "../common-conf.h"
#endif /* __PROJECT_CONF_H__ */

View File

@ -12,7 +12,6 @@ PROJECTDIRS += .. ../tools
PROJECT_SOURCEFILES += rpl-tools.c
CFLAGS += -DWITH_COAP
CFLAGS += -DUIP_CONF_TCP=0
MODULES += os/net/app-layer/coap
include $(CONTIKI)/Makefile.include

View File

@ -34,6 +34,8 @@
#ifndef __PROJECT_CONF_H__
#define __PROJECT_CONF_H__
#define UIP_CONF_TCP 0
#include "../common-conf.h"
#endif /* __PROJECT_CONF_H__ */

View File

@ -12,7 +12,6 @@ PROJECTDIRS += .. ../tools
PROJECT_SOURCEFILES += rpl-tools.c
CFLAGS += -DWITH_COAP
CFLAGS += -DUIP_CONF_TCP=0
MODULES += os/net/app-layer/coap
include $(CONTIKI)/Makefile.include

View File

@ -34,6 +34,8 @@
#ifndef __PROJECT_CONF_H__
#define __PROJECT_CONF_H__
#define UIP_CONF_TCP 0
#include "../common-conf.h"
#endif /* __PROJECT_CONF_H__ */

View File

@ -9,7 +9,6 @@ PROJECTDIRS += .. ../../tools
PROJECT_SOURCEFILES += rpl-tools.c
CFLAGS += -DWITH_COAP
CFLAGS += -DREST=coap_rest_implementation
CFLAGS += -DUIP_CONF_TCP=0
MAKE_MAC = MAKE_MAC_TSCH
MODULES += os/net/app-layer/coap
MODULES += os/services/orchestra os/lib/json

View File

@ -37,6 +37,7 @@
#include "../../common-conf.h"
#define UIP_CONF_TCP 0
#define UART_BAUD_RATE UART_RATE_115200
#endif /* __PROJECT_CONF_H__ */

View File

@ -11,7 +11,6 @@ PROJECT_SOURCEFILES += rpl-tools.c
CFLAGS += -DWITH_COAP
CFLAGS += -DREST=coap_rest_implementation
CFLAGS += -DUIP_CONF_TCP=0
MAKE_MAC = MAKE_MAC_TSCH
MODULES += os/net/app-layer/coap
MODULES += os/services/orchestra os/lib/json

View File

@ -35,6 +35,8 @@
#define UIP_FALLBACK_INTERFACE rpl_interface
#endif
#define UIP_CONF_TCP 0
/* Needed for slip-bridge */
#define SLIP_BRIDGE_CONF_NO_PUTCHAR 0

View File

@ -10,7 +10,6 @@ PROJECT_SOURCEFILES += rpl-tools.c
CFLAGS += -DWITH_COAP
CFLAGS += -DREST=coap_rest_implementation
CFLAGS += -DUIP_CONF_TCP=0
MAKE_MAC = MAKE_MAC_TSCH
MODULES += os/net/app-layer/coap
MODULES += os/services/orchestra os/lib/json

View File

@ -36,6 +36,7 @@
#include "../../common-conf.h"
#define UIP_CONF_TCP 0
#define UART_BAUD_RATE UART_RATE_115200
#endif /* __PROJECT_CONF_H__ */

View File

@ -11,7 +11,6 @@ PROJECTDIRS += .. ../../tools
PROJECT_SOURCEFILES += rpl-tools.c
CFLAGS += -DWITH_COAP
CFLAGS += -DUIP_CONF_TCP=0
MAKE_MAC = MAKE_MAC_TSCH
MODULES += os/net/app-layer/coap
MODULES += os/services/orchestra os/lib/json

View File

@ -40,6 +40,7 @@
#include "../../common-conf.h"
#define UIP_CONF_TCP 0
#define QUEUEBUF_CONF_NUM 16
#define TSCH_QUEUE_CONF_MAX_NEIGHBOR_QUEUES 8

View File

@ -11,7 +11,6 @@ PROJECT_SOURCEFILES += rpl-tools.c
CFLAGS += -DWITH_COAP
CFLAGS += -DREST=coap_rest_implementation
CFLAGS += -DUIP_CONF_TCP=0
MAKE_MAC = MAKE_MAC_TSCH
MODULES += os/net/app-layer/coap
MODULES += os/services/orchestra os/lib/json

View File

@ -36,6 +36,8 @@
#include "../common-conf.h"
#define UIP_CONF_TCP 0
#define UART_BAUD_RATE UART_RATE_115200
#define UART1_BAUD_RATE UART_RATE_115200

View File

@ -6,7 +6,6 @@ CONTIKI = ../../../../..
WITH_IP64 = 1
DEFINES += UIP_CONF_TCP=1
PROJECT_SOURCEFILES += httpd-simple.c
include $(CONTIKI)/Makefile.include

View File

@ -65,6 +65,7 @@
#define UIP_CONF_RECEIVE_WINDOW 128
#define WEBSERVER_CONF_CFS_CONNS 2
#define UIP_CONF_BUFFER_SIZE 900
#define UIP_CONF_TCP 1
#define UIP_CONF_TCP_MSS 128
#endif /* PROJECT_CONF_H_ */