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.

127 lines
3.1KB

  1. ### Generated by Winemaker
  2. # Check (with pkgconfig) for existance of these packages
  3. PACKAGES = jack
  4. # Usually '/usr' or '/usr/local'
  5. PREFIX = /usr
  6. LIBDIR = $(subst $(PREFIX)/,,$(firstword $(wildcard $(addsuffix /wine/, $(PREFIX)/lib32 $(PREFIX)/lib))))
  7. SRCDIR = .
  8. SUBDIRS =
  9. DLLS = wineasio.dll
  10. EXES =
  11. ### Common settings
  12. CEXTRA = -m32 -g -O2 -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith
  13. CXXEXTRA = -m32 -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith
  14. RCEXTRA =
  15. INCLUDE_PATH = -I. -I/usr/include -I$(PREFIX)/include -I$(PREFIX)/include/wine -I$(PREFIX)/include/wine/windows
  16. DLL_PATH =
  17. LIBRARY_PATH =
  18. LIBRARIES = -ljack
  19. ### wineasio.dll sources and settings
  20. wineasio_dll_MODULE = wineasio.dll
  21. wineasio_dll_C_SRCS = asio.c \
  22. main.c \
  23. regsvr.c
  24. wineasio_dll_CXX_SRCS =
  25. wineasio_dll_RC_SRCS =
  26. wineasio_dll_LDFLAGS = -m32 -shared \
  27. $(wineasio_dll_MODULE:%=%.spec) \
  28. -mnocygwin
  29. wineasio_dll_DLL_PATH =
  30. wineasio_dll_DLLS = odbc32 \
  31. ole32 \
  32. oleaut32 \
  33. winspool \
  34. winmm \
  35. psapi \
  36. pthread
  37. wineasio_dll_LIBRARY_PATH=
  38. wineasio_dll_LIBRARIES= uuid
  39. wineasio_dll_OBJS = $(wineasio_dll_C_SRCS:.c=.o) \
  40. $(wineasio_dll_CXX_SRCS:.cpp=.o) \
  41. $(wineasio_dll_RC_SRCS:.rc=.res)
  42. ### Global source lists
  43. C_SRCS = $(wineasio_dll_C_SRCS)
  44. CXX_SRCS = $(wineasio_dll_CXX_SRCS)
  45. RC_SRCS = $(wineasio_dll_RC_SRCS)
  46. ### Tools
  47. CC = gcc
  48. CXX = g++
  49. WINECC = winegcc
  50. RC = wrc
  51. ### Generic targets
  52. all: asio.h $(PACKAGES) $(SUBDIRS) $(DLLS:%=%.so) $(EXES:%=%.so)
  53. $(PACKAGES): dummy
  54. pkg-config --exists $@
  55. ### Build rules
  56. .PHONY: all clean dummy $(PACKAGES)
  57. $(SUBDIRS): dummy
  58. @cd $@ && $(MAKE)
  59. # Implicit rules
  60. .SUFFIXES: .cpp .rc .res
  61. DEFINCL = $(INCLUDE_PATH) $(DEFINES) $(OPTIONS)
  62. .c.o:
  63. $(CC) -c $(DEFINCL) $(CFLAGS) $(CEXTRA) -o $@ $<
  64. .cpp.o:
  65. $(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<
  66. .cxx.o:
  67. $(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<
  68. .rc.res:
  69. $(RC) $(RCFLAGS) $(RCEXTRA) $(DEFINCL) -fo$@ $<
  70. # Rules for cleaning
  71. CLEAN_FILES = y.tab.c y.tab.h lex.yy.c core *.orig *.rej \
  72. \\\#*\\\# *~ *% .\\\#*
  73. clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
  74. $(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(C_SRCS:.c=.o) $(CXX_SRCS:.cpp=.o)
  75. $(RM) $(DLLS:%=%.so) $(EXES:%=%.so) $(EXES:%.exe=%)
  76. $(SUBDIRS:%=%/__clean__): dummy
  77. cd `dirname $@` && $(MAKE) clean
  78. $(EXTRASUBDIRS:%=%/__clean__): dummy
  79. -cd `dirname $@` && $(RM) $(CLEAN_FILES)
  80. distclean:: clean
  81. $(RM) asio.h
  82. ### Target specific build rules
  83. DEFLIB = $(LIBRARY_PATH) $(LIBRARIES) $(DLL_PATH)
  84. $(wineasio_dll_MODULE).so: $(wineasio_dll_OBJS)
  85. $(WINECC) $(wineasio_dll_LDFLAGS) -o $@ $(wineasio_dll_OBJS) $(wineasio_dll_LIBRARY_PATH) $(DEFLIB) $(wineasio_dll_DLLS:%=-l%) $(wineasio_dll_LIBRARIES:%=-l%)
  86. install:
  87. cp wineasio.dll.so $(PREFIX)/$(LIBDIR)