mongoose/examples/examples.mk
Alexander Alashkin c581b5e532 Add mg/examples-wine to OurCI
PUBLISHED_FROM=2781248e982719cda495370a373f66d6e4213d83
2016-03-10 13:11:23 +01:00

32 lines
731 B
Makefile

SOURCES = $(PROG).c ../../mongoose.c
CFLAGS = -g -W -Wall -I../.. -Wno-unused-function $(CFLAGS_EXTRA) $(MODULE_CFLAGS)
all: $(PROG)
ifeq ($(OS), Windows_NT)
# TODO(alashkin): enable SSL in Windows
CFLAGS += -lws2_32 -D_MG_PROVIDE_STRNLEN
CC = gcc
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
$(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)