Better Makefile
This commit is contained in:
parent
32f4fd2340
commit
cbe1a64757
8
Makefile
8
Makefile
|
@ -16,11 +16,15 @@ HEADERS=$(wildcard model/*.h)
|
||||||
HEADERS+=$(wildcard view/*.h)
|
HEADERS+=$(wildcard view/*.h)
|
||||||
HEADERS+=$(wildcard controller/*.h)
|
HEADERS+=$(wildcard controller/*.h)
|
||||||
HEADERS+=main.h sha1.h
|
HEADERS+=main.h sha1.h
|
||||||
|
OBJS=$(SOURCES:.cpp=.o)
|
||||||
|
|
||||||
all: kc
|
all: kc
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
|
|
||||||
kc: $(SOURCES) $(HEADERS)
|
%.o : model/%.cpp view/%.cpp controller/%.cpp %.cpp
|
||||||
$(CXX) $(CXXFLAGS) $(SOURCES) -o $@ $(LDFLAGS)
|
$(CXX) $(CXXFLAGS) $< -c
|
||||||
|
|
||||||
|
kc: $(OBJS)
|
||||||
|
$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)
|
Loading…
Reference in New Issue
Block a user