From 524f8b953f8ff21f1311c2039971c038b4ee61f3 Mon Sep 17 00:00:00 2001 From: Ivan Mikhailov Date: Sat, 30 Dec 2017 09:42:50 +0100 Subject: [PATCH] Allow html files customization for libesphttpd Modified component.mk to let user customize LIBESPHTTPD_HTML_DIR and LIBESPHTTPD_HTML_FILES --- extras/libesphttpd/component.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extras/libesphttpd/component.mk b/extras/libesphttpd/component.mk index 22e433e..cdc1360 100644 --- a/extras/libesphttpd/component.mk +++ b/extras/libesphttpd/component.mk @@ -5,6 +5,8 @@ INC_DIRS += $(libesphttpd_ROOT)/libesphttpd/include $(libesphttpd_ROOT)/libespht LIBESPHTTPD_MAX_CONNECTIONS ?= 4 LIBESPHTTPD_STACKSIZE ?= 2048 LIBESPHTTPD_OTA_TAGNAME ?= generic +LIBESPHTTPD_HTML_DIR ?= html +LIBESPHTTPD_HTML_FILES ?= $(call rwildcard,$(LIBESPHTTPD_HTML_DIR)/,*) RBOOT_OTA ?= 1 ESP_IP ?= 192.168.4.1 @@ -20,8 +22,6 @@ rwildcard = $(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2 LIBESPHTTPD_MKESPFSIMAGE_DIR = $(BUILD_DIR)mkespfsimage LIBESPHTTPD_MKESPFS = $(LIBESPHTTPD_MKESPFSIMAGE_DIR)/mkespfsimage -LIBESPHTTPD_HTML_DIR = html -LIBESPHTTPD_HTML_FILES = $(call rwildcard,$(LIBESPHTTPD_HTML_DIR),*) LIBESPHTTPD_HTML_TINY_DIR = $(BUILD_DIR)html LIBESPHTTPD_HTML_ESPFS = $(BUILD_DIR)web.espfs.bin LIBESPHTTPD_HTML_ESPFS_PATH = $(PROGRAM_REAL_ROOT)/$(LIBESPHTTPD_HTML_ESPFS) @@ -42,7 +42,7 @@ $(PROGRAM_REAL_ROOT)/$(LIBESPHTTPD_MKESPFS): $(LIBESPHTTPD_MKESPFSIMAGE_DIR) make -C $(libesphttpd_ROOT)/libesphttpd/espfs/mkespfsimage CC=gcc GZIP_COMPRESSION=yes USE_HEATSHRINK=yes BUILD_DIR=$(PROGRAM_REAL_ROOT)/$(BUILD_DIR) $(LIBESPHTTPD_HTML_ESPFS): $(PROGRAM_REAL_ROOT)/$(LIBESPHTTPD_MKESPFS) $(LIBESPHTTPD_HTML_FILES) - cd $(LIBESPHTTPD_HTML_DIR) && find . | $< > $(LIBESPHTTPD_HTML_ESPFS_PATH) || rm -f $(LIBESPHTTPD_HTML_ESPFS_PATH) + cd $(LIBESPHTTPD_HTML_DIR) && find $(patsubst $(LIBESPHTTPD_HTML_DIR)/%,%,$(LIBESPHTTPD_HTML_FILES)) | $< > $(LIBESPHTTPD_HTML_ESPFS_PATH) || rm -f $(LIBESPHTTPD_HTML_ESPFS_PATH) $(LIBESPHTTPD_HTML_ESPFS_OBJ): $(LIBESPHTTPD_HTML_ESPFS) $(Q)$(OBJCOPY) -I binary -O $(CROSS_OUTPUT_TARGET) -B $(CROSS_BINARY_ARCH) --rename-section .data=.irom.espfs $^ $@