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.

53 lines
1.5KB

  1. ARCH ?= lin
  2. FLAGS = -g -Wall -O3 -msse -mfpmath=sse -ffast-math \
  3. -I./ext -I./include
  4. CXXFLAGS = -fno-exceptions
  5. SOURCES = $(wildcard src/*.cpp src/*/*.cpp) \
  6. ext/nanovg/src/nanovg.c
  7. ifeq ($(ARCH), lin)
  8. SOURCES += ext/noc/noc_file_dialog.c
  9. CFLAGS += -DNOC_FILE_DIALOG_GTK $(shell pkg-config --cflags gtk+-2.0)
  10. LDFLAGS += -rdynamic \
  11. -lpthread -lGL -lGLEW -lglfw -ldl -ljansson -lportaudio -lportmidi -lsamplerate \
  12. $(shell pkg-config --libs gtk+-2.0)
  13. TARGET = Rack
  14. endif
  15. ifeq ($(ARCH), mac)
  16. SOURCES += ext/noc/noc_file_dialog.m
  17. CFLAGS += -DNOC_FILE_DIALOG_OSX
  18. CXXFLAGS += -DAPPLE -stdlib=libc++ -I$(HOME)/local/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
  20. TARGET = Rack
  21. endif
  22. ifeq ($(ARCH), win)
  23. SOURCES += ext/noc/noc_file_dialog.c
  24. CFLAGS += -DNOC_FILE_DIALOG_WIN32
  25. CXXFLAGS += -DGLEW_STATIC \
  26. -I$(HOME)/pkg/portaudio-r1891-build/include
  27. LDFLAGS += \
  28. -Wl,-Bstatic,--whole-archive \
  29. -lglfw3 -lgdi32 -lglew32 -ljansson -lsamplerate \
  30. -Wl,-Bdynamic,--no-whole-archive \
  31. -lpthread -lopengl32 -lcomdlg32 -lole32 \
  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. %.res: %.rc
  38. windres $^ -O coff -o $@
  39. endif
  40. all: $(TARGET)
  41. clean:
  42. rm -rf $(TARGET) build
  43. include Makefile.inc