mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-28 23:49:44 +08:00
Change linux target
This commit is contained in:
parent
4dd1891594
commit
55517d48ed
@ -7,7 +7,7 @@ VC98 = docker run -it --rm -e Tmp=. -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/vc9
|
||||
LIN = docker run -it --rm -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/cc2
|
||||
|
||||
all: $(PROG)
|
||||
$(DEBUGGER) ./$(PROG) $(ARGS)
|
||||
$(RUN) ./$(PROG) $(ARGS)
|
||||
|
||||
$(PROG): main.c Makefile
|
||||
$(CC) ../../mongoose.c main.c -I../.. $(CFLAGS) -o $@
|
||||
@ -18,10 +18,9 @@ mongoose.exe: main.c
|
||||
mingw:
|
||||
gcc ../../mongoose.c main.c -I../.. -W -Wall -DMG_ENABLE_IPV6=1 -DMG_ENABLE_LINES=1 -D_POSIX_C_SOURCE=200000L -lws2_32 -o mongoose.exe
|
||||
|
||||
linux: all
|
||||
linux: CFLAGS += -O2 -fsanitize=address,undefined,shift,null,return,bounds,alignment,object-size,bool,enum -static-libasan
|
||||
#linux: CC = $(LIN) cc
|
||||
#linux: DEBUGGER = $(LIN)
|
||||
linux: example
|
||||
linux: CFLAGS += -O2
|
||||
linux: CC = $(LIN) cc
|
||||
|
||||
clean:
|
||||
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb mongoose mongoose_* mongoose.*
|
||||
|
@ -1679,6 +1679,7 @@ void mg_http_serve_dir(struct mg_connection *c, struct mg_http_message *hm,
|
||||
if (flags < 0) {
|
||||
// Do nothing: the response has already been sent by uri_to_path()
|
||||
} else if (flags == 0) {
|
||||
// File not found - serve 404
|
||||
mg_http_serve_file(c, hm, opts->page404, opts);
|
||||
} else if (flags & MG_FS_DIR) {
|
||||
listdir(c, hm, opts, path);
|
||||
|
@ -685,6 +685,7 @@ void mg_http_serve_dir(struct mg_connection *c, struct mg_http_message *hm,
|
||||
if (flags < 0) {
|
||||
// Do nothing: the response has already been sent by uri_to_path()
|
||||
} else if (flags == 0) {
|
||||
// File not found - serve 404
|
||||
mg_http_serve_file(c, hm, opts->page404, opts);
|
||||
} else if (flags & MG_FS_DIR) {
|
||||
listdir(c, hm, opts, path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user