X-Git-Url: http://git.vrable.net/?p=cumulus.git;a=blobdiff_plain;f=Makefile;h=bf6561c59521c115b8d8f97d38e3d0113fb60489;hp=141ce9cd1fe8d57cf9471a2884a4da9a3d0920f2;hb=f38dd9bcb0caffd3fc9126b05788c936690e8288;hpb=d5168088acd8a7d2efadd76052278b464c7f4dfc diff --git a/Makefile b/Makefile index 141ce9c..bf6561c 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,28 @@ -PACKAGES=uuid -CXXFLAGS=-O -Wall -D_FILE_OFFSET_BITS=64 -g -pg \ - `pkg-config --cflags $(PACKAGES)` -LDFLAGS=-g -pg `pkg-config --libs $(PACKAGES)` +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)) -SRCS=scandir.cc sha1.cc store.cc +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 $@ $^ -dep: +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) --include *.dep +.PHONY : clean dep +-include *.dep