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.

55 lines
1.7KB

  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_file_dialog.c
  9. CFLAGS += -DNOC_FILE_DIALOG_GTK $(shell pkg-config --cflags gtk+-2.0)
  10. CXXFLAGS += $(shell pkg-config --cflags glew glfw3 jansson samplerate libcurl libzip)
  11. LDFLAGS += -rdynamic \
  12. -lpthread -lGL -ldl -lportaudio -lportmidi \
  13. $(shell pkg-config --libs gtk+-2.0 glew glfw3 jansson samplerate libcurl libzip)
  14. TARGET = Rack
  15. endif
  16. ifeq ($(ARCH), mac)
  17. SOURCES += ext/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_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. %.res: %.rc
  40. windres $^ -O coff -o $@
  41. endif
  42. all: $(TARGET)
  43. clean:
  44. rm -rf $(TARGET) build
  45. include Makefile.inc