SpriteHTTPD - embedded HTTP server with read-only filesystem and templating, originally developed for ESP8266, now stand-alone and POSIX compatible.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spritehttpd/demo/Makefile

36 lines
759 B

DEMO_SOURCES = server_demo.c staticfiles-embed.c
FSBUILDER = ../espfsbuilder/mkespfsimage
LIBFILE = ../spritehttpd/libspritehttpd.a
STATIC_FILES = \
staticfiles/index.html \
staticfiles/kocour.jpg
all: demo
$(FSBUILDER):
make -C ../espfsbuilder
staticfiles.bin: $(FSBUILDER) ${STATIC_FILES}
$(FSBUILDER) -c1 -g jpg --strip-path staticfiles -o $@ ${STATIC_FILES}
$(FSBUILDER) -p $@
staticfiles-embed.c: staticfiles.bin
xxd -i -n espfs_image $< $@
clean:
rm -f demo staticfiles.bin staticfiles-embed.c
make -C ../spritehttpd clean
$(LIBFILE):
make -C ../spritehttpd PLATFORM=posix CFLAGS="-Og -g"
demo: ${DEMO_SOURCES} $(LIBFILE)
cc -Og -g -Wall ${DEMO_SOURCES} \
-o $@ \
-I../spritehttpd/include \
-lspritehttpd \
-L../spritehttpd/