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.

63 lines
1.5KB

  1. FLAGS += \
  2. -Iinclude \
  3. -Idep/include -Idep/lib/libzip/include
  4. SOURCES = $(wildcard src/*.cpp src/*/*.cpp) \
  5. ext/nanovg/src/nanovg.c
  6. include arch.mk
  7. ifeq ($(ARCH), lin)
  8. SOURCES += ext/osdialog/osdialog_gtk2.c
  9. CFLAGS += $(shell pkg-config --cflags gtk+-2.0)
  10. LDFLAGS += -rdynamic \
  11. -lpthread -lGL -ldl \
  12. $(shell pkg-config --libs gtk+-2.0) \
  13. -Ldep/lib -lGLEW -lglfw -ljansson -lsamplerate -lcurl -lzip -lportaudio -lportmidi
  14. TARGET = Rack
  15. endif
  16. ifeq ($(ARCH), mac)
  17. SOURCES += ext/osdialog/osdialog_mac.m
  18. CXXFLAGS += -DAPPLE -stdlib=libc++
  19. LDFLAGS += -stdlib=libc++ -lpthread -ldl \
  20. -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo \
  21. -Ldep/lib -lGLEW -lglfw -ljansson -lsamplerate -lcurl -lzip -lportaudio -lportmidi
  22. TARGET = Rack
  23. endif
  24. ifeq ($(ARCH), win)
  25. SOURCES += ext/osdialog/osdialog_win.c
  26. LDFLAGS += -static-libgcc -static-libstdc++ -lpthread \
  27. -Wl,--export-all-symbols,--out-implib,libRack.a -mwindows \
  28. -lgdi32 -lopengl32 -lcomdlg32 -lole32 \
  29. -Ldep/lib -lglew32 -lglfw3dll -ljansson -lsamplerate -lcurl -lzip -lportaudio -lportmidi
  30. TARGET = Rack.exe
  31. # OBJECTS = Rack.res
  32. endif
  33. all: $(TARGET)
  34. run: $(TARGET)
  35. ifeq ($(ARCH), lin)
  36. LD_LIBRARY_PATH=dep/lib ./$<
  37. endif
  38. ifeq ($(ARCH), mac)
  39. DYLD_FALLBACK_LIBRARY_PATH=dep/lib ./$<
  40. endif
  41. ifeq ($(ARCH), win)
  42. # TODO get rid of the mingw64 path
  43. env PATH=dep/bin:/mingw64/bin ./$<
  44. endif
  45. clean:
  46. rm -rf $(TARGET) build
  47. # For Windows resources
  48. %.res: %.rc
  49. windres $^ -O coff -o $@
  50. include compile.mk