X-Git-Url: http://git.vrable.net/?p=cumulus.git;a=blobdiff_plain;f=Makefile;h=6332115bcbe8bdc7f650a8cb138669f21d5ee0c6;hp=141ce9cd1fe8d57cf9471a2884a4da9a3d0920f2;hb=HEAD;hpb=d5168088acd8a7d2efadd76052278b464c7f4dfc diff --git a/Makefile b/Makefile index 141ce9c..6332115 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,34 @@ -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 -Wextra -D_FILE_OFFSET_BITS=64 $(DEBUG) \ + $(shell pkg-config --cflags $(PACKAGES)) \ + -DCUMULUS_VERSION=$(shell cat version) +LDFLAGS=$(DEBUG) $(shell pkg-config --libs $(PACKAGES)) -lpthread -SRCS=scandir.cc sha1.cc store.cc +THIRD_PARTY_SRCS=chunk.cc sha1.cc sha256.cc +SRCS=exclude.cc hash.cc localdb.cc main.cc metadata.cc ref.cc remote.cc \ + store.cc subfile.cc util.cc $(addprefix third_party/,$(THIRD_PARTY_SRCS)) OBJS=$(SRCS:.cc=.o) -scandir : $(OBJS) - $(CXX) $(LDFLAGS) -o $@ $^ +all : cumulus cumulus-chunker-standalone -dep: +cumulus : $(OBJS) + $(CXX) -o $@ $^ $(LDFLAGS) + +cumulus-chunker-standalone : chunker-standalone.o third_party/chunk.o + $(CXX) -o $@ $^ $(LDFLAGS) + +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