From: Brandon Low Date: Mon, 14 Feb 2011 19:27:29 +0000 (-0800) Subject: Remove .c and .o rules, apply flags to csetup.py X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5670d97a873000a5a498313befacf2d03d79bcd3;p=packages%2Fb%2Fbup.git Remove .c and .o rules, apply flags to csetup.py 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 --- diff --git a/Makefile b/Makefile index d18e2ed..ccbc624 100644 --- 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