23 lines
700 B
Makefile
Raw Normal View History

2022-06-13 02:03:52 +01:00
PROG ?= example
2022-09-09 11:11:53 +01:00
DEFS ?= -DMG_ENABLE_LINES=1 -DMG_ENABLE_MIP=1 -DMG_ENABLE_SOCKET=0 -DMG_ENABLE_PACKED_FS=1 -I../..
CFLAGS ?= -W -Wall $(EXTRA_CFLAGS)
2022-06-13 02:03:52 +01:00
LIBS ?= -lpcap
2022-09-07 20:48:23 +01:00
SOURCES = main.c ../../mongoose.c ../device-dashboard/net.c ../device-dashboard/packed_fs.c
2022-06-13 02:03:52 +01:00
2022-09-09 11:11:53 +01:00
ifeq "$(SSL)" "MBEDTLS"
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509 -I$(MBEDTLS)/include -L$(MBEDTLS)/lib
endif
ifeq "$(SSL)" "OPENSSL"
CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto -I$(OPENSSL)/include -L$(OPENSSL)/lib
endif
2022-06-13 02:03:52 +01:00
all: $(PROG)
$(RUN) ./$(PROG) $(ARGS)
$(PROG): main.c
2022-09-07 20:48:23 +01:00
$(CC) $(SOURCES) $(CFLAGS) $(DEFS) -o $(PROG) $(LIBS)
2022-06-13 02:03:52 +01:00
clean:
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb