mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-06 13:37:34 +08:00
fixed comment, updated TLS section in makefile
This commit is contained in:
parent
46bf79455c
commit
3bd3a4ff7b
@ -1,16 +1,15 @@
|
|||||||
PROG ?= example
|
PROG ?= example
|
||||||
ROOT ?= $(realpath $(CURDIR)/../..)
|
ROOT ?= $(realpath $(CURDIR)/../..)
|
||||||
CFLAGS ?= -DMG_ENABLE_LINES $(EXTRA)
|
CFLAGS ?= -DMG_ENABLE_LINES $(EXTRA_CFLAGS)
|
||||||
LIN = docker run -it --rm -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/cc2
|
LIN = docker run -it --rm -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/cc2
|
||||||
|
SSL = ?
|
||||||
|
|
||||||
ifneq ($(MBEDTLS),)
|
ifeq "$(SSL)" "MBEDTLS"
|
||||||
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -I$(MBEDTLS)/include -I/usr/include
|
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509
|
||||||
CFLAGS += -L$(MBEDTLS)/lib -lmbedtls -lmbedcrypto -lmbedx509
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(OPENSSL),)
|
ifeq "$(SSL)" "OPENSSL"
|
||||||
CFLAGS += -DMG_ENABLE_OPENSSL=1 -I$(OPENSSL)/include
|
CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto
|
||||||
CFLAGS += -L$(OPENSSL)/lib -lssl -lcrypto
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: $(PROG)
|
all: $(PROG)
|
||||||
|
@ -68,7 +68,7 @@ int main(int argc, char *argv[]) {
|
|||||||
mg_log_set(log_level); // Set to 0 to disable debug
|
mg_log_set(log_level); // Set to 0 to disable debug
|
||||||
mg_mgr_init(&mgr); // Initialise event manager
|
mg_mgr_init(&mgr); // Initialise event manager
|
||||||
mg_http_connect(&mgr, s_url, fn, &done); // Create client connection
|
mg_http_connect(&mgr, s_url, fn, &done); // Create client connection
|
||||||
while (!done) mg_mgr_poll(&mgr, 50); // Infinite event loop
|
while (!done) mg_mgr_poll(&mgr, 50); // Event manager loops until 'done'
|
||||||
mg_mgr_free(&mgr); // Free resources
|
mg_mgr_free(&mgr); // Free resources
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user