2015-10-02 13:25:02 +03:00
|
|
|
SOURCES = $(PROG).c ../../mongoose.c
|
2016-02-26 00:12:32 +00:00
|
|
|
CFLAGS = -g -W -Wall -I../.. -Wno-unused-function $(CFLAGS_EXTRA) $(MODULE_CFLAGS)
|
2015-10-02 13:25:02 +03:00
|
|
|
|
|
|
|
all: $(PROG)
|
|
|
|
|
2016-03-08 13:27:34 +02:00
|
|
|
ifeq ($(OS), Windows_NT)
|
|
|
|
# TODO(alashkin): enable SSL in Windows
|
2016-03-19 11:02:09 +01:00
|
|
|
CFLAGS += -lws2_32
|
2016-03-09 10:59:32 +01:00
|
|
|
CC = gcc
|
2016-03-08 13:27:34 +02:00
|
|
|
else
|
|
|
|
ifeq ($(SSL_LIB),openssl)
|
|
|
|
CFLAGS += -DMG_ENABLE_SSL -lssl -lcrypto
|
|
|
|
else ifeq ($(SSL_LIB), krypton)
|
|
|
|
CFLAGS += -DMG_ENABLE_SSL ../../../krypton/krypton.c
|
|
|
|
endif
|
|
|
|
CFLAGS += -lpthread
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(JS), yes)
|
|
|
|
V7_PATH = ../../deps/v7
|
|
|
|
CFLAGS_EXTRA += -DMG_ENABLE_JAVASCRIPT -I $(V7_PATH) $(V7_PATH)/v7.c
|
|
|
|
endif
|
|
|
|
|
2015-10-02 13:25:02 +03:00
|
|
|
$(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)
|