commit - 66b4d5213bcab3f70a42354d0833741a8cf7eeb8
commit + e494e02c837088e25f84506a0d27898a7e0bb9bd
blob - ae7abe5252f36df871ce94207abed46800156dd8
blob + 3419f6a439dcda6470e1535d68ec645f0d352f8a
--- Makefile
+++ Makefile
all: server
clean:
- rm -rf vostok/vostok
+ ${MAKE} -C vostok clean
server:
${MAKE} -C vostok
blob - 9ac28c40d073d08304d261ac84db6659466f4c1f
blob + 0e2a0e4da8de989adf1eaa3f43065014ec8d7577
--- vostok/Makefile
+++ vostok/Makefile
-CXXFLAGS = -Wall -Wextra -std=c++11 -I../shared
+CXXFLAGS += -Wall -Wextra -std=c++11 -I../shared
LIBS = -ltls
CXXFILES = transport.cc
CXXFILES += vostok.cc
HXXFILES += utils.h
-vostok: ${CXXFILES} ${HXXFILES}
- ${CXX} ${CXXFLAGS} ${CXXFILES} ${LIBS} -o vostok
+OFILES = ${CXXFILES:.cc=.o}
+
+.cc.o:
+ ${CXX} ${CXXFLAGS} -c -o $@ $<
+
+vostok: ${OFILES}
+ ${CXX} ${LDFLAGS} -o $@ ${OFILES} ${LIBS}
+
+clean:
+ rm -f ${OFILES} vostok
+
+.PHONY: cleaN