Just check the CYGWIN part; don't depend on the fact that it's NT 5.1. (Of
course, uname isn't supposed to report such things by default anyway... but
that's cygwin for you.)
PYINCLUDE:=$(shell python2.5-config --includes)
PYLIB:=$(shell python2.5-config --lib)
-OS:=$(shell uname)
+OS:=$(shell uname | sed 's/[-_].*//')
MACHINE:=$(shell uname -m)
CFLAGS=-Wall -g -O2 -Werror $(PYINCLUDE) -g
-ifneq ($(OS),CYGWIN_NT-5.1)
+ifneq ($(OS),CYGWIN)
CFLAGS += -fPIC
endif
SHARED=-shared
CFLAGS += -arch $(MACHINE)
SHARED = -dynamiclib
endif
-ifeq ($(OS),CYGWIN_NT-5.1)
+ifeq ($(OS),CYGWIN)
LDFLAGS += -L/usr/bin
EXT:=.exe
SOEXT:=.dll