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.

56 lines
1.5KB

  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/osdialog/osdialog_gtk2.c
  8. CFLAGS += $(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/osdialog/osdialog_mac.m
  18. CXXFLAGS += -DAPPLE -stdlib=libc++ -I$(HOME)/local/include -I/usr/local/lib/libzip/include
  19. 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
  20. TARGET = Rack
  21. endif
  22. ifeq ($(ARCH), win)
  23. SOURCES += ext/osdialog/osdialog_win.c
  24. CXXFLAGS += -DGLEW_STATIC \
  25. -I$(HOME)/pkg/portaudio-r1891-build/include -I/mingw64/lib/libzip/include -I$(HOME)/local/include
  26. LDFLAGS += \
  27. -Wl,-Bstatic,--whole-archive \
  28. -ljansson -lsamplerate \
  29. -Wl,-Bdynamic,--no-whole-archive \
  30. -lpthread -lglfw3 -lgdi32 -lglew32 -lopengl32 -lcomdlg32 -lole32 -lzip \
  31. -L $(HOME)/local/lib -lcurl \
  32. -lportmidi \
  33. -L$(HOME)/pkg/portaudio-r1891-build/lib/x64/ReleaseMinDependency -lportaudio_x64 \
  34. -Wl,--export-all-symbols,--out-implib,libRack.a -mwindows
  35. TARGET = Rack.exe
  36. # OBJECTS = Rack.res
  37. endif
  38. all: $(TARGET)
  39. clean:
  40. rm -rf $(TARGET) build
  41. # For Windows resources
  42. %.res: %.rc
  43. windres $^ -O coff -o $@
  44. include Makefile.inc