ASIO to JACK driver for WINE
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.

110 lines
2.8KB

  1. #!/usr/bin/make -f
  2. # Makefile for WineASIO #
  3. # --------------------- #
  4. # Created by falkTX
  5. # Initially generated by winemaker
  6. #
  7. ifeq ($(ARCH),)
  8. $(error incorrect use of Makefile, ARCH var is missing)
  9. endif
  10. ifeq ($(M),)
  11. $(error incorrect use of Makefile, M var is missing)
  12. endif
  13. PREFIX = /usr
  14. SRCDIR = .
  15. DLLS = wineasio.dll
  16. ### Tools
  17. CC = gcc
  18. WINECC = winegcc
  19. ### Common settings
  20. CEXTRA = -m$(M) -D_REENTRANT -fPIC -Wall -pipe
  21. CEXTRA += -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith
  22. CEXTRA += -Werror=implicit-function-declaration
  23. CEXTRA += $(shell pkg-config --cflags jack)
  24. RCEXTRA =
  25. INCLUDE_PATH = -I. -Irtaudio/include
  26. INCLUDE_PATH += -I$(PREFIX)/include/wine
  27. INCLUDE_PATH += -I$(PREFIX)/include/wine/windows
  28. INCLUDE_PATH += -I$(PREFIX)/include/wine-development
  29. INCLUDE_PATH += -I$(PREFIX)/include/wine-development/wine/windows
  30. DLL_PATH =
  31. LIBRARY_PATH =
  32. LIBRARIES = $(shell pkg-config --libs jack)
  33. # 64bit build needs an extra flag
  34. ifeq ($(M),64)
  35. CEXTRA += -DNATIVE_INT64
  36. endif
  37. # Debug or Release
  38. ifeq ($(DEBUG),true)
  39. CEXTRA += -O0 -DDEBUG -g -D__WINESRC__
  40. LIBRARIES +=
  41. else
  42. CEXTRA += -O2 -DNDEBUG -fvisibility=hidden
  43. endif
  44. ### wineasio.dll sources and settings
  45. wineasio_dll_MODULE = wineasio.dll
  46. wineasio_dll_C_SRCS = asio.c \
  47. main.c \
  48. regsvr.c
  49. wineasio_dll_LDFLAGS = -shared \
  50. -m$(M) \
  51. -mnocygwin \
  52. $(wineasio_dll_MODULE:%=%.spec) \
  53. -L/usr/lib$(M)/wine \
  54. -L/usr/lib/wine \
  55. -L/usr/lib/$(ARCH)-linux-gnu/wine \
  56. -L/usr/lib/$(ARCH)-linux-gnu/wine-development \
  57. -L/opt/wine-stable/lib \
  58. -L/opt/wine-stable/lib/wine \
  59. -L/opt/wine-stable/lib$(M) \
  60. -L/opt/wine-stable/lib$(M)/wine \
  61. -L/opt/wine-staging/lib \
  62. -L/opt/wine-staging/lib/wine \
  63. -L/opt/wine-staging/lib$(M) \
  64. -L/opt/wine-staging/lib$(M)/wine
  65. wineasio_dll_DLL_PATH =
  66. wineasio_dll_DLLS = odbc32 \
  67. ole32 \
  68. winmm
  69. wineasio_dll_LIBRARY_PATH=
  70. wineasio_dll_LIBRARIES= uuid
  71. wineasio_dll_OBJS = $(wineasio_dll_C_SRCS:%.c=build$(M)/%.c.o)
  72. ### Global source lists
  73. C_SRCS = $(wineasio_dll_C_SRCS)
  74. ### Generic targets
  75. all:
  76. build: rtaudio/include/asio.h $(DLLS:%=build$(M)/%.so)
  77. ### Build rules
  78. .PHONY: all
  79. # Implicit rules
  80. DEFINCL = $(INCLUDE_PATH) $(DEFINES) $(OPTIONS)
  81. build$(M)/%.c.o: %.c
  82. @$(shell mkdir -p build$(M))
  83. $(CC) -c $(DEFINCL) $(CFLAGS) $(CEXTRA) -o $@ $<
  84. ### Target specific build rules
  85. DEFLIB = $(LIBRARY_PATH) $(LIBRARIES) $(DLL_PATH)
  86. build$(M)/$(wineasio_dll_MODULE).so: $(wineasio_dll_OBJS)
  87. $(WINECC) $(wineasio_dll_LDFLAGS) -o $@ $(wineasio_dll_OBJS) $(wineasio_dll_LIBRARY_PATH) $(DEFLIB) $(wineasio_dll_DLLS:%=-l%) $(wineasio_dll_LIBRARIES:%=-l%)