]> arthur.barton.de Git - bup.git/commitdiff
Makefile: work with cygwin on different windows versions.
authorAvery Pennarun <apenwarr@gmail.com>
Mon, 11 Jan 2010 19:57:23 +0000 (14:57 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Mon, 11 Jan 2010 19:57:23 +0000 (14:57 -0500)
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.)

Makefile

index ee359cc90324fdb26d4999c197c03e63c0713fc1..063b3e5cc3c35e4e2f591fdb075722f44013d555 100644 (file)
--- 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