diff --git a/examples/stm32/stm32-freertos-tcp/Makefile b/examples/stm32/stm32-freertos-tcp/Makefile index 5c08a57a..b5a77dbe 100644 --- a/examples/stm32/stm32-freertos-tcp/Makefile +++ b/examples/stm32/stm32-freertos-tcp/Makefile @@ -50,8 +50,6 @@ SOURCES += $(FREERTOS_PLUS_TCP_PATH)/portable/BufferManagement/BufferAllocation_ SOURCES += $(FREERTOS_PLUS_TCP_PATH)/portable/NetworkInterface/STM32Fxx/NetworkInterface.c SOURCES += $(FREERTOS_PLUS_TCP_PATH)/portable/NetworkInterface/STM32Fxx/stm32fxx_hal_eth.c -OBJECTS = obj/boot.o $(SOURCES:%.c=obj/%.o) - example: true @@ -63,18 +61,11 @@ $(PROG).bin: $(PROG).elf $(PROG).hex: $(PROG).bin $(DOCKER) arm-none-eabi-objcopy -I binary -O ihex --change-address 0x8000000 $< $@ -$(PROG).elf: $(OBJECTS) Makefile - $(DOCKER) arm-none-eabi-gcc $(OBJECTS) $(LINKFLAGS) -o $@ +$(PROG).elf: Makefile + @mkdir -p $(dir $@) + $(DOCKER) arm-none-eabi-gcc $(SOURCES) $(ARCH)/boot.s $(CFLAGS) $(LINKFLAGS) -o $@ $(DOCKER) arm-none-eabi-size -A $@ -obj/%.o: %.c - @mkdir -p $(dir $@) - $(DOCKER) arm-none-eabi-gcc $(CFLAGS) -c $< -o $@ - -obj/boot.o: $(ARCH)/boot.s - @mkdir -p $(dir $@) - $(DOCKER) arm-none-eabi-as -g3 --warn --fatal-warnings $(MCU_FLAGS) $< -o $@ - flash: $(PROG).bin st-flash --reset write $< 0x8000000 @@ -95,4 +86,4 @@ gdb: #$(PROG).elf $(ELF) clean: - @rm -rf *.{bin,elf,map,lst,tgz,zip,hex} obj + @rm -rf firmware.* diff --git a/mongoose.h b/mongoose.h index 9679b003..d4613166 100644 --- a/mongoose.h +++ b/mongoose.h @@ -314,6 +314,10 @@ struct timeval { #include #include +#ifndef MG_ENABLE_DIRLIST +#define MG_ENABLE_DIRLIST 1 +#endif + #endif @@ -403,6 +407,10 @@ typedef int socklen_t; #define S_ISDIR(x) (((x) &_S_IFMT) == _S_IFDIR) #endif +#ifndef MG_ENABLE_DIRLIST +#define MG_ENABLE_DIRLIST 1 +#endif + #endif @@ -456,7 +464,7 @@ typedef int socklen_t; #endif #ifndef MG_ENABLE_DIRLIST -#define MG_ENABLE_DIRLIST 1 +#define MG_ENABLE_DIRLIST 0 #endif #ifndef MG_ENABLE_CUSTOM_RANDOM diff --git a/src/arch_unix.h b/src/arch_unix.h index 9af31f60..dd696e22 100644 --- a/src/arch_unix.h +++ b/src/arch_unix.h @@ -30,4 +30,8 @@ #include #include +#ifndef MG_ENABLE_DIRLIST +#define MG_ENABLE_DIRLIST 1 +#endif + #endif diff --git a/src/arch_win32.h b/src/arch_win32.h index 325e2836..deada3ec 100644 --- a/src/arch_win32.h +++ b/src/arch_win32.h @@ -86,4 +86,8 @@ typedef int socklen_t; #define S_ISDIR(x) (((x) &_S_IFMT) == _S_IFDIR) #endif +#ifndef MG_ENABLE_DIRLIST +#define MG_ENABLE_DIRLIST 1 +#endif + #endif diff --git a/src/config.h b/src/config.h index 19d3b566..51d2a00e 100644 --- a/src/config.h +++ b/src/config.h @@ -50,7 +50,7 @@ #endif #ifndef MG_ENABLE_DIRLIST -#define MG_ENABLE_DIRLIST 1 +#define MG_ENABLE_DIRLIST 0 #endif #ifndef MG_ENABLE_CUSTOM_RANDOM