From a06cf93e4cd83269c5eabd09f24237f224cdab0b Mon Sep 17 00:00:00 2001 From: Adam Dunkels Date: Mon, 5 Sep 2011 11:46:15 +0200 Subject: [PATCH] Made the sky and z1 platform handling of PROJECT_CONF_H the same as the other platforms: the makefile should define PROJECT_CONF_H to be the name of the header file to include. This header file should #undef everything it #defines, as it is included after all the other configuration options in contiki-conf.h --- examples/ipv6/sky-websense/Makefile | 2 +- examples/z1/ipv6/z1-websense/Makefile | 2 +- platform/sky/contiki-conf.h | 10 ++++++---- platform/z1/contiki-conf.h | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/examples/ipv6/sky-websense/Makefile b/examples/ipv6/sky-websense/Makefile index 9030b290d..6be80c822 100644 --- a/examples/ipv6/sky-websense/Makefile +++ b/examples/ipv6/sky-websense/Makefile @@ -8,7 +8,7 @@ CFLAGS+= -DUIP_CONF_IPV6_RPL APPS += webserver webbrowser -CFLAGS += -DPROJECT_CONF_H=1 +CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\" CONTIKI_SOURCEFILES += wget.c PROJECTDIRS += ../rpl-border-router PROJECT_SOURCEFILES += httpd-simple.c diff --git a/examples/z1/ipv6/z1-websense/Makefile b/examples/z1/ipv6/z1-websense/Makefile index a786595f4..97ebc93ab 100644 --- a/examples/z1/ipv6/z1-websense/Makefile +++ b/examples/z1/ipv6/z1-websense/Makefile @@ -7,7 +7,7 @@ UIP_CONF_IPV6=1 APPS += webserver webbrowser -CFLAGS += -DPROJECT_CONF_H=1 +CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\" CONTIKI_SOURCEFILES += wget.c PROJECTDIRS += ../../../ipv6/rpl-border-router PROJECT_SOURCEFILES += httpd-simple.c diff --git a/platform/sky/contiki-conf.h b/platform/sky/contiki-conf.h index 19d822e58..9794f39df 100644 --- a/platform/sky/contiki-conf.h +++ b/platform/sky/contiki-conf.h @@ -4,10 +4,6 @@ #ifndef CONTIKI_CONF_H #define CONTIKI_CONF_H -#ifdef PROJECT_CONF_H -#include "project-conf.h" -#endif /* PROJECT_CONF_H */ - #ifdef PLATFORM_CONF_H #include PLATFORM_CONF_H #else @@ -210,5 +206,11 @@ +/* include the project config */ +/* PROJECT_CONF_H might be defined in the project Makefile */ +#ifdef PROJECT_CONF_H +#include PROJECT_CONF_H +#endif /* PROJECT_CONF_H */ + #endif /* CONTIKI_CONF_H */ diff --git a/platform/z1/contiki-conf.h b/platform/z1/contiki-conf.h index 9b3ee32a4..a0fd94e8b 100644 --- a/platform/z1/contiki-conf.h +++ b/platform/z1/contiki-conf.h @@ -190,7 +190,7 @@ #ifdef PROJECT_CONF_H -#include "project-conf.h" +#include PROJECT_CONF_H #endif /* PROJECT_CONF_H */