summaryrefslogtreecommitdiff
blob: 3005498bbf709dd7a22a6dead6558818ad16d1c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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 |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index d18e2ed..519ebe8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 OS:=$(shell uname | sed 's/[-_].*//')
-CFLAGS=-Wall -g -O2 -Werror $(PYINCLUDE) -g
+CFLAGS:=-Wall -g -O2 -Werror $(PYINCLUDE) -g
 ifneq ($(OS),CYGWIN)
   CFLAGS += -fPIC
 endif
@@ -71,7 +71,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 +96,6 @@ test: all
 
 check: test
 
-%: %.o
-	$(CC) $(CFLAGS) (LDFLAGS) -o $@ $^ $(LIBS)
-
 bup: main.py
 	rm -f $@
 	ln -s $< $@
@@ -123,9 +120,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
-- 
1.7.1