From: Avery Pennarun Date: Mon, 11 Jan 2010 19:57:23 +0000 (-0500) Subject: Makefile: work with cygwin on different windows versions. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3b66ed1054ad911f6b4cd95faf36798aea8a4156;p=packages%2Fb%2Fbup.git Makefile: work with cygwin on different windows versions. 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.) --- diff --git a/Makefile b/Makefile index ee359cc..063b3e5 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ 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 @@ -13,7 +13,7 @@ ifeq (${OS},Darwin) CFLAGS += -arch $(MACHINE) SHARED = -dynamiclib endif -ifeq ($(OS),CYGWIN_NT-5.1) +ifeq ($(OS),CYGWIN) LDFLAGS += -L/usr/bin EXT:=.exe SOEXT:=.dll