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.

107 lines
2.9KB

  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. # Debug or Release
  38. ifeq ($(DEBUG),true)
  39. CEXTRA += -O0 -DDEBUG -g -D__WINESRC__
  40. else
  41. CEXTRA += -O2 -DNDEBUG -fvisibility=hidden
  42. endif
  43. ### wineasio.dll settings
  44. wineasio_dll_C_SRCS = asio.c \
  45. main.c \
  46. regsvr.c
  47. wineasio_dll_LDFLAGS = -shared \
  48. -m$(M) \
  49. -mnocygwin \
  50. wineasio.dll.spec \
  51. -L/usr/lib$(M)/wine \
  52. -L/usr/lib/wine \
  53. -L/usr/lib/$(ARCH)-linux-gnu/wine \
  54. -L/usr/lib/$(ARCH)-linux-gnu/wine-development \
  55. -L/opt/wine-stable/lib \
  56. -L/opt/wine-stable/lib/wine \
  57. -L/opt/wine-stable/lib$(M) \
  58. -L/opt/wine-stable/lib$(M)/wine \
  59. -L/opt/wine-staging/lib \
  60. -L/opt/wine-staging/lib/wine \
  61. -L/opt/wine-staging/lib$(M) \
  62. -L/opt/wine-staging/lib$(M)/wine
  63. wineasio_dll_DLLS = odbc32 \
  64. ole32 \
  65. winmm
  66. wineasio_dll_LIBRARIES = uuid
  67. wineasio_dll_OBJS = $(wineasio_dll_C_SRCS:%.c=build$(M)/%.c.o)
  68. ### Global source lists
  69. C_SRCS = $(wineasio_dll_C_SRCS)
  70. ### Generic targets
  71. all:
  72. build: $(DLLS:%=build$(M)/%)
  73. ### Build rules
  74. .PHONY: all
  75. # Implicit rules
  76. build$(M)/%.c.o: %.c
  77. @$(shell mkdir -p build$(M))
  78. $(CC) -c $(INCLUDE_PATH) $(CFLAGS) $(CEXTRA) -o $@ $<
  79. ### Target specific build rules
  80. build$(M)/$(wineasio_dll_MODULE): $(wineasio_dll_OBJS)
  81. $(WINEBUILD) -m$(M) --dll --fake-module -E wineasio.dll.spec $^ -o $@
  82. build$(M)/$(wineasio_dll_MODULE).so: $(wineasio_dll_OBJS)
  83. $(WINECC) $^ $(wineasio_dll_LDFLAGS) $(LIBRARIES) \
  84. $(wineasio_dll_DLLS:%=-l%) $(wineasio_dll_LIBRARIES:%=-l%) -o $@