Makefile 543 B

12345678910111213141516171819202122
  1. PROG ?= example
  2. CFLAGS ?= -DMG_ENABLE_LINES $(EXTRA)
  3. ifneq ($(MBEDTLS),)
  4. CFLAGS += -DMG_ENABLE_MBEDTLS=1 -I$(MBEDTLS)/include -I/usr/include
  5. CFLAGS += -L$(MBEDTLS)/lib -lmbedtls -lmbedcrypto -lmbedx509
  6. endif
  7. ifneq ($(OPENSSL),)
  8. CFLAGS += -DMG_ENABLE_OPENSSL=1 -I$(OPENSSL)/include
  9. CFLAGS += -L$(OPENSSL)/lib -lssl -lcrypto
  10. endif
  11. all: $(PROG)
  12. $(DEBUGGER) ./$(PROG) $(ARGS)
  13. $(PROG): main.c
  14. $(CC) ../../mongoose.c -I../.. -W -Wall $(CFLAGS) -o $(PROG) main.c
  15. clean:
  16. rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb