From 481c4e34d8cfae12dfa0ad1c9e8eb7ef81f2b9da Mon Sep 17 00:00:00 2001 From: bol-van Date: Fri, 17 Jun 2022 15:00:21 +0300 Subject: [PATCH] ip2net,mdig : update makefile to support win compile --- ip2net/Makefile | 6 +++++- mdig/Makefile | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ip2net/Makefile b/ip2net/Makefile index 88cf5b9..5048302 100644 --- a/ip2net/Makefile +++ b/ip2net/Makefile @@ -3,7 +3,8 @@ CFLAGS += -std=gnu99 -Wno-logical-op-parentheses -O3 CFLAGS_BSD = -Wno-address-of-packed-member -Wno-switch CFLAGS_MAC = -mmacosx-version-min=10.8 LIBS = -SRC_FILES = *.c +LIBS_WIN = -lws2_32 +SRC_FILES = ip2net.c qsort.c all: ip2net @@ -17,5 +18,8 @@ mac: $(SRC_FILES) $(CC) $(CFLAGS) $(CFLAGS_BSD) $(CFLAGS_MAC) -o ip2net $(SRC_FILES) $(LDFLAGS) $(LIBS) strip ip2net +win: $(SRC_FILES) + $(CC) $(CFLAGS) -o ip2net $(SRC_FILES) $(LDFLAGS) $(LIBS_WIN) + clean: rm -f ip2net *.o diff --git a/mdig/Makefile b/mdig/Makefile index fc410f3..d346d0d 100644 --- a/mdig/Makefile +++ b/mdig/Makefile @@ -3,6 +3,7 @@ CFLAGS += -std=gnu99 -Wno-logical-op-parentheses -O3 CFLAGS_BSD = -Wno-address-of-packed-member -Wno-switch CFLAGS_MAC = -mmacosx-version-min=10.8 LIBS = -lpthread +LIBS_WIN = -lws2_32 SRC_FILES = *.c all: mdig @@ -17,5 +18,8 @@ mac: $(SRC_FILES) $(CC) $(CFLAGS) $(CFLAGS_BSD) $(CFLAGS_MAC) -o mdig $(SRC_FILES) $(LDFLAGS) $(LIBS) strip mdig +win: $(SRC_FILES) + $(CC) $(CFLAGS) -o mdig -static $(SRC_FILES) $(LDFLAGS) $(LIBS_WIN) + clean: rm -f mdig *.o