mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-31 01:13:01 +08:00
296affc6e4
PUBLISHED_FROM=ea039cdc30aec44db074871ff6b2d2582f98b5c9
32 lines
753 B
Makefile
32 lines
753 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
|
|
ifeq ($(SSL_LIB),openssl)
|
|
CFLAGS += -DMG_ENABLE_SSL -lssl -lcrypto
|
|
else ifeq ($(SSL_LIB), krypton)
|
|
CFLAGS += -DMG_ENABLE_SSL -DMG_DISABLE_PFS ../../../krypton/krypton.c -I../../../krypton
|
|
endif
|
|
CFLAGS += -lpthread
|
|
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)
|