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/spritehttpd/Makefile

52 lines
1.1 KiB

# If building for posix:
ifeq ($(PLATFORM),arm-freertos)
CC ?= arm-none-eabi-gcc
AR ?= arm-none-eabi-ar
PORT_SOURCES = src/port/httpd-freertos.c
else
# Probably posix
CC ?= cc
AR ?= ar
PORT_SOURCES = src/port/httpd-posix.c
endif
# additional C flags can be specified via the CFLAGS variable
LIB_FILE = libspritehttpd.a
LIB_SOURCES = ${PORT_SOURCES} \
lib/espfs/espfs.c \
lib/heatshrink/heatshrink_decoder.c \
src/utils/base64.c \
src/utils/sha1.c \
src/httpd.c \
src/httpd-espfs.c \
src/httpd-auth.c \
src/httpd-utils.c \
src/httpd-loop.c \
src/cgi-websocket.c
LIB_OBJS = ${LIB_SOURCES:.c=.o}
LIB_INCLUDES = -Iinclude -Ilib/heatshrink -Ilib/espfs
LIB_CFLAGS = -fPIC -Wall -Wextra -c -Os -ggdb -std=gnu99 -DGIT_HASH='"$(shell git rev-parse --short HEAD)"'
OBJ_DIR=./obj
OUT_DIR=.
all: $(LIB_FILE)
%.o: %.c
$(CC) -c $(LIB_INCLUDES) $(CFLAGS) $(LIB_CFLAGS) -o $@ $<
$(LIB_FILE): ${LIB_OBJS}
$(AR) rcs $@ $^
clean:
find . -type f -name '*.o' -delete
find . -type f -name '*.d' -delete
find . -type f -name '*.a' -delete
find . -type f -name '*.elf' -delete