Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. EXE_W = wilf-worker
  2. EXE_S = wilf-server
  3. EXE_I = wilf-interface
  4. EXE_A = wilf-alone
  5. EXE_C = wilf-cilk
  6. CPP = g++-6 -g
  7. CPP_CILK = g++-6 -g
  8. CFLAGS = --std=c++11 -march=corei7 -O3 -DNDEBUG
  9. all: $(EXE_S) $(EXE_W) $(EXE_I) $(EXE_A) $(EXE_C)
  10. cilk: $(EXE_C)
  11. dist/message.o:dist/message.cpp dist/message.hpp
  12. $(CPP) $(CFLAGS) -c $< -o $@
  13. dist/client.o:dist/client.cpp dist/client.hpp
  14. $(CPP) $(CFLAGS) -c $< -o $@
  15. dist/server.o:dist/server.cpp dist/server.hpp
  16. $(CPP) $(CFLAGS) -c $< -o $@
  17. dist/interface.o:dist/interface.cpp dist/interface.hpp
  18. $(CPP) $(CFLAGS) -c $< -o $@
  19. dist/worker.o:dist/worker.cpp dist/worker.hpp
  20. $(CPP) $(CFLAGS) -c $< -o $@
  21. src/gtask.o:src/gtask.cpp src/gtask.hpp
  22. $(CPP) $(CFLAGS) -c $< -o $@
  23. src/semigroup.o:src/semigroup.cpp src/semigroup.hpp
  24. $(CPP) $(CFLAGS) -c $< -o $@
  25. src/treewalk.o:src/treewalk.cpp src/treewalk.hpp
  26. $(CPP) $(CFLAGS) -c $< -o $@
  27. $(EXE_W):dist/message.o dist/client.o dist/worker.o src/semigroup.o src/treewalk.o src/main-worker.cpp
  28. $(CPP) $(CFLAGS) $^ -o $@ $(LIBS)
  29. $(EXE_S):dist/message.o dist/server.o src/gtask.o src/semigroup.o src/treewalk.o src/main-server.cpp
  30. $(CPP) $(CFLAGS) $^ -o $@ $(LIBS)
  31. $(EXE_I):dist/message.o dist/client.o dist/interface.o src/main-interface.cpp
  32. $(CPP) $(CFLAGS) $^ -o $@ $(LIBS)
  33. $(EXE_A):src/semigroup.o src/treewalk.o src/main-alone.cpp
  34. $(CPP) $(CFLAGS) $^ -o $@ $(LIBS)
  35. $(EXE_C): src/semigroup.o src/treewalk.o src/main-cilk.cpp src/results_cilk.cpp
  36. $(CPP_CILK) -fcilkplus $(CFLAGS) $^ -o $@ $(LIBS) -lcilkrts
  37. clean:
  38. $(RM) -rf $(EXE_W) $(EXE_S) $(EXE_I) $(EXE_A) data/* dist/*.o dist/*~ src/*.o src/*~