add -lws2_32 on MinGW

import/raw
weidai 2003-10-14 09:41:35 +00:00
parent 583c9c0dd6
commit 6bd077ec8d
1 changed files with 6 additions and 1 deletions

View File

@ -11,11 +11,16 @@ RANLIB = ranlib
UNAME = $(shell uname) UNAME = $(shell uname)
ISX86 = $(shell uname -m | grep -c "i.86\|x86_64") ISX86 = $(shell uname -m | grep -c "i.86\|x86_64")
GCC33ORLATER = $(shell gcc -v 2>&1 | grep -c "gcc version \(3.[3-9]\|[4-9]\)") GCC33ORLATER = $(shell gcc -v 2>&1 | grep -c "gcc version \(3.[3-9]\|[4-9]\)")
ISMINGW = $(shell uname | grep -c "MINGW32")
ifeq ($(ISX86) $(GCC33ORLATER),1 1) ifeq ($(ISX86) $(GCC33ORLATER) $(ISMINGW),1 1 0) # MINGW32 is missing the memalign function
CXXFLAGS += -msse2 CXXFLAGS += -msse2
endif endif
ifeq ($(ISMINGW),1)
LDLIBS += -lws2_32
endif
ifeq ($(UNAME),) # for DJGPP, where uname doesn't exist ifeq ($(UNAME),) # for DJGPP, where uname doesn't exist
CXXFLAGS += -mbnu210 CXXFLAGS += -mbnu210
else else