X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=Makefile;h=37a747e0a3cef539109de99682161d66972789cd;hb=2911a4279cce1e880793c934ce90a187856c7c92;hp=8fc6f05700ed4d54587a63df09628a7b21db68e2;hpb=b57ca1c9e3f6fd1e4ea796e82e9863ffab0cb76e;p=cumulus.git diff --git a/Makefile b/Makefile index 8fc6f05..37a747e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,28 @@ -CXXFLAGS=-O -Wall -D_FILE_OFFSET_BITS=64 +PACKAGES=sqlite3 uuid +DEBUG=-g +CXXFLAGS=-O -Wall -D_FILE_OFFSET_BITS=64 $(DEBUG) \ + $(shell pkg-config --cflags $(PACKAGES)) \ + -DCUMULUS_VERSION=$(shell cat version) +LDFLAGS=$(DEBUG) $(shell pkg-config --libs $(PACKAGES)) -OBJS=scandir.o +SRCS=chunk.cc localdb.cc metadata.cc ref.cc remote.cc scandir.cc sha1.cc \ + store.cc subfile.cc util.cc +OBJS=$(SRCS:.cc=.o) -scandir : $(OBJS) +cumulus : $(OBJS) $(CXX) $(LDFLAGS) -o $@ $^ + +version : NEWS + (git-describe || (head -n1 NEWS | cut -d" " -f1)) >version 2>/dev/null +$(OBJS) : version + +clean : + rm -f $(OBJS) cumulus version + +dep : + touch Makefile.dep + makedepend -fMakefile.dep $(SRCS) + +.PHONY : clean dep + +-include *.dep