From: Michael Vrable Date: Sun, 24 Dec 2006 01:21:10 +0000 (-0800) Subject: Some Makefile improvements: X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=d5168088acd8a7d2efadd76052278b464c7f4dfc;p=cumulus.git Some Makefile improvements: - (Mostly) automatic header dependency tracking. - Use pkg-config to pull in dependencies for libuuid. --- diff --git a/Makefile b/Makefile index 1822adc..141ce9c 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,17 @@ -CXXFLAGS=-O -Wall -D_FILE_OFFSET_BITS=64 -g -LDFLAGS=-g +PACKAGES=uuid +CXXFLAGS=-O -Wall -D_FILE_OFFSET_BITS=64 -g -pg \ + `pkg-config --cflags $(PACKAGES)` +LDFLAGS=-g -pg `pkg-config --libs $(PACKAGES)` -OBJS=scandir.o sha1.o store.o +SRCS=scandir.cc sha1.cc store.cc +OBJS=$(SRCS:.cc=.o) scandir : $(OBJS) $(CXX) $(LDFLAGS) -o $@ $^ + +dep: + touch Makefile.dep + makedepend -fMakefile.dep $(SRCS) + +-include *.dep +