X-Git-Url: http://git.vrable.net/?p=cumulus.git;a=blobdiff_plain;f=Makefile;h=8ae5754f095819d6e8307db649c2cf1b85b7beb9;hp=d2221fb7ff74eba97aabcb4fe79fa16727892a6f;hb=a9d83d1e32291aaa449442eaf19ade56bfd42778;hpb=ce15b42a3385cb50dab7f8a58bf310ba5a57958e diff --git a/Makefile b/Makefile index d2221fb..8ae5754 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,28 @@ -CXXFLAGS=-O -Wall +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)) -OBJS=scandir.o +SRCS=chunk.cc localdb.cc main.cc metadata.cc ref.cc remote.cc sha1.cc \ + store.cc subfile.cc util.cc +OBJS=$(SRCS:.cc=.o) -scandir : $(OBJS) - $(CXX) $(LDFLAGS) -o $@ $^ +cumulus : $(OBJS) + $(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) + +.PHONY : clean dep + +-include *.dep