From e6e74efc26ec381d6fe49ffa57e532c939a570c5 Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 30 Jan 2014 22:23:13 -0500 Subject: [PATCH] call mkdir only once --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5a3e6336..370b3a0a 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ INCFLAGS = LDFLAGS = -Wl,-rpath,/usr/local/lib -lcryptopp -lboost_system -lboost_filesystem -lpthread LIBS = -all: i2p +all: obj i2p i2p: $(OBJECTS:obj/%=obj/%) $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) @@ -18,11 +18,14 @@ i2p: $(OBJECTS:obj/%=obj/%) .SUFFIXES: .c .cc .C .cpp .o obj/%.o : %.cpp - mkdir -p obj $(CC) -o $@ $< -c $(CFLAGS) $(INCFLAGS) +obj: + mkdir -p obj + clean: - rm -fr obj + rm -fr obj i2p .PHONY: all .PHONY: clean +