mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-28 23:49:44 +08:00
updated SSL build options
This commit is contained in:
parent
2536865c4d
commit
75069a44c7
@ -1,12 +1,13 @@
|
||||
PROG ?= example
|
||||
|
||||
CFLAGS ?= -W -Wall -DMG_ENABLE_LINES=1
|
||||
ifneq ($(MBEDTLS_DIR),)
|
||||
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -I$(MBEDTLS_DIR)/include -I/usr/include
|
||||
CFLAGS += -L$(MBEDTLS_DIR)/lib -lmbedtls -lmbedcrypto -lmbedx509
|
||||
else ifneq ($(OPENSSL_DIR),)
|
||||
CFLAGS += -DMG_ENABLE_OPENSSL=1 -I$(OPENSSL_DIR)/include
|
||||
CFLAGS += -L$(OPENSSL_DIR)/lib -lssl -lcrypto
|
||||
SSL = ?
|
||||
|
||||
ifeq "$(SSL)" "MBEDTLS"
|
||||
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509
|
||||
endif
|
||||
|
||||
ifeq "$(SSL)" "OPENSSL"
|
||||
CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto
|
||||
endif
|
||||
|
||||
all: $(PROG)
|
||||
|
@ -9,7 +9,7 @@
|
||||
// any other URI serves static files from s_root_dir
|
||||
//
|
||||
// To enable SSL/TLS (using self-signed certificates in PEM files),
|
||||
// 1. make MBEDTLS_DIR=/path/to/your/mbedtls/installation
|
||||
// 1. make SSL=OPENSSL or make SSL=MBEDTLS
|
||||
// 2. curl -k https://127.0.0.1:8443
|
||||
|
||||
#include "mongoose.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user