You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.2 KiB

5 years ago
5 years ago
5 years ago
5 years ago
  1. CXX = g++
  2. AR = llvm-ar
  3. CXXFLAGS = --std=c++17 -O3 -Iinclude
  4. USE_THREADS = -pthread
  5. USE_FILESYSTEM = -lc++fs
  6. USE_SDL = -lSDL2
  7. USE_PIANO = -L./build/lib/ -lpiano
  8. all: build
  9. build: pomodoro unix
  10. unix: yes
  11. clean: clean_pomodoro
  12. dirs:
  13. @mkdir -p ./build/bin
  14. @mkdir -p ./build/tmp
  15. @mkdir -p ./build/lib
  16. pomodoro: dirs
  17. $(CXX) $(CXXFLAGS) $(USE_SDL) $(USE_THREADS) src/pomodoro/pomodoro.cpp -o ./build/bin/pomodoro_view
  18. clean_pomodoro:
  19. -@rm ./build/bin/pomodoro_view
  20. yes: dirs
  21. $(CXX) $(CXXFLAGS) src/yes/yes.cpp -o ./build/bin/yes
  22. yes_clean:
  23. -@rm ./build/bin/yes
  24. libpiano: dirs
  25. $(CXX) $(CXXFLAGS) -c src/libpiano/piano.cpp -o ./build/tmp/piano.o
  26. $(AR) rc ./build/lib/libpiano.a ./build/tmp/piano.o
  27. rm ./build/tmp/*
  28. clean_libpiano:
  29. -@rm ./build/tmp/piano.o ./build/lib/libpiano.a ./build/tmp/testpiano
  30. test_piano: libpiano dirs
  31. $(CXX) $(CXXFLAGS) $(USE_PIANO) $(USE_THREADS) src/libpiano/test.cpp -o ./build/tmp/testpiano
  32. -./build/tmp/testpiano
  33. -@rm ./build/tmp/*
  34. astyle:
  35. astyle --style=bsd --align-reference=type --align-pointer=type --break-blocks --indent-namespaces --indent=tab --add-brackets \
  36. include/rigid_paradise/*.h \
  37. src/pomodoro/pomodoro.cpp \
  38. src/yes/yes.cpp \