ip2net,mdig : update makefile to support win compile

This commit is contained in:
bol-van 2022-06-17 15:00:21 +03:00
parent 4230a9ae32
commit 481c4e34d8
2 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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