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.

58 lines
1.6KB

  1. include Makefile-arch.inc
  2. FLAGS += \
  3. -I./include
  4. SOURCES = $(wildcard src/*.cpp src/*/*.cpp) \
  5. ext/nanovg/src/nanovg.c
  6. ifeq ($(ARCH), lin)
  7. SOURCES += ext/osdialog/osdialog_gtk2.c
  8. CFLAGS += $(shell pkg-config --cflags gtk+-2.0)
  9. LDFLAGS += -rdynamic \
  10. -lpthread -lGL -ldl \
  11. $(shell pkg-config --libs gtk+-2.0) \
  12. -Ldep/lib -lGLEW -lglfw -ljansson -lsamplerate -lcurl -lzip -lportaudio -lportmidi
  13. TARGET = Rack
  14. endif
  15. ifeq ($(ARCH), mac)
  16. SOURCES += ext/osdialog/osdialog_mac.m
  17. CXXFLAGS += -DAPPLE -stdlib=libc++ -I$(HOME)/local/include -I/usr/local/lib/libzip/include
  18. LDFLAGS += -stdlib=libc++ -L$(HOME)/local/lib -lpthread -lglew -lglfw3 -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo -ldl -ljansson -lportaudio -lportmidi -lsamplerate -lcurl -lzip
  19. TARGET = Rack
  20. endif
  21. ifeq ($(ARCH), win)
  22. SOURCES += ext/osdialog/osdialog_win.c
  23. CXXFLAGS += -DGLEW_STATIC \
  24. -I$(HOME)/pkg/portaudio-r1891-build/include -I/mingw64/lib/libzip/include -I$(HOME)/local/include
  25. LDFLAGS += \
  26. -Wl,-Bstatic,--whole-archive \
  27. -ljansson -lsamplerate \
  28. -Wl,-Bdynamic,--no-whole-archive \
  29. -lpthread -lglfw3 -lgdi32 -lglew32 -lopengl32 -lcomdlg32 -lole32 -lzip \
  30. -L $(HOME)/local/lib -lcurl \
  31. -lportmidi \
  32. -L$(HOME)/pkg/portaudio-r1891-build/lib/x64/ReleaseMinDependency -lportaudio_x64 \
  33. -Wl,--export-all-symbols,--out-implib,libRack.a -mwindows
  34. TARGET = Rack.exe
  35. # OBJECTS = Rack.res
  36. endif
  37. all: $(TARGET)
  38. run: $(TARGET)
  39. ./$(TARGET)
  40. clean:
  41. rm -rf $(TARGET) build
  42. # For Windows resources
  43. %.res: %.rc
  44. windres $^ -O coff -o $@
  45. include Makefile.inc