Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. CPP = g++
  2. EXE = deep-network
  3. DEBUG = -g -DDEBUG #-Q # for gdb
  4. CPP_FLAG = -Isrc -Wfatal-errors -march=native $(DEBUG)
  5. OBJ_FILES = obj/mnist.o obj/network.o obj/full_connected.o obj/convolution.o #obj/pooling.o
  6. all: $(EXE)
  7. $(EXE): $(OBJ_FILES) src/main.cpp
  8. $(CPP) $(CPP_FLAG) $^ -o $@
  9. obj/network.o: src/network.cpp src/network.hpp src/layers/activation.hpp obj/full_connected.o obj/convolution.o #obj/pooling.o
  10. $(CPP) $(CPP_FLAG) -c $< -o $@
  11. obj/mnist.o: src/mnist/mnist.cpp src/mnist/mnist.hpp src/dataset.hpp src/vector.hpp
  12. $(CPP) $(CPP_FLAG) -c $< -o $@
  13. obj/full_connected.o: src/layers/full_connected.cpp src/layers/full_connected.hpp src/layers/layer.hpp src/vector.hpp
  14. $(CPP) $(CPP_FLAG) -c $< -o $@
  15. obj/convolution.o: src/layers/convolution.cpp src/layers/convolution.hpp src/layers/layer.hpp src/vector.hpp
  16. $(CPP) $(CPP_FLAG) -c $< -o $@
  17. obj/pooling.o: src/layers/pooling.cpp src/layers/pooling.hpp src/layers/layer.hpp src/vector.hpp
  18. $(CPP) $(CPP_FLAG) -c $< -o $@
  19. clean:
  20. -$(RM) -r obj/* doc/* $(EXE) $(EXE)-main.cpp*
  21. docs:
  22. @doxygen