Better Makefile

This commit is contained in:
Grégory Soutadé 2010-05-15 12:05:39 +02:00
parent 32f4fd2340
commit cbe1a64757

View File

@ -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)
%.o : model/%.cpp view/%.cpp controller/%.cpp %.cpp
$(CXX) $(CXXFLAGS) $< -c
kc: $(OBJS)
$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)