Audio plugin host https://kx.studio/carla
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.

142 lines
3.2KB

  1. #!/usr/bin/make -f
  2. # Makefile for dgl #
  3. # ---------------- #
  4. # Created by falkTX
  5. #
  6. include ../../../Makefile.mk
  7. # --------------------------------------------------------------
  8. BUILD_C_FLAGS += -I.
  9. BUILD_CXX_FLAGS += -I.
  10. OBJS = \
  11. src/App.cpp.o \
  12. src/Base.cpp.o \
  13. src/Image.cpp.o \
  14. src/ImageAboutWindow.cpp.o \
  15. src/ImageButton.cpp.o \
  16. src/ImageKnob.cpp.o \
  17. src/ImageSlider.cpp.o \
  18. src/Geometry.cpp.o \
  19. src/Widget.cpp.o \
  20. src/Window.cpp.o
  21. OBJS_posix32 = \
  22. src/App.cpp.posix32.o \
  23. src/Base.cpp.posix32.o \
  24. src/Image.cpp.posix32.o \
  25. src/ImageAboutWindow.cpp.posix32.o \
  26. src/ImageButton.cpp.posix32.o \
  27. src/ImageKnob.cpp.posix32.o \
  28. src/ImageSlider.cpp.posix32.o \
  29. src/Geometry.cpp.posix32.o \
  30. src/Widget.cpp.posix32.o \
  31. src/Window.cpp.posix32.o
  32. OBJS_posix64 = \
  33. src/App.cpp.posix64.o \
  34. src/Base.cpp.posix64.o \
  35. src/Image.cpp.posix64.o \
  36. src/ImageAboutWindow.cpp.posix64.o \
  37. src/ImageButton.cpp.posix64.o \
  38. src/ImageKnob.cpp.posix64.o \
  39. src/ImageSlider.cpp.posix64.o \
  40. src/Geometry.cpp.posix64.o \
  41. src/Widget.cpp.posix64.o \
  42. src/Window.cpp.posix64.o
  43. OBJS_win32 = \
  44. src/App.cpp.win32.o \
  45. src/Base.cpp.win32.o \
  46. src/Image.cpp.win32.o \
  47. src/ImageAboutWindow.cpp.win32.o \
  48. src/ImageButton.cpp.win32.o \
  49. src/ImageKnob.cpp.win32.o \
  50. src/ImageSlider.cpp.win32.o \
  51. src/Geometry.cpp.win32.o \
  52. src/Widget.cpp.win32.o \
  53. src/Window.cpp.win32.o
  54. OBJS_win64 = \
  55. src/App.cpp.win64.o \
  56. src/Base.cpp.win64.o \
  57. src/Image.cpp.win64.o \
  58. src/ImageAboutWindow.cpp.win64.o \
  59. src/ImageButton.cpp.win64.o \
  60. src/ImageKnob.cpp.win64.o \
  61. src/ImageSlider.cpp.win64.o \
  62. src/Geometry.cpp.win64.o \
  63. src/Widget.cpp.win64.o \
  64. src/Window.cpp.win64.o
  65. ifeq ($(MACOS),true)
  66. OBJS += src/pugl/pugl_osx_extended.m.o
  67. OBJS_posix32 += src/pugl/pugl_osx_extended.m.posix32.o
  68. OBJS_posix64 += src/pugl/pugl_osx_extended.m.posix64.o
  69. endif
  70. # --------------------------------------------------------------
  71. all: ../../dgl.a
  72. posix32: ../../dgl.posix32.a
  73. posix64: ../../dgl.posix64.a
  74. win32: ../../dgl.win32.a
  75. win64: ../../dgl.win64.a
  76. # --------------------------------------------------------------
  77. ../../dgl.a: $(OBJS)
  78. $(AR) rs $@ $^
  79. ../../dgl.posix32.a: $(OBJS_posix32)
  80. $(AR) rs $@ $^
  81. ../../dgl.posix64.a: $(OBJS_posix64)
  82. $(AR) rs $@ $^
  83. ../../dgl.win32.a: $(OBJS_win32)
  84. $(AR) rs $@ $^
  85. ../../dgl.win64.a: $(OBJS_win64)
  86. $(AR) rs $@ $^
  87. ../../dgl.dll: $(OBJS)
  88. $(CXX) $^ -shared $(LINK_FLAGS) -lopengl32 -lgdi32 -o $@
  89. ../../dgl.dylib: $(OBJS)
  90. $(CXX) $^ -dynamiclib $(LINK_FLAGS) -framework OpenGL -framework Cocoa -o $@
  91. ../../dgl.so: $(OBJS)
  92. $(CXX) $^ -shared $(LINK_FLAGS) -lGL -lX11 -o $@
  93. # --------------------------------------------------------------
  94. %.cpp.o: %.cpp
  95. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  96. %.cpp.posix32.o: %.cpp
  97. $(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  98. %.cpp.posix64.o: %.cpp
  99. $(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  100. %.cpp.win32.o: %.cpp
  101. $(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  102. %.cpp.win64.o: %.cpp
  103. $(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  104. %.m.o: %.m
  105. $(CC) $< $(BUILD_C_FLAGS) -objc -c -o $@
  106. # --------------------------------------------------------------
  107. clean:
  108. rm -f *.o src/*.o src/pugl/*.o ../../dgl.*
  109. debug:
  110. $(MAKE) DEBUG=true