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/