From a90d37dae77f39716cbd369b1aa50f7e910287fd Mon Sep 17 00:00:00 2001 From: gwdwyy Date: Tue, 9 Jul 2013 17:44:23 +0800 Subject: [PATCH] moidfy cmlib_deps --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b45de33..0a9c396 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,9 @@ DOLINK = $(LINK) $(LINKOPT) -o $@ $^ SOURCES := $(wildcard *.cpp) OBJS := $(patsubst %.cpp,%.o,$(SOURCES)) -CMDIR = ./cppcommon/ -CMLIB = $(CMDIR)cmlib.a +CMDIR = ./cppcommon +CMLIB = $(CMDIR)/cmlib.a +CMLIB_DEPS := $(wildcard $(CMDIR)/*) # remove the objs after compilation @@ -28,7 +29,7 @@ all: main main: $(OBJS) $(CMLIB) $(DOLINK) -$(CMLIB): $(CMDIR) +$(CMLIB): $(CMLIB_DEPS) cd $(CMDIR) && $(MAKE) #unit test