mongoose/examples/mip-pcap/Makefile

23 lines
700 B
Makefile
Raw Normal View History

2022-06-13 09:03:52 +08:00
PROG ?= example
2022-09-09 18:11:53 +08: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 09:03:52 +08:00
LIBS ?= -lpcap
2022-09-08 03:48:23 +08:00
SOURCES = main.c ../../mongoose.c ../device-dashboard/net.c ../device-dashboard/packed_fs.c
2022-06-13 09:03:52 +08:00
2022-09-09 18:11:53 +08: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 09:03:52 +08:00
all: $(PROG)
$(RUN) ./$(PROG) $(ARGS)
$(PROG): main.c
2022-09-08 03:48:23 +08:00
$(CC) $(SOURCES) $(CFLAGS) $(DEFS) -o $(PROG) $(LIBS)
2022-06-13 09:03:52 +08:00
clean:
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb