Makefile 514 B

12345678910111213141516171819202122232425
  1. SRC_PATH=./src
  2. OUT_PATH=./bin
  3. TEST_SRC=$(wildcard ${SRC_PATH}/*_spec.cpp)
  4. TEST_BIN= $(TEST_SRC:${SRC_PATH}/%.cpp=${OUT_PATH}/%)
  5. VPATH=${SRC_PATH}
  6. SHIM_FILES=${SRC_PATH}/lib/*.cpp
  7. PSC_FILE=../src/PubSubClient.cpp
  8. CC=g++
  9. CFLAGS=-I${SRC_PATH}/lib -I../src
  10. all: $(TEST_BIN)
  11. ${OUT_PATH}/%: ${SRC_PATH}/%.cpp ${PSC_FILE} ${SHIM_FILES}
  12. mkdir -p ${OUT_PATH}
  13. ${CC} ${CFLAGS} $^ -o $@
  14. clean:
  15. @rm -rf ${OUT_PATH}
  16. test:
  17. @bin/connect_spec
  18. @bin/publish_spec
  19. @bin/receive_spec
  20. @bin/subscribe_spec
  21. @bin/keepalive_spec