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