From 4c87a776e62e8d98d9933a7946400821c3b0a377 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Fri, 24 Feb 2023 13:46:31 -0300 Subject: [PATCH] updated Makefiles and symlinks --- examples/websocket-client/Makefile | 29 ++++++++++++++++------ examples/websocket-client/ca.pem | 1 - examples/websocket-client/mongoose.c | 1 + examples/websocket-client/mongoose.h | 1 + examples/websocket-server/Makefile | 29 ++++++++++++++++------ examples/websocket-server/mongoose.c | 1 + examples/websocket-server/mongoose.h | 1 + examples/webui-login/Makefile | 35 +++++++++++++++------------ examples/webui-login/mongoose.c | 1 + examples/webui-login/mongoose.h | 1 + examples/webui-plain/Makefile | 36 +++++++++++++++------------- examples/webui-plain/ca.pem | 1 - examples/webui-plain/mongoose.c | 1 + examples/webui-plain/mongoose.h | 1 + examples/webui-preact/Makefile | 35 +++++++++++++++------------ examples/webui-preact/ca.pem | 1 - examples/webui-preact/mongoose.c | 1 + examples/webui-preact/mongoose.h | 1 + examples/webui-push-rest/Makefile | 35 +++++++++++++++------------ examples/webui-push-rest/mongoose.c | 1 + examples/webui-push-rest/mongoose.h | 1 + examples/webui-push-ws/Makefile | 35 +++++++++++++++------------ examples/webui-push-ws/mongoose.c | 1 + examples/webui-push-ws/mongoose.h | 1 + examples/webui-rest/Makefile | 35 +++++++++++++++------------ examples/webui-rest/ca.pem | 1 - examples/webui-rest/mongoose.c | 1 + examples/webui-rest/mongoose.h | 1 + 28 files changed, 180 insertions(+), 109 deletions(-) delete mode 120000 examples/websocket-client/ca.pem create mode 120000 examples/websocket-client/mongoose.c create mode 120000 examples/websocket-client/mongoose.h create mode 120000 examples/websocket-server/mongoose.c create mode 120000 examples/websocket-server/mongoose.h create mode 120000 examples/webui-login/mongoose.c create mode 120000 examples/webui-login/mongoose.h delete mode 120000 examples/webui-plain/ca.pem create mode 120000 examples/webui-plain/mongoose.c create mode 120000 examples/webui-plain/mongoose.h delete mode 120000 examples/webui-preact/ca.pem create mode 120000 examples/webui-preact/mongoose.c create mode 120000 examples/webui-preact/mongoose.h create mode 120000 examples/webui-push-rest/mongoose.c create mode 120000 examples/webui-push-rest/mongoose.h create mode 120000 examples/webui-push-ws/mongoose.c create mode 120000 examples/webui-push-ws/mongoose.h delete mode 120000 examples/webui-rest/ca.pem create mode 120000 examples/webui-rest/mongoose.c create mode 120000 examples/webui-rest/mongoose.h diff --git a/examples/websocket-client/Makefile b/examples/websocket-client/Makefile index ffeed7fe..a990a02a 100644 --- a/examples/websocket-client/Makefile +++ b/examples/websocket-client/Makefile @@ -1,10 +1,25 @@ -PROG ?= example +PROG ?= example # Program we are building +DELETE = rm -rf # Command to remove files +OUT ?= -o $(PROG) # Compiler argument for output file +SOURCES = main.c mongoose.c # Source code files +CFLAGS = -W -Wall -Wextra -g -I. # Build options -all: $(PROG) - $(DEBUGGER) ./$(PROG) $(ARGS) +# Mongoose build options. See https://mongoose.ws/documentation/#build-options +#CFLAGS_MONGOOSE += -DMG_ENABLE_LINES -$(PROG): main.c - $(CC) ../../mongoose.c -I../.. -W -Wall $(CFLAGS) -o $(PROG) main.c +ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe + PROG ?= example.exe # Use .exe suffix for the binary + CC = gcc # Use MinGW gcc compiler + CFLAGS += -lws2_32 # Link against Winsock library + DELETE = cmd /C del /Q /F /S # Command prompt command to delete files + OUT ?= -o $(PROG) # Build output +endif -clean: - rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb +all: $(PROG) # Default target. Build and run program + $(RUN) ./$(PROG) $(ARGS) + +$(PROG): $(SOURCES) # Build program from sources + $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT) + +clean: # Cleanup. Delete built program and all build artifacts + $(DELETE) $(PROG) *.o *.obj *.exe *.dSYM diff --git a/examples/websocket-client/ca.pem b/examples/websocket-client/ca.pem deleted file mode 120000 index 8addd9e2..00000000 --- a/examples/websocket-client/ca.pem +++ /dev/null @@ -1 +0,0 @@ -../../test/data/ca.pem \ No newline at end of file diff --git a/examples/websocket-client/mongoose.c b/examples/websocket-client/mongoose.c new file mode 120000 index 00000000..8ef6e62d --- /dev/null +++ b/examples/websocket-client/mongoose.c @@ -0,0 +1 @@ +../../mongoose.c \ No newline at end of file diff --git a/examples/websocket-client/mongoose.h b/examples/websocket-client/mongoose.h new file mode 120000 index 00000000..488ef358 --- /dev/null +++ b/examples/websocket-client/mongoose.h @@ -0,0 +1 @@ +../../mongoose.h \ No newline at end of file diff --git a/examples/websocket-server/Makefile b/examples/websocket-server/Makefile index 3d179d14..b231dd04 100644 --- a/examples/websocket-server/Makefile +++ b/examples/websocket-server/Makefile @@ -1,10 +1,25 @@ -PROG ?= example +PROG ?= example # Program we are building +DELETE = rm -rf # Command to remove files +OUT ?= -o $(PROG) # Compiler argument for output file +SOURCES = main.c mongoose.c # Source code files +CFLAGS = -W -Wall -Wextra -g -I. # Build options -all: $(PROG) - $(DEBUGGER) ./$(PROG) $(ARGS) +# Mongoose build options. See https://mongoose.ws/documentation/#build-options +CFLAGS_MONGOOSE += -DMG_ENABLE_LINES -$(PROG): main.c - $(CC) ../../mongoose.c -I../.. -W -Wall -DMG_ENABLE_LINES=1 $(CFLAGS) -o $(PROG) main.c +ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe + PROG ?= example.exe # Use .exe suffix for the binary + CC = gcc # Use MinGW gcc compiler + CFLAGS += -lws2_32 # Link against Winsock library + DELETE = cmd /C del /Q /F /S # Command prompt command to delete files + OUT ?= -o $(PROG) # Build output +endif -clean: - rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb +all: $(PROG) # Default target. Build and run program + $(RUN) ./$(PROG) $(ARGS) + +$(PROG): $(SOURCES) # Build program from sources + $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT) + +clean: # Cleanup. Delete built program and all build artifacts + $(DELETE) $(PROG) *.o *.obj *.exe *.dSYM diff --git a/examples/websocket-server/mongoose.c b/examples/websocket-server/mongoose.c new file mode 120000 index 00000000..8ef6e62d --- /dev/null +++ b/examples/websocket-server/mongoose.c @@ -0,0 +1 @@ +../../mongoose.c \ No newline at end of file diff --git a/examples/websocket-server/mongoose.h b/examples/websocket-server/mongoose.h new file mode 120000 index 00000000..488ef358 --- /dev/null +++ b/examples/websocket-server/mongoose.h @@ -0,0 +1 @@ +../../mongoose.h \ No newline at end of file diff --git a/examples/webui-login/Makefile b/examples/webui-login/Makefile index 9addcb99..b231dd04 100644 --- a/examples/webui-login/Makefile +++ b/examples/webui-login/Makefile @@ -1,20 +1,25 @@ -PROG ?= example -SSL = ? +PROG ?= example # Program we are building +DELETE = rm -rf # Command to remove files +OUT ?= -o $(PROG) # Compiler argument for output file +SOURCES = main.c mongoose.c # Source code files +CFLAGS = -W -Wall -Wextra -g -I. # Build options -ifeq "$(SSL)" "MBEDTLS" -CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509 +# Mongoose build options. See https://mongoose.ws/documentation/#build-options +CFLAGS_MONGOOSE += -DMG_ENABLE_LINES + +ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe + PROG ?= example.exe # Use .exe suffix for the binary + CC = gcc # Use MinGW gcc compiler + CFLAGS += -lws2_32 # Link against Winsock library + DELETE = cmd /C del /Q /F /S # Command prompt command to delete files + OUT ?= -o $(PROG) # Build output endif -ifeq "$(SSL)" "OPENSSL" -CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto -endif +all: $(PROG) # Default target. Build and run program + $(RUN) ./$(PROG) $(ARGS) -all: $(PROG) - $(DEBUGGER) ./$(PROG) $(ARGS) +$(PROG): $(SOURCES) # Build program from sources + $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT) - -$(PROG): main.c - $(CC) ../../mongoose.c -I../.. -W -Wall $(CFLAGS) $(EXTRA_CFLAGS) -o $(PROG) main.c - -clean: - rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb +clean: # Cleanup. Delete built program and all build artifacts + $(DELETE) $(PROG) *.o *.obj *.exe *.dSYM diff --git a/examples/webui-login/mongoose.c b/examples/webui-login/mongoose.c new file mode 120000 index 00000000..8ef6e62d --- /dev/null +++ b/examples/webui-login/mongoose.c @@ -0,0 +1 @@ +../../mongoose.c \ No newline at end of file diff --git a/examples/webui-login/mongoose.h b/examples/webui-login/mongoose.h new file mode 120000 index 00000000..488ef358 --- /dev/null +++ b/examples/webui-login/mongoose.h @@ -0,0 +1 @@ +../../mongoose.h \ No newline at end of file diff --git a/examples/webui-plain/Makefile b/examples/webui-plain/Makefile index f6ad5474..b231dd04 100644 --- a/examples/webui-plain/Makefile +++ b/examples/webui-plain/Makefile @@ -1,21 +1,25 @@ -PROG ?= example -CFLAGS ?= -W -Wall -Wextra -O2 -SSL = ? +PROG ?= example # Program we are building +DELETE = rm -rf # Command to remove files +OUT ?= -o $(PROG) # Compiler argument for output file +SOURCES = main.c mongoose.c # Source code files +CFLAGS = -W -Wall -Wextra -g -I. # Build options -ifeq "$(SSL)" "MBEDTLS" -CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509 -L$(MBEDTLS)/lib -I$(MBEDTLS)/include +# Mongoose build options. See https://mongoose.ws/documentation/#build-options +CFLAGS_MONGOOSE += -DMG_ENABLE_LINES + +ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe + PROG ?= example.exe # Use .exe suffix for the binary + CC = gcc # Use MinGW gcc compiler + CFLAGS += -lws2_32 # Link against Winsock library + DELETE = cmd /C del /Q /F /S # Command prompt command to delete files + OUT ?= -o $(PROG) # Build output endif -ifeq "$(SSL)" "OPENSSL" -CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto -L$(OPENSSL)/lib -I$(OPENSSL)/include -endif +all: $(PROG) # Default target. Build and run program + $(RUN) ./$(PROG) $(ARGS) -all: $(PROG) - $(DEBUGGER) ./$(PROG) $(ARGS) +$(PROG): $(SOURCES) # Build program from sources + $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT) - -$(PROG): main.c - $(CC) ../../mongoose.c -I../.. $(CFLAGS) $(EXTRA_CFLAGS) -o $(PROG) main.c - -clean: - rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb +clean: # Cleanup. Delete built program and all build artifacts + $(DELETE) $(PROG) *.o *.obj *.exe *.dSYM diff --git a/examples/webui-plain/ca.pem b/examples/webui-plain/ca.pem deleted file mode 120000 index 8addd9e2..00000000 --- a/examples/webui-plain/ca.pem +++ /dev/null @@ -1 +0,0 @@ -../../test/data/ca.pem \ No newline at end of file diff --git a/examples/webui-plain/mongoose.c b/examples/webui-plain/mongoose.c new file mode 120000 index 00000000..8ef6e62d --- /dev/null +++ b/examples/webui-plain/mongoose.c @@ -0,0 +1 @@ +../../mongoose.c \ No newline at end of file diff --git a/examples/webui-plain/mongoose.h b/examples/webui-plain/mongoose.h new file mode 120000 index 00000000..488ef358 --- /dev/null +++ b/examples/webui-plain/mongoose.h @@ -0,0 +1 @@ +../../mongoose.h \ No newline at end of file diff --git a/examples/webui-preact/Makefile b/examples/webui-preact/Makefile index 9addcb99..b231dd04 100644 --- a/examples/webui-preact/Makefile +++ b/examples/webui-preact/Makefile @@ -1,20 +1,25 @@ -PROG ?= example -SSL = ? +PROG ?= example # Program we are building +DELETE = rm -rf # Command to remove files +OUT ?= -o $(PROG) # Compiler argument for output file +SOURCES = main.c mongoose.c # Source code files +CFLAGS = -W -Wall -Wextra -g -I. # Build options -ifeq "$(SSL)" "MBEDTLS" -CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509 +# Mongoose build options. See https://mongoose.ws/documentation/#build-options +CFLAGS_MONGOOSE += -DMG_ENABLE_LINES + +ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe + PROG ?= example.exe # Use .exe suffix for the binary + CC = gcc # Use MinGW gcc compiler + CFLAGS += -lws2_32 # Link against Winsock library + DELETE = cmd /C del /Q /F /S # Command prompt command to delete files + OUT ?= -o $(PROG) # Build output endif -ifeq "$(SSL)" "OPENSSL" -CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto -endif +all: $(PROG) # Default target. Build and run program + $(RUN) ./$(PROG) $(ARGS) -all: $(PROG) - $(DEBUGGER) ./$(PROG) $(ARGS) +$(PROG): $(SOURCES) # Build program from sources + $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT) - -$(PROG): main.c - $(CC) ../../mongoose.c -I../.. -W -Wall $(CFLAGS) $(EXTRA_CFLAGS) -o $(PROG) main.c - -clean: - rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb +clean: # Cleanup. Delete built program and all build artifacts + $(DELETE) $(PROG) *.o *.obj *.exe *.dSYM diff --git a/examples/webui-preact/ca.pem b/examples/webui-preact/ca.pem deleted file mode 120000 index 8addd9e2..00000000 --- a/examples/webui-preact/ca.pem +++ /dev/null @@ -1 +0,0 @@ -../../test/data/ca.pem \ No newline at end of file diff --git a/examples/webui-preact/mongoose.c b/examples/webui-preact/mongoose.c new file mode 120000 index 00000000..8ef6e62d --- /dev/null +++ b/examples/webui-preact/mongoose.c @@ -0,0 +1 @@ +../../mongoose.c \ No newline at end of file diff --git a/examples/webui-preact/mongoose.h b/examples/webui-preact/mongoose.h new file mode 120000 index 00000000..488ef358 --- /dev/null +++ b/examples/webui-preact/mongoose.h @@ -0,0 +1 @@ +../../mongoose.h \ No newline at end of file diff --git a/examples/webui-push-rest/Makefile b/examples/webui-push-rest/Makefile index 9addcb99..b231dd04 100644 --- a/examples/webui-push-rest/Makefile +++ b/examples/webui-push-rest/Makefile @@ -1,20 +1,25 @@ -PROG ?= example -SSL = ? +PROG ?= example # Program we are building +DELETE = rm -rf # Command to remove files +OUT ?= -o $(PROG) # Compiler argument for output file +SOURCES = main.c mongoose.c # Source code files +CFLAGS = -W -Wall -Wextra -g -I. # Build options -ifeq "$(SSL)" "MBEDTLS" -CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509 +# Mongoose build options. See https://mongoose.ws/documentation/#build-options +CFLAGS_MONGOOSE += -DMG_ENABLE_LINES + +ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe + PROG ?= example.exe # Use .exe suffix for the binary + CC = gcc # Use MinGW gcc compiler + CFLAGS += -lws2_32 # Link against Winsock library + DELETE = cmd /C del /Q /F /S # Command prompt command to delete files + OUT ?= -o $(PROG) # Build output endif -ifeq "$(SSL)" "OPENSSL" -CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto -endif +all: $(PROG) # Default target. Build and run program + $(RUN) ./$(PROG) $(ARGS) -all: $(PROG) - $(DEBUGGER) ./$(PROG) $(ARGS) +$(PROG): $(SOURCES) # Build program from sources + $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT) - -$(PROG): main.c - $(CC) ../../mongoose.c -I../.. -W -Wall $(CFLAGS) $(EXTRA_CFLAGS) -o $(PROG) main.c - -clean: - rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb +clean: # Cleanup. Delete built program and all build artifacts + $(DELETE) $(PROG) *.o *.obj *.exe *.dSYM diff --git a/examples/webui-push-rest/mongoose.c b/examples/webui-push-rest/mongoose.c new file mode 120000 index 00000000..8ef6e62d --- /dev/null +++ b/examples/webui-push-rest/mongoose.c @@ -0,0 +1 @@ +../../mongoose.c \ No newline at end of file diff --git a/examples/webui-push-rest/mongoose.h b/examples/webui-push-rest/mongoose.h new file mode 120000 index 00000000..488ef358 --- /dev/null +++ b/examples/webui-push-rest/mongoose.h @@ -0,0 +1 @@ +../../mongoose.h \ No newline at end of file diff --git a/examples/webui-push-ws/Makefile b/examples/webui-push-ws/Makefile index 9addcb99..b231dd04 100644 --- a/examples/webui-push-ws/Makefile +++ b/examples/webui-push-ws/Makefile @@ -1,20 +1,25 @@ -PROG ?= example -SSL = ? +PROG ?= example # Program we are building +DELETE = rm -rf # Command to remove files +OUT ?= -o $(PROG) # Compiler argument for output file +SOURCES = main.c mongoose.c # Source code files +CFLAGS = -W -Wall -Wextra -g -I. # Build options -ifeq "$(SSL)" "MBEDTLS" -CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509 +# Mongoose build options. See https://mongoose.ws/documentation/#build-options +CFLAGS_MONGOOSE += -DMG_ENABLE_LINES + +ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe + PROG ?= example.exe # Use .exe suffix for the binary + CC = gcc # Use MinGW gcc compiler + CFLAGS += -lws2_32 # Link against Winsock library + DELETE = cmd /C del /Q /F /S # Command prompt command to delete files + OUT ?= -o $(PROG) # Build output endif -ifeq "$(SSL)" "OPENSSL" -CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto -endif +all: $(PROG) # Default target. Build and run program + $(RUN) ./$(PROG) $(ARGS) -all: $(PROG) - $(DEBUGGER) ./$(PROG) $(ARGS) +$(PROG): $(SOURCES) # Build program from sources + $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT) - -$(PROG): main.c - $(CC) ../../mongoose.c -I../.. -W -Wall $(CFLAGS) $(EXTRA_CFLAGS) -o $(PROG) main.c - -clean: - rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb +clean: # Cleanup. Delete built program and all build artifacts + $(DELETE) $(PROG) *.o *.obj *.exe *.dSYM diff --git a/examples/webui-push-ws/mongoose.c b/examples/webui-push-ws/mongoose.c new file mode 120000 index 00000000..8ef6e62d --- /dev/null +++ b/examples/webui-push-ws/mongoose.c @@ -0,0 +1 @@ +../../mongoose.c \ No newline at end of file diff --git a/examples/webui-push-ws/mongoose.h b/examples/webui-push-ws/mongoose.h new file mode 120000 index 00000000..488ef358 --- /dev/null +++ b/examples/webui-push-ws/mongoose.h @@ -0,0 +1 @@ +../../mongoose.h \ No newline at end of file diff --git a/examples/webui-rest/Makefile b/examples/webui-rest/Makefile index 9addcb99..b231dd04 100644 --- a/examples/webui-rest/Makefile +++ b/examples/webui-rest/Makefile @@ -1,20 +1,25 @@ -PROG ?= example -SSL = ? +PROG ?= example # Program we are building +DELETE = rm -rf # Command to remove files +OUT ?= -o $(PROG) # Compiler argument for output file +SOURCES = main.c mongoose.c # Source code files +CFLAGS = -W -Wall -Wextra -g -I. # Build options -ifeq "$(SSL)" "MBEDTLS" -CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509 +# Mongoose build options. See https://mongoose.ws/documentation/#build-options +CFLAGS_MONGOOSE += -DMG_ENABLE_LINES + +ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe + PROG ?= example.exe # Use .exe suffix for the binary + CC = gcc # Use MinGW gcc compiler + CFLAGS += -lws2_32 # Link against Winsock library + DELETE = cmd /C del /Q /F /S # Command prompt command to delete files + OUT ?= -o $(PROG) # Build output endif -ifeq "$(SSL)" "OPENSSL" -CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto -endif +all: $(PROG) # Default target. Build and run program + $(RUN) ./$(PROG) $(ARGS) -all: $(PROG) - $(DEBUGGER) ./$(PROG) $(ARGS) +$(PROG): $(SOURCES) # Build program from sources + $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT) - -$(PROG): main.c - $(CC) ../../mongoose.c -I../.. -W -Wall $(CFLAGS) $(EXTRA_CFLAGS) -o $(PROG) main.c - -clean: - rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb +clean: # Cleanup. Delete built program and all build artifacts + $(DELETE) $(PROG) *.o *.obj *.exe *.dSYM diff --git a/examples/webui-rest/ca.pem b/examples/webui-rest/ca.pem deleted file mode 120000 index 8addd9e2..00000000 --- a/examples/webui-rest/ca.pem +++ /dev/null @@ -1 +0,0 @@ -../../test/data/ca.pem \ No newline at end of file diff --git a/examples/webui-rest/mongoose.c b/examples/webui-rest/mongoose.c new file mode 120000 index 00000000..8ef6e62d --- /dev/null +++ b/examples/webui-rest/mongoose.c @@ -0,0 +1 @@ +../../mongoose.c \ No newline at end of file diff --git a/examples/webui-rest/mongoose.h b/examples/webui-rest/mongoose.h new file mode 120000 index 00000000..488ef358 --- /dev/null +++ b/examples/webui-rest/mongoose.h @@ -0,0 +1 @@ +../../mongoose.h \ No newline at end of file