From d5168088acd8a7d2efadd76052278b464c7f4dfc Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Sat, 23 Dec 2006 17:21:10 -0800 Subject: [PATCH] Some Makefile improvements: - (Mostly) automatic header dependency tracking. - Use pkg-config to pull in dependencies for libuuid. --- Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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 + -- 2.20.1