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.
36 lines
791 B
36 lines
791 B
DEMO_SOURCES = server_demo.c staticfiles-embed.c
|
|
|
|
FSBUILDER = ../espfsbuilder/mkespfsimage
|
|
|
|
LIBFILE = ../spritehttpd/libspritehttpd.a
|
|
|
|
STATIC_FILES = \
|
|
staticfiles/index.html \
|
|
staticfiles/kocour.jpg \
|
|
staticfiles/template.tpl.txt
|
|
|
|
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/
|
|
|