2020-12-10 21:26:05 +08:00
|
|
|
PROG ?= example
|
2021-12-14 20:42:41 +08:00
|
|
|
CFLAGS ?= -W -Wall -DMG_ENABLE_LINES=1
|
2022-06-30 04:27:40 +08:00
|
|
|
SSL = ?
|
|
|
|
|
|
|
|
ifeq "$(SSL)" "MBEDTLS"
|
|
|
|
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq "$(SSL)" "OPENSSL"
|
|
|
|
CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto
|
2020-12-18 17:01:14 +08:00
|
|
|
endif
|
|
|
|
|
2020-12-10 21:26:05 +08:00
|
|
|
all: $(PROG)
|
|
|
|
$(DEBUGGER) ./$(PROG) $(ARGS)
|
|
|
|
|
|
|
|
$(PROG): main.c
|
2021-12-14 20:42:41 +08:00
|
|
|
$(CC) ../../mongoose.c -I../.. $(CFLAGS) $(EFLAGS) -o $(PROG) main.c
|
2020-12-10 21:26:05 +08:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb
|