2008-07-08 01:42:32 +02:00
|
|
|
CONTIKI_PROJECT = sky-webserver
|
2010-02-03 21:06:40 +01:00
|
|
|
all: sky-webserver sky-telnet-server telnet-tweet
|
2011-04-12 07:52:14 +02:00
|
|
|
PLATFORM_BUILD=1 # This is needed to avoid the shell to include the httpd-cfs version of the webserver
|
2009-05-11 19:36:13 +02:00
|
|
|
APPS = webserver twitter telnetd
|
2011-04-12 07:52:14 +02:00
|
|
|
CFLAGS = -DWITH_UIP=1 -I.
|
|
|
|
DEFINES=NETSTACK_CONF_RDC=cxmac_driver,NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE=8
|
2008-02-24 22:33:57 +01:00
|
|
|
|
|
|
|
# The webserver application normally contains a built-in file system and support
|
|
|
|
# for server-side includes.
|
|
|
|
#
|
|
|
|
# This webserver example supports building the alternative webserver application
|
|
|
|
# which serves files from an cfs file system. To build the alternative webserver
|
|
|
|
# run make with the parameter HTTPD-CFS=1.
|
|
|
|
|
2009-05-11 19:36:13 +02:00
|
|
|
# ifeq ($(HTTPD-CFS),1)
|
|
|
|
# override webserver_src = webserver-nogui.c http-strings.c psock.c memb.c \
|
|
|
|
# httpd-cfs.c
|
|
|
|
# endif
|
2008-02-24 22:33:57 +01:00
|
|
|
|
|
|
|
CONTIKI = ../..
|
|
|
|
include $(CONTIKI)/Makefile.include
|
|
|
|
|
2008-07-08 01:42:32 +02:00
|
|
|
sky-webserver.$(TARGET): $(OBJECTDIR)/ajax-cgi.o
|
|
|
|
|
2008-02-24 22:33:57 +01:00
|
|
|
# Intentionally httpd.c and httpd-cfs.c implement the same interface. When
|
|
|
|
# switching from one webserver alternative to the other with an existent
|
|
|
|
# Contiki library then both files end up in the library making the linker
|
|
|
|
# use whichever it finds first :-(
|
|
|
|
#
|
|
|
|
# The most straightforward way to make sure this doesn't happen is to delete
|
|
|
|
# the Contiki library. But it would be undesirable to do that on every build
|
|
|
|
# so the existence of the "wrong" object file is used to detect a switch and
|
|
|
|
# trigger deletion of the Contiki library - and the trigger file of course.
|
|
|
|
|
2009-05-11 19:36:13 +02:00
|
|
|
# ifeq ($(HTTPD-CFS),1)
|
|
|
|
# ifneq (${wildcard $(OBJECTDIR)/httpd.o},)
|
|
|
|
# DUMMY := ${shell rm -f contiki-$(TARGET).a $(OBJECTDIR)/httpd.o}
|
|
|
|
# endif
|
|
|
|
# else
|
|
|
|
# ifneq (${wildcard $(OBJECTDIR)/httpd-cfs.o},)
|
|
|
|
# DUMMY := ${shell rm -f contiki-$(TARGET).a $(OBJECTDIR)/httpd-cfs.o}
|
|
|
|
# endif
|
|
|
|
# endif
|
2008-02-24 22:33:57 +01:00
|
|
|
|
|
|
|
slip:
|
|
|
|
ifdef INTERFACE
|
|
|
|
$(CONTIKI)/tools/wpcapslip/wpcapslip -s /dev/com$(firstword $(CMOTES)) $(INTERFACE) 172.16.0.0 255.255.0.0
|
|
|
|
else
|
|
|
|
@echo "Usage: \"$(MAKE) $@ INTERFACE=<the IP address of a local network interface>\""
|
|
|
|
@echo "Use the \"ipconfig\" command to find out the IP addresses of the local interfaces"
|
|
|
|
endif
|