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.

112 lines
3.0KB

  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. wineasio_dll_MODULE = wineasio$(M).dll
  14. PREFIX = /usr
  15. SRCDIR = .
  16. DLLS = $(wineasio_dll_MODULE) $(wineasio_dll_MODULE).so
  17. ### Tools
  18. CC = gcc
  19. WINEBUILD = winebuild
  20. WINECC = winegcc
  21. ### Common settings
  22. CEXTRA = -m$(M) -D_REENTRANT -fPIC -Wall -pipe
  23. CEXTRA += -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith
  24. CEXTRA += -Werror=implicit-function-declaration
  25. CEXTRA += $(shell pkg-config --cflags jack)
  26. RCEXTRA =
  27. INCLUDE_PATH = -I. -Irtaudio/include
  28. INCLUDE_PATH += -I$(PREFIX)/include/wine
  29. INCLUDE_PATH += -I$(PREFIX)/include/wine/windows
  30. INCLUDE_PATH += -I$(PREFIX)/include/wine-development
  31. INCLUDE_PATH += -I$(PREFIX)/include/wine-development/wine/windows
  32. INCLUDE_PATH += -I/opt/wine-stable/include
  33. INCLUDE_PATH += -I/opt/wine-stable/include/wine/windows
  34. INCLUDE_PATH += -I/opt/wine-staging/include
  35. INCLUDE_PATH += -I/opt/wine-staging/include/wine/windows
  36. LIBRARIES = $(shell pkg-config --libs jack)
  37. # 64bit build needs an extra flag
  38. ifeq ($(M),64)
  39. CEXTRA += -DNATIVE_INT64
  40. endif
  41. # Debug or Release
  42. ifeq ($(DEBUG),true)
  43. CEXTRA += -O0 -DDEBUG -g -D__WINESRC__
  44. else
  45. CEXTRA += -O2 -DNDEBUG -fvisibility=hidden
  46. endif
  47. ### wineasio.dll settings
  48. wineasio_dll_C_SRCS = asio.c \
  49. main.c \
  50. regsvr.c
  51. wineasio_dll_LDFLAGS = -shared \
  52. -m$(M) \
  53. -mnocygwin \
  54. wineasio.dll.spec \
  55. -L/usr/lib$(M)/wine \
  56. -L/usr/lib/wine \
  57. -L/usr/lib/$(ARCH)-linux-gnu/wine \
  58. -L/usr/lib/$(ARCH)-linux-gnu/wine-development \
  59. -L/opt/wine-stable/lib \
  60. -L/opt/wine-stable/lib/wine \
  61. -L/opt/wine-stable/lib$(M) \
  62. -L/opt/wine-stable/lib$(M)/wine \
  63. -L/opt/wine-staging/lib \
  64. -L/opt/wine-staging/lib/wine \
  65. -L/opt/wine-staging/lib$(M) \
  66. -L/opt/wine-staging/lib$(M)/wine
  67. wineasio_dll_DLLS = odbc32 \
  68. ole32 \
  69. winmm
  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)/%)
  77. ### Build rules
  78. .PHONY: all
  79. # Implicit rules
  80. build$(M)/%.c.o: %.c
  81. @$(shell mkdir -p build$(M))
  82. $(CC) -c $(INCLUDE_PATH) $(CFLAGS) $(CEXTRA) -o $@ $<
  83. ### Target specific build rules
  84. build$(M)/$(wineasio_dll_MODULE): $(wineasio_dll_OBJS)
  85. $(WINEBUILD) -m$(M) --dll --fake-module -E wineasio.dll.spec $^ -o $@
  86. build$(M)/$(wineasio_dll_MODULE).so: $(wineasio_dll_OBJS)
  87. $(WINECC) $^ $(wineasio_dll_LDFLAGS) $(LIBRARIES) \
  88. $(wineasio_dll_DLLS:%=-l%) $(wineasio_dll_LIBRARIES:%=-l%) -o $@