mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-28 15:40:23 +08:00
eaef5bd133
This reverts commit 1a17e17c462bdd4e1d26d8742f8b7087273e04c2. PUBLISHED_FROM=80028de308c9a021955d1425d2bfee8feb85f193
37 lines
886 B
Makefile
37 lines
886 B
Makefile
SOURCES = $(PROG).c ../../mongoose.c
|
|
CFLAGS = -g -W -Wall -Werror -I../.. -Wno-unused-function $(CFLAGS_EXTRA) $(MODULE_CFLAGS)
|
|
|
|
all: $(PROG)
|
|
|
|
ifeq ($(OS), Windows_NT)
|
|
# TODO(alashkin): enable SSL in Windows
|
|
CFLAGS += -lws2_32
|
|
CC = gcc
|
|
else
|
|
CFLAGS += -pthread
|
|
endif
|
|
|
|
ifeq ($(SSL_LIB),openssl)
|
|
CFLAGS += -DMG_ENABLE_SSL -lssl -lcrypto
|
|
endif
|
|
ifeq ($(SSL_LIB), krypton)
|
|
CFLAGS += -DMG_ENABLE_SSL ../../../krypton/krypton.c -I../../../krypton
|
|
endif
|
|
ifeq ($(SSL_LIB),mbedtls)
|
|
CFLAGS += -DMG_ENABLE_SSL -DMG_SSL_IF=MG_SSL_IF_MBEDTLS -DMG_SSL_MBED_DUMMY_RANDOM -lmbedcrypto -lmbedtls -lmbedx509
|
|
endif
|
|
|
|
ifeq ($(JS), yes)
|
|
V7_PATH = ../../deps/v7
|
|
CFLAGS_EXTRA += -DMG_ENABLE_JAVASCRIPT -I $(V7_PATH) $(V7_PATH)/v7.c
|
|
endif
|
|
|
|
$(PROG): $(SOURCES)
|
|
$(CC) $(SOURCES) -o $@ $(CFLAGS)
|
|
|
|
$(PROG).exe: $(SOURCES)
|
|
cl $(SOURCES) /I../.. /MD /Fe$@
|
|
|
|
clean:
|
|
rm -rf *.gc* *.dSYM *.exe *.obj *.o a.out $(PROG)
|