mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-13 17:00:19 +00:00
Change linux target
This commit is contained in:
1 parent
4dd1891594
commit
55517d48ed
3 files changed
+6
-5
No files matched your search
@@ -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
|
LIN = docker run -it --rm -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/cc2
|
||||||
|
|
||||||
all: $(PROG)
|
all: $(PROG)
|
||||||
$(DEBUGGER) ./$(PROG) $(ARGS)
|
$(RUN) ./$(PROG) $(ARGS)
|
||||||
|
|
||||||
$(PROG): main.c Makefile
|
$(PROG): main.c Makefile
|
||||||
$(CC) ../../mongoose.c main.c -I../.. $(CFLAGS) -o $@
|
$(CC) ../../mongoose.c main.c -I../.. $(CFLAGS) -o $@
|
||||||
@@ -18,10 +18,9 @@ mongoose.exe: main.c
|
|||||||
mingw:
|
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
|
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: example
|
||||||
linux: CFLAGS += -O2 -fsanitize=address,undefined,shift,null,return,bounds,alignment,object-size,bool,enum -static-libasan
|
linux: CFLAGS += -O2
|
||||||
#linux: CC = $(LIN) cc
|
linux: CC = $(LIN) cc
|
||||||
#linux: DEBUGGER = $(LIN)
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb mongoose mongoose_* mongoose.*
|
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) {
|
if (flags < 0) {
|
||||||
// Do nothing: the response has already been sent by uri_to_path()
|
// Do nothing: the response has already been sent by uri_to_path()
|
||||||
} else if (flags == 0) {
|
} else if (flags == 0) {
|
||||||
|
// File not found - serve 404
|
||||||
mg_http_serve_file(c, hm, opts->page404, opts);
|
mg_http_serve_file(c, hm, opts->page404, opts);
|
||||||
} else if (flags & MG_FS_DIR) {
|
} else if (flags & MG_FS_DIR) {
|
||||||
listdir(c, hm, opts, path);
|
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) {
|
if (flags < 0) {
|
||||||
// Do nothing: the response has already been sent by uri_to_path()
|
// Do nothing: the response has already been sent by uri_to_path()
|
||||||
} else if (flags == 0) {
|
} else if (flags == 0) {
|
||||||
|
// File not found - serve 404
|
||||||
mg_http_serve_file(c, hm, opts->page404, opts);
|
mg_http_serve_file(c, hm, opts->page404, opts);
|
||||||
} else if (flags & MG_FS_DIR) {
|
} else if (flags & MG_FS_DIR) {
|
||||||
listdir(c, hm, opts, path);
|
listdir(c, hm, opts, path);
|
||||||
|
|||||||
Reference in new issue
Block a user