From cbe1a647576048aa8a0052d126d845cad3cb5558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Sat, 15 May 2010 12:05:39 +0200 Subject: [PATCH] Better Makefile --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 72cdba9..3989b0d 100644 --- a/Makefile +++ b/Makefile @@ -16,11 +16,15 @@ HEADERS=$(wildcard model/*.h) HEADERS+=$(wildcard view/*.h) HEADERS+=$(wildcard controller/*.h) HEADERS+=main.h sha1.h +OBJS=$(SOURCES:.cpp=.o) all: kc clean: rm -f *.o -kc: $(SOURCES) $(HEADERS) - $(CXX) $(CXXFLAGS) $(SOURCES) -o $@ $(LDFLAGS) \ No newline at end of file +%.o : model/%.cpp view/%.cpp controller/%.cpp %.cpp + $(CXX) $(CXXFLAGS) $< -c + +kc: $(OBJS) + $(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS) \ No newline at end of file