2022-07-13 04:12:26 +08:00
|
|
|
PROG ?= example
|
2022-08-11 19:11:50 +08:00
|
|
|
CFLAGS ?= -W -Wall -Wextra -O2
|
2022-07-13 04:12:26 +08:00
|
|
|
SSL = ?
|
|
|
|
|
|
|
|
ifeq "$(SSL)" "MBEDTLS"
|
2022-08-11 19:11:50 +08:00
|
|
|
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509 -L$(MBEDTLS)/lib -I$(MBEDTLS)/include
|
2022-07-13 04:12:26 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq "$(SSL)" "OPENSSL"
|
2022-08-11 19:11:50 +08:00
|
|
|
CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto -L$(OPENSSL)/lib -I$(OPENSSL)/include
|
2022-07-13 04:12:26 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(PROG)
|
|
|
|
$(DEBUGGER) ./$(PROG) $(ARGS)
|
|
|
|
|
|
|
|
|
|
|
|
$(PROG): main.c
|
2022-08-11 19:11:50 +08:00
|
|
|
$(CC) ../../mongoose.c -I../.. $(CFLAGS) $(EXTRA_CFLAGS) -o $(PROG) main.c
|
2022-07-13 04:12:26 +08:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb
|