From 7fc3d956abe8c4f7e11149c280bce6296c904621 Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Sun, 8 Apr 2012 19:26:54 +0900 Subject: [PATCH] Add support of build rule for mingw env. --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 39205f1..125ebb0 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,14 @@ CC = gcc CFLAGS = -O3 -Wall LDFLAGS = +# gcc only +CCMACHINE = $(shell $(CC) -dumpmachine) + +# On windows + mingw, link winsock2 lib. +ifeq ($(findstring mingw32, $(CCMACHINE)), mingw32) +LDFLAGS += -lws2_32 +endif + .PHONY: all all: lfpsplitter