Disable dirlist by default

This commit is contained in:
Sergey Lyubka 2022-02-14 11:32:01 +00:00
parent 5bc164de76
commit 4fec149345
5 changed files with 22 additions and 15 deletions

View File

@ -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/NetworkInterface.c
SOURCES += $(FREERTOS_PLUS_TCP_PATH)/portable/NetworkInterface/STM32Fxx/stm32fxx_hal_eth.c SOURCES += $(FREERTOS_PLUS_TCP_PATH)/portable/NetworkInterface/STM32Fxx/stm32fxx_hal_eth.c
OBJECTS = obj/boot.o $(SOURCES:%.c=obj/%.o)
example: example:
true true
@ -63,18 +61,11 @@ $(PROG).bin: $(PROG).elf
$(PROG).hex: $(PROG).bin $(PROG).hex: $(PROG).bin
$(DOCKER) arm-none-eabi-objcopy -I binary -O ihex --change-address 0x8000000 $< $@ $(DOCKER) arm-none-eabi-objcopy -I binary -O ihex --change-address 0x8000000 $< $@
$(PROG).elf: $(OBJECTS) Makefile $(PROG).elf: Makefile
$(DOCKER) arm-none-eabi-gcc $(OBJECTS) $(LINKFLAGS) -o $@ @mkdir -p $(dir $@)
$(DOCKER) arm-none-eabi-gcc $(SOURCES) $(ARCH)/boot.s $(CFLAGS) $(LINKFLAGS) -o $@
$(DOCKER) arm-none-eabi-size -A $@ $(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 flash: $(PROG).bin
st-flash --reset write $< 0x8000000 st-flash --reset write $< 0x8000000
@ -95,4 +86,4 @@ gdb: #$(PROG).elf
$(ELF) $(ELF)
clean: clean:
@rm -rf *.{bin,elf,map,lst,tgz,zip,hex} obj @rm -rf firmware.*

View File

@ -314,6 +314,10 @@ struct timeval {
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
#ifndef MG_ENABLE_DIRLIST
#define MG_ENABLE_DIRLIST 1
#endif
#endif #endif
@ -403,6 +407,10 @@ typedef int socklen_t;
#define S_ISDIR(x) (((x) &_S_IFMT) == _S_IFDIR) #define S_ISDIR(x) (((x) &_S_IFMT) == _S_IFDIR)
#endif #endif
#ifndef MG_ENABLE_DIRLIST
#define MG_ENABLE_DIRLIST 1
#endif
#endif #endif
@ -456,7 +464,7 @@ typedef int socklen_t;
#endif #endif
#ifndef MG_ENABLE_DIRLIST #ifndef MG_ENABLE_DIRLIST
#define MG_ENABLE_DIRLIST 1 #define MG_ENABLE_DIRLIST 0
#endif #endif
#ifndef MG_ENABLE_CUSTOM_RANDOM #ifndef MG_ENABLE_CUSTOM_RANDOM

View File

@ -30,4 +30,8 @@
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
#ifndef MG_ENABLE_DIRLIST
#define MG_ENABLE_DIRLIST 1
#endif
#endif #endif

View File

@ -86,4 +86,8 @@ typedef int socklen_t;
#define S_ISDIR(x) (((x) &_S_IFMT) == _S_IFDIR) #define S_ISDIR(x) (((x) &_S_IFMT) == _S_IFDIR)
#endif #endif
#ifndef MG_ENABLE_DIRLIST
#define MG_ENABLE_DIRLIST 1
#endif
#endif #endif

View File

@ -50,7 +50,7 @@
#endif #endif
#ifndef MG_ENABLE_DIRLIST #ifndef MG_ENABLE_DIRLIST
#define MG_ENABLE_DIRLIST 1 #define MG_ENABLE_DIRLIST 0
#endif #endif
#ifndef MG_ENABLE_CUSTOM_RANDOM #ifndef MG_ENABLE_CUSTOM_RANDOM