DISTRHO Plugin Framework
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.

87 lines
1.8KB

  1. #!/usr/bin/make -f
  2. # Makefile for dgl #
  3. # ---------------- #
  4. # Created by falkTX
  5. #
  6. include Makefile.mk
  7. # --------------------------------------------------------------
  8. BUILD_C_FLAGS += $(DGL_FLAGS) -I. -Isrc
  9. BUILD_CXX_FLAGS += $(DGL_FLAGS) -I. -Isrc
  10. LINK_FLAGS += $(DGL_LIBS)
  11. ifneq ($(MACOS_OLD),true)
  12. # needed by sofd right now, fix later
  13. BUILD_CXX_FLAGS += -Wno-type-limits -fpermissive
  14. endif
  15. # --------------------------------------------------------------
  16. OBJS = \
  17. src/Application.cpp.o \
  18. src/Color.cpp.o \
  19. src/Geometry.cpp.o \
  20. src/Image.cpp.o \
  21. src/ImageWidgets.cpp.o \
  22. src/NanoVG.cpp.o \
  23. src/Resources.cpp.o \
  24. src/Widget.cpp.o
  25. ifeq ($(MACOS),true)
  26. OBJS += src/Window.mm.o
  27. else
  28. OBJS += src/Window.cpp.o
  29. endif
  30. TARGET = ../libdgl.a
  31. # --------------------------------------------------------------
  32. all: $(TARGET)
  33. # --------------------------------------------------------------
  34. ../libdgl.a: $(OBJS)
  35. rm -f $@
  36. $(AR) crs $@ $^
  37. ../libdgl.dll: $(OBJS)
  38. # -Wl,--output-def,$@.def,--out-implib,$@.a
  39. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  40. ../libdgl.dylib: $(OBJS)
  41. $(CXX) $^ -dynamiclib $(LINK_FLAGS) -o $@
  42. ../libdgl.so: $(OBJS)
  43. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  44. # --------------------------------------------------------------
  45. %.c.o: %.c
  46. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  47. %.cpp.o: %.cpp
  48. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  49. src/Window.cpp.o: src/Window.cpp src/pugl/*
  50. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  51. src/Window.mm.o: src/Window.cpp src/pugl/*
  52. $(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  53. # --------------------------------------------------------------
  54. clean:
  55. rm -f src/*.d src/*.o ../libdgl.*
  56. debug:
  57. $(MAKE) DEBUG=true
  58. # --------------------------------------------------------------
  59. -include $(OBJS:%.o=%.d)
  60. # --------------------------------------------------------------