]> arthur.barton.de Git - bup.git/blobdiff - Makefile
This adds the long-awaited indexfile feature, so you no longer have to feed
[bup.git] / Makefile
index 86d2368b6420279d897731f8e39cf20440b98fb6..7c24fa1fbd950047af51667310745cfa8f272178 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,30 +1,42 @@
 PYINCLUDE:=$(shell python2.5-config --includes)
 PYLIB:=$(shell python2.5-config --lib)
+OS:=$(shell uname)
+MACHINE:=$(shell uname -m)
 CFLAGS=-Wall -g -O2 -Werror $(PYINCLUDE) -g -fPIC
+SHARED=-shared
+
+ifeq (${OS},Darwin)
+  CFLAGS += -arch $(MACHINE)
+  SHARED = -dynamiclib
+endif
 
 default: all
 
-all: bup-split bup-join bup-save bup-init bup-server bup randomgen chashsplit.so
+all: bup-split bup-join bup-save bup-init bup-server bup-index bup-tick \
+       bup randomgen chashsplit.so
 
 randomgen: randomgen.o
+       $(CC) $(CFLAGS) -o $@ $<
 
 chashsplit.so: chashsplitmodule.o
-       $(CC) -shared -o $@ $< $(PYLIB)
+       $(CC) $(CFLAGS) $(SHARED) -o $@ $< $(PYLIB)
        
-runtests: all
+runtests: all runtests-python runtests-cmdline
+
+runtests-python:
        ./wvtest.py $(wildcard t/t*.py)
        
 runtests-cmdline: all
-       ./test-sh
+       t/test.sh
        
 stupid:
        PATH=/bin:/usr/bin $(MAKE) test
        
-test: all runtests-cmdline
+test: all
        ./wvtestrun $(MAKE) runtests
 
 %: %.o
-       gcc -o $@ $< $(LDFLAGS) $(LIBS)
+       $(CC) $(CFLAGS) (LDFLAGS) -o $@ $< $(LIBS)
        
 bup: bup.py
        rm -f $@