Tidy up webserver configuration (Native BR)
Previously, we were using the example's Makefile to configure whether we want a web server built into the BR. We had 3 options: * No web server * Internal web server * External web server (from apps/) The last option is no longer evailable. This commit removes support for this option and it also simplifies the situation: We now merely use a CPP macro to enable/disable the web server.
This commit is contained in:
parent
2efb34834f
commit
a3c185132a
@ -4,17 +4,8 @@ MODULES += os/services/slip-cmd
|
||||
|
||||
CONTIKI=../..
|
||||
|
||||
PROJECT_SOURCEFILES += border-router-cmds.c tun-bridge.c border-router-mac.c \
|
||||
slip-config.c slip-dev.c
|
||||
|
||||
WITH_WEBSERVER=1
|
||||
ifeq ($(WITH_WEBSERVER),1)
|
||||
CFLAGS += -DWEBSERVER=1
|
||||
PROJECT_SOURCEFILES += httpd-simple.c
|
||||
else ifneq ($(WITH_WEBSERVER), 0)
|
||||
MODULES += $(WITH_WEBSERVER)
|
||||
CFLAGS += -DWEBSERVER=2
|
||||
endif
|
||||
PROJECT_SOURCEFILES += border-router-cmds.c tun-bridge.c httpd-simple.c
|
||||
PROJECT_SOURCEFILES += slip-config.c slip-dev.c border-router-mac.c
|
||||
|
||||
MAKE_MAC = MAKE_MAC_OTHER
|
||||
MAKE_NET = MAKE_NET_IPV6
|
||||
|
@ -82,15 +82,7 @@ CMD_HANDLERS(border_router_cmd_handler);
|
||||
|
||||
PROCESS(border_router_process, "Border router process");
|
||||
|
||||
#if WEBSERVER==0
|
||||
/* No webserver */
|
||||
AUTOSTART_PROCESSES(&border_router_process,&border_router_cmd_process);
|
||||
#elif WEBSERVER>1
|
||||
/* Use an external webserver application */
|
||||
#include "webserver-nogui.h"
|
||||
AUTOSTART_PROCESSES(&border_router_process,&border_router_cmd_process,
|
||||
&webserver_nogui_process);
|
||||
#else
|
||||
#if BORDER_ROUTER_CONF_WEBSERVER
|
||||
/* Use simple webserver with only one page */
|
||||
#include "httpd-simple.h"
|
||||
PROCESS(webserver_nogui_process, "Web server");
|
||||
@ -212,9 +204,10 @@ httpd_simple_get_script(const char *name)
|
||||
{
|
||||
return generate_routes;
|
||||
}
|
||||
|
||||
#endif /* WEBSERVER */
|
||||
|
||||
#else /* BORDER_ROUTER_CONF_WEBSERVER */
|
||||
/* No webserver */
|
||||
AUTOSTART_PROCESSES(&border_router_process,&border_router_cmd_process);
|
||||
#endif /* BORDER_ROUTER_CONF_WEBSERVER */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
print_local_addresses(void)
|
||||
|
@ -30,6 +30,8 @@
|
||||
#ifndef PROJECT_ROUTER_CONF_H_
|
||||
#define PROJECT_ROUTER_CONF_H_
|
||||
|
||||
#define BORDER_ROUTER_CONF_WEBSERVER 1
|
||||
|
||||
#define UIP_FALLBACK_INTERFACE rpl_interface
|
||||
|
||||
/* use a non-default network driver */
|
||||
|
Loading…
Reference in New Issue
Block a user