My tailor-made suite for studying Japanese
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.
 
 
 
 

129 lines
3.0 KiB

  1. ##
  2. ## Compilation
  3. ##
  4. C++ = clang++ ;
  5. LINK = clang++ ;
  6. # C++ = g++ ;
  7. # LINK = g++ ;
  8. # If I was building a library, these would be useful
  9. # LINKFLAGS = -shared ;
  10. # if $(UNIX) { SUFSHR = .so ; }
  11. # else if $(NT) { SUFSHR = .dll ; }
  12. ## Compiler arguments
  13. # Arguments used on all projects, regardless of any variables
  14. C++FLAGS = -std=c++11 -Wall -Wextra -Wno-unused-parameter
  15. # Only for profiling, i.e. not release builds
  16. # -DTRACY_ENABLE
  17. # BT_USE_DOUBLE_PRECISION solves the Dantzig LCP missing definition
  18. # Disabled now that I'm compiling Bullet in single-precision
  19. # -DBT_USE_DOUBLE_PRECISION
  20. -g ;
  21. HDRS = src
  22. # Dependencies/base2.0
  23. # Dependencies/glm
  24. # Dependencies/tracy
  25. Dependencies/curl/include
  26. Dependencies/rapidjson/include
  27. Dependencies/mecab/build/local/include
  28. Dependencies/parallel-hashmap/parallel_hashmap
  29. ;
  30. # TODO: Make base hold all this weirdness?
  31. # if $(DEBUG_BUILD)
  32. # {
  33. # SFML_LINKLIBS = -lsfml-audio-d -lsfml-graphics-d -lsfml-window-d -lsfml-system-d ;
  34. # }
  35. # else
  36. # {
  37. # SFML_LINKLIBS = -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system ;
  38. # }
  39. OPTIM = -O0 ;
  40. ##
  41. ## Linking
  42. ##
  43. if $(LIBNOTIFY_AVAILABLE)
  44. {
  45. # From pkg-config --libs libnotify
  46. NOTIFY_LINKLIBS = -lnotify -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 ;
  47. # From `pkg-config --cflags libnotify`
  48. NOTIFY_HEADERS = /usr/include/gdk-pixbuf-2.0 /usr/include/libpng16
  49. /usr/include/glib-2.0 /usr/lib/x86_64-linux-gnu/glib-2.0/include ;
  50. NOTIFY_IMPLEMENTATION_FILES = src/Notifications_LibNotify.cpp ;
  51. }
  52. else
  53. {
  54. NOTIFY_LINKLIBS = ;
  55. NOTIFY_HEADERS = ;
  56. NOTIFY_IMPLEMENTATION_FILES = src/Notifications_Stub.cpp ;
  57. }
  58. LINKLIBS =
  59. # Standard (e.g. for Tracy)
  60. -lpthread -ldl
  61. $(NOTIFY_LINKLIBS)
  62. # curl
  63. -LDependencies/curl/local_install/lib
  64. -lcurl
  65. -LDependencies/mecab/build/local/lib
  66. -lmecab
  67. # SFML
  68. # -LDependencies/base2.0/dependencies/SFML/lib
  69. # $(SFML_LINKLIBS)
  70. # OpenGL
  71. # -lGL
  72. # -lGLU
  73. # -lGLEW
  74. # Base
  75. # -LDependencies/base2.0 -lBase20
  76. ;
  77. # LINKFLAGS = -Wl,-rpath,. ;
  78. # TODO: Copy libs to better directory, or static link?
  79. LINKFLAGS = -g
  80. -Wl,-rpath,.:Dependencies/curl/local_install/lib:Dependencies/mecab/build/local/lib ;
  81. ##
  82. ## Jam stuff
  83. ##
  84. # Fix for unnecessary rebuilding any Jam project
  85. KEEPOBJS = true ; # This doesn't actually fix anything, though it seems like it should
  86. NOARSCAN = true ; # This actually fixes the problem
  87. #AR = ar rUu ; # I was thinking maybe the AR command was wrong (always outputting deterministically)
  88. # It doesn't seem like this is the problem though
  89. AR = ar cr ;
  90. # Cross compilation
  91. # E.g.
  92. # jam -j4 -q -sCROSS_COMPILE_WINDOWS=true
  93. # if $(CROSS_COMPILE_WINDOWS)
  94. # {
  95. # CC = x86_64-w64-mingw32-gcc ;
  96. # LINK = x86_64-w64-mingw32-gcc ;
  97. # AR = x86_64-w64-mingw32-ar ;
  98. # SUFSHR = .dll ;
  99. # }
  100. # Some helpful Jam commands
  101. # -q : stop on failed target
  102. # -jN : use N cores
  103. # -sVAR=VAL : Set VAR to VAL. Note that setting WINDOWS=false is the same as setting UNREAL=true,
  104. # frustratingly
  105. # -dx : print commands being used
  106. # -n : don't actually run commands