1 OS:=$(shell uname | sed 's/[-_].*//')
2 CFLAGS=-Wall -g -O2 -Werror $(PYINCLUDE) -g
10 MACHINE:=$(shell arch)
11 CFLAGS += -arch $(MACHINE)
22 all: bup Documentation/all
24 bup: lib/bup/_version.py lib/bup/_helpers$(SOEXT) cmds
26 Documentation/all: bup
30 MANDIR=$(DESTDIR)/usr/share/man
31 DOCDIR=$(DESTDIR)/usr/share/doc/bup
32 BINDIR=$(DESTDIR)/usr/bin
33 LIBDIR=$(DESTDIR)/usr/lib/bup
35 $(INSTALL) -d $(MANDIR)/man1 $(DOCDIR) $(BINDIR) \
36 $(LIBDIR)/bup $(LIBDIR)/cmd $(LIBDIR)/tornado \
37 $(LIBDIR)/web $(LIBDIR)/web/static
38 [ ! -e Documentation/.docs-available ] || \
42 [ ! -e Documentation/.docs-available ] || \
44 Documentation/*.html \
46 $(INSTALL) -m 0755 bup $(BINDIR)
71 lib/bup/_helpers$(SOEXT): \
72 lib/bup/bupsplit.c lib/bup/_helpers.c lib/bup/csetup.py
74 cd lib/bup && $(PYTHON) csetup.py build
75 cp lib/bup/build/*/_helpers$(SOEXT) lib/bup/
77 .PHONY: lib/bup/_version.py
80 ./format-subst.pl $@.pre >$@.new
83 runtests: all runtests-python runtests-cmdline
86 $(PYTHON) wvtest.py $(wildcard t/t*.py lib/*/t/t*.py)
92 PATH=/bin:/usr/bin $(MAKE) test
95 ./wvtestrun $(MAKE) PYTHON=$(PYTHON) runtests
100 $(CC) $(CFLAGS) (LDFLAGS) -o $@ $^ $(LIBS)
106 cmds: $(patsubst cmd/%-cmd.py,cmd/bup-%,$(wildcard cmd/*-cmd.py))
108 cmd/bup-%: cmd/%-cmd.py
121 gcc -c -o $@ $< $(CPPFLAGS) $(CFLAGS)
123 clean: Documentation/clean
124 rm -f *.o lib/*/*.o *.so lib/*/*.so *.dll *.exe \
125 .*~ *~ */*~ lib/*/*~ lib/*/*/*~ \
126 *.pyc */*.pyc lib/*/*.pyc lib/*/*/*.pyc \
127 bup bup-* cmd/bup-* lib/bup/_version.py randomgen memtest \
128 out[12] out2[tc] tags[12] tags2[tc]
129 rm -rf *.tmp t/*.tmp lib/*/*/*.tmp build lib/bup/build