mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-14 01:38:01 +08:00
Merge pull request #2963 from cesanta/uaws
unbreak AWS example and associated tests
This commit is contained in:
commit
991080e613
@ -1,4 +1,4 @@
|
|||||||
PROG ?= example # Program we are building
|
PROG ?= client # Program we are building
|
||||||
DELETE = rm -rf # Command to remove files
|
DELETE = rm -rf # Command to remove files
|
||||||
OUT ?= -o $(PROG) # Compiler argument for output file
|
OUT ?= -o $(PROG) # Compiler argument for output file
|
||||||
CFLAGS = -W -Wall -Wextra -g -I. # Build options
|
CFLAGS = -W -Wall -Wextra -g -I. # Build options
|
||||||
@ -6,12 +6,9 @@ SOURCES = main.c mongoose.c mongoose_fs.c
|
|||||||
|
|
||||||
# Mongoose build options. See https://mongoose.ws/documentation/#build-options
|
# Mongoose build options. See https://mongoose.ws/documentation/#build-options
|
||||||
CFLAGS_MONGOOSE += -DMG_ENABLE_PACKED_FS=1
|
CFLAGS_MONGOOSE += -DMG_ENABLE_PACKED_FS=1
|
||||||
#CFLAGS_MONGOOSE += -DMG_TLS=MG_TLS_BUILTIN
|
|
||||||
CFLAGS_MONGOOSE += -DMG_TLS=MG_TLS_OPENSSL -lssl -lcrypto -I/opt/homebrew/opt/openssl@3.4/include/ -L/opt/homebrew/opt/openssl@3.4/lib
|
|
||||||
#CFLAGS_MONGOOSE += -DMG_TLS=MG_TLS_MBED -lmbedtls -lmbedcrypto -lmbedx509 -I/opt/homebrew/opt/mbedtls/include/ -L/opt/homebrew/opt/mbedtls/lib
|
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
|
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
|
PROG ?= client.exe # Use .exe suffix for the binary
|
||||||
CC = gcc # Use MinGW gcc compiler
|
CC = gcc # Use MinGW gcc compiler
|
||||||
CFLAGS += -lws2_32 # Link against Winsock library
|
CFLAGS += -lws2_32 # Link against Winsock library
|
||||||
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
|
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
|
||||||
@ -25,7 +22,7 @@ all: $(PROG)
|
|||||||
$(PROG): $(SOURCES) Makefile
|
$(PROG): $(SOURCES) Makefile
|
||||||
$(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
|
$(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
|
||||||
|
|
||||||
csr:
|
csr: FORCE
|
||||||
openssl ecparam -noout -name prime256v1 -genkey -out key.pem
|
openssl ecparam -noout -name prime256v1 -genkey -out key.pem
|
||||||
openssl req -new -key key.pem -subj /CN=Mongoose -out crt.csr
|
openssl req -new -key key.pem -subj /CN=Mongoose -out crt.csr
|
||||||
|
|
||||||
@ -34,3 +31,9 @@ mongoose_fs.c: ca.pem crt.pem key.pem
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(DELETE) $(PROG) *.o *.obj *.exe *.dSYM mbedtls
|
$(DELETE) $(PROG) *.o *.obj *.exe *.dSYM mbedtls
|
||||||
|
|
||||||
|
# For automated test purposes only
|
||||||
|
example: FORCE
|
||||||
|
touch mongoose_fs.c
|
||||||
|
|
||||||
|
FORCE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user