1 CONTIKI_PROJECT
= webserver-example
2 all: $(CONTIKI_PROJECT
)
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.
14 override webserver_src
= webserver-nogui.c http-strings.c psock.c memb.c \
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.
32 ifneq (${wildcard $(OBJECTDIR
)/httpd.o
},)
33 DUMMY
:= ${shell rm -f contiki-
$(TARGET
).a
$(OBJECTDIR
)/httpd.o
}
36 ifneq (${wildcard $(OBJECTDIR
)/httpd-cfs.o
},)
37 DUMMY
:= ${shell rm -f contiki-
$(TARGET
).a
$(OBJECTDIR
)/httpd-cfs.o
}