]> arthur.barton.de Git - bup.git/commitdiff
Remove .c and .o rules, apply flags to csetup.py
authorBrandon Low <lostlogic@lostlogicx.com>
Mon, 14 Feb 2011 19:27:29 +0000 (11:27 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Tue, 15 Feb 2011 03:07:37 +0000 (19:07 -0800)
The .c and .o rules were not used and were misleadingly implying that we
were already paying attention to LDFLAGS and CFLAGS.  Instead apply the
flags to csetup.py where they will actually do something.

Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
Makefile

index d18e2ed889eb780cd48b33c253414623c09d6a55..ccbc624e095c537de4b0c1cc1f224680459d935f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,8 @@
 OS:=$(shell uname | sed 's/[-_].*//')
-CFLAGS=-Wall -g -O2 -Werror $(PYINCLUDE) -g
-ifneq ($(OS),CYGWIN)
-  CFLAGS += -fPIC
-endif
-SHARED=-shared
+CFLAGS:=-Wall -O2 -Werror $(PYINCLUDE)
 SOEXT:=.so
 
-ifeq (${OS},Darwin)
-  MACHINE:=$(shell arch)
-  CFLAGS += -arch $(MACHINE)
-  SHARED = -dynamiclib
-endif
 ifeq ($(OS),CYGWIN)
-  LDFLAGS += -L/usr/bin
-  EXT:=.exe
   SOEXT:=.dll
 endif
 
@@ -71,7 +60,7 @@ install: all
 lib/bup/_helpers$(SOEXT): \
                lib/bup/bupsplit.c lib/bup/_helpers.c lib/bup/csetup.py
        @rm -f $@
-       cd lib/bup && $(PYTHON) csetup.py build
+       cd lib/bup && LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)" $(PYTHON) csetup.py build
        cp lib/bup/build/*/_helpers$(SOEXT) lib/bup/
 
 .PHONY: lib/bup/_version.py
@@ -96,9 +85,6 @@ test: all
 
 check: test
 
-%: %.o
-       $(CC) $(CFLAGS) (LDFLAGS) -o $@ $^ $(LIBS)
-
 bup: main.py
        rm -f $@
        ln -s $< $@
@@ -123,9 +109,6 @@ cmd/bup-%: cmd/%-cmd.sh
        rm -f $@
        ln -s $*-cmd.sh $@
 
-%.o: %.c
-       gcc -c -o $@ $< $(CPPFLAGS) $(CFLAGS)
-       
 # update the local 'man' and 'html' branches with pregenerated output files, for
 # people who don't have pandoc (and maybe to aid in google searches or something)
 export-docs: Documentation/all