]> arthur.barton.de Git - bup.git/blobdiff - Makefile
Rename test-fs.img to testfs.img and add it to the clean target.
[bup.git] / Makefile
index d18e2ed889eb780cd48b33c253414623c09d6a55..cbf548c420bfaf624e6a06901828f0c3f5ccf0dd 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
@@ -87,6 +76,7 @@ runtests-python:
 
 runtests-cmdline: all
        t/test.sh
+       t/test-meta.sh
 
 stupid:
        PATH=/bin:/usr/bin $(MAKE) test
@@ -96,9 +86,6 @@ test: all
 
 check: test
 
-%: %.o
-       $(CC) $(CFLAGS) (LDFLAGS) -o $@ $^ $(LIBS)
-
 bup: main.py
        rm -f $@
        ln -s $< $@
@@ -123,9 +110,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
@@ -160,5 +144,7 @@ clean: Documentation/clean
                .*~ *~ */*~ lib/*/*~ lib/*/*/*~ \
                *.pyc */*.pyc lib/*/*.pyc lib/*/*/*.pyc \
                bup bup-* cmd/bup-* lib/bup/_version.py randomgen memtest \
-               out[12] out2[tc] tags[12] tags2[tc]
+               out[12] out2[tc] tags[12] tags2[tc] \
+               testfs.img
        rm -rf *.tmp t/*.tmp lib/*/*/*.tmp build lib/bup/build
+       if test -e testfs; then rmdir testfs; fi