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.

54 lines
1.6KB

  1. ARCH ?= lin
  2. FLAGS = -g -Wall -O3 -msse -mfpmath=sse -ffast-math -fno-finite-math-only \
  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 -lcurl -lzip \
  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 -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/noc/noc_file_dialog.c
  24. CFLAGS += -DNOC_FILE_DIALOG_WIN32
  25. CXXFLAGS += -DGLEW_STATIC \
  26. -I$(HOME)/pkg/portaudio-r1891-build/include -I/mingw64/lib/libzip/include -I$(HOME)/local/include
  27. LDFLAGS += \
  28. -Wl,-Bstatic,--whole-archive \
  29. -ljansson -lsamplerate \
  30. -Wl,-Bdynamic,--no-whole-archive \
  31. -lpthread -lglfw3 -lgdi32 -lglew32 -lopengl32 -lcomdlg32 -lole32 -lzip \
  32. -L $(HOME)/local/lib -lcurl \
  33. -lportmidi \
  34. -L$(HOME)/pkg/portaudio-r1891-build/lib/x64/ReleaseMinDependency -lportaudio_x64 \
  35. -Wl,--export-all-symbols,--out-implib,libRack.a -mwindows
  36. TARGET = Rack.exe
  37. # OBJECTS = Rack.res
  38. %.res: %.rc
  39. windres $^ -O coff -o $@
  40. endif
  41. all: $(TARGET)
  42. clean:
  43. rm -rf $(TARGET) build
  44. include Makefile.inc