Added optional URL filtering code to the CFS web server contributed by Kajtar Zsolt...
[contiki-2.x.git] / examples / webserver / Makefile
bloba5d599b931150c80eef7a0d2a5565fda55bba255
1 CONTIKI_PROJECT = webserver-example
2 all: $(CONTIKI_PROJECT)
4 APPS = webserver
6 # The webserver application normally contains a built-in file system and support
7 # for server-side includes.
9 # This webserver example supports building the alternative webserver application
10 # which serves files from an cfs file system. To build the alternative webserver
11 # run make with the parameter HTTPD-CFS=1.
13 ifeq ($(HTTPD-CFS),1)
14 override webserver_src = webserver-nogui.c http-strings.c psock.c memb.c \
15 httpd-cfs.c urlconv.c
16 endif
18 CONTIKI = ../..
19 include $(CONTIKI)/Makefile.include
21 # Intentionally httpd.c and httpd-cfs.c implement the same interface. When
22 # switching from one webserver alternative to the other with an existent
23 # Contiki library then both files end up in the library making the linker
24 # use whichever it finds first :-(
26 # The most straightforward way to make sure this doesn't happen is to delete
27 # the Contiki library. But it would be undesirable to do that on every build
28 # so the existence of the "wrong" object file is used to detect a switch and
29 # trigger deletion of the Contiki library - and the trigger file of course.
31 ifeq ($(HTTPD-CFS),1)
32 ifneq (${wildcard $(OBJECTDIR)/httpd.o},)
33 DUMMY := ${shell rm -f contiki-$(TARGET).a $(OBJECTDIR)/httpd.o}
34 endif
35 else
36 ifneq (${wildcard $(OBJECTDIR)/httpd-cfs.o},)
37 DUMMY := ${shell rm -f contiki-$(TARGET).a $(OBJECTDIR)/httpd-cfs.o}
38 endif
39 endif