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.

105 lines
2.7KB

  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/$(ARCH)-linux-gnu/wine \
  55. -L/usr/lib/$(ARCH)-linux-gnu/wine-development \
  56. -L/opt/wine-staging/lib \
  57. -L/opt/wine-staging/lib/wine \
  58. -L/opt/wine-staging/lib$(M) \
  59. -L/opt/wine-staging/lib$(M)/wine
  60. wineasio_dll_DLL_PATH =
  61. wineasio_dll_DLLS = odbc32 \
  62. ole32 \
  63. winmm
  64. wineasio_dll_LIBRARY_PATH=
  65. wineasio_dll_LIBRARIES= uuid
  66. wineasio_dll_OBJS = $(wineasio_dll_C_SRCS:%.c=build$(M)/%.c.o)
  67. ### Global source lists
  68. C_SRCS = $(wineasio_dll_C_SRCS)
  69. ### Generic targets
  70. all:
  71. build: rtaudio/include/asio.h $(DLLS:%=build$(M)/%.so)
  72. ### Build rules
  73. .PHONY: all
  74. # Implicit rules
  75. DEFINCL = $(INCLUDE_PATH) $(DEFINES) $(OPTIONS)
  76. build$(M)/%.c.o: %.c
  77. @$(shell mkdir -p build$(M))
  78. $(CC) -c $(DEFINCL) $(CFLAGS) $(CEXTRA) -o $@ $<
  79. ### Target specific build rules
  80. DEFLIB = $(LIBRARY_PATH) $(LIBRARIES) $(DLL_PATH)
  81. build$(M)/$(wineasio_dll_MODULE).so: $(wineasio_dll_OBJS)
  82. $(WINECC) $(wineasio_dll_LDFLAGS) -o $@ $(wineasio_dll_OBJS) $(wineasio_dll_LIBRARY_PATH) $(DEFLIB) $(wineasio_dll_DLLS:%=-l%) $(wineasio_dll_LIBRARIES:%=-l%)