2015-09-08 19:49:03 +08:00
|
|
|
PROG = restful_server
|
|
|
|
SOURCES = $(PROG).c ../../mongoose.c
|
|
|
|
CFLAGS = -W -Wall -I../.. $(CFLAGS_EXTRA)
|
|
|
|
|
|
|
|
ifeq ($(SSL), openssl)
|
2015-09-19 19:38:46 +08:00
|
|
|
CFLAGS += -DMG_ENABLE_SSL -lssl -lcrypto -lcrypto
|
2015-09-08 19:49:03 +08:00
|
|
|
else ifeq ($(SSL), krypton)
|
2015-09-19 19:38:46 +08:00
|
|
|
CFLAGS += -DMG_ENABLE_SSL ../../../krypton/krypton.c
|
2015-09-08 19:49:03 +08:00
|
|
|
endif
|
|
|
|
|
2015-09-22 00:58:45 +08:00
|
|
|
ifeq ($(JS), yes)
|
2015-10-07 04:35:30 +08:00
|
|
|
V7_PATH = ../../deps/v7
|
2015-09-22 00:58:45 +08:00
|
|
|
CFLAGS_EXTRA += -DMG_ENABLE_JAVASCRIPT -I $(V7_PATH) $(V7_PATH)/v7.c
|
|
|
|
endif
|
|
|
|
|
2015-09-08 19:49:03 +08:00
|
|
|
all: $(PROG)
|
|
|
|
|
|
|
|
$(PROG): $(SOURCES)
|
|
|
|
$(CC) $(SOURCES) -o $@ $(CFLAGS)
|
|
|
|
|
|
|
|
$(PROG).exe: $(SOURCES)
|
2015-09-19 19:38:46 +08:00
|
|
|
cl $(SOURCES) /I../.. /MD /DMG_ENABLE_THREADS /Fe$@ advapi32.lib
|
2015-09-08 19:49:03 +08:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf *.gc* *.dSYM *.exe *.obj *.o a.out $(PROG)
|