make it compile again :)
[wineasio.git] / Makefile
blobb96a1209f3f38a88ae575380aa5afa0a33b7ac2e
1 ### Generated by Winemaker
3 PREFIX = /usr
4 SRCDIR = .
5 SUBDIRS =
6 DLLS = wineasio.dll
7 EXES =
11 ### Common settings
13 CEXTRA = -m32 -g -O2 -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith
14 CXXEXTRA = -m32 -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith
15 RCEXTRA =
16 INCLUDE_PATH = -I. -I/usr/include -I$(PREFIX)/include -I$(PREFIX)/include/wine -I$(PREFIX)/include/wine/windows
17 DLL_PATH =
18 LIBRARY_PATH =
19 LIBRARIES = -ljack
22 ### wineasio.dll sources and settings
24 wineasio_dll_MODULE = wineasio.dll
25 wineasio_dll_C_SRCS = asio.c \
26 main.c \
27 regsvr.c
28 wineasio_dll_CXX_SRCS =
29 wineasio_dll_RC_SRCS =
30 wineasio_dll_LDFLAGS = -shared \
31 -m32 \
32 $(wineasio_dll_MODULE:%=%.spec) \
33 -mnocygwin \
34 -L/usr/lib32/wine \
35 -L/usr/lib32
36 wineasio_dll_DLL_PATH =
37 wineasio_dll_DLLS = odbc32 \
38 ole32 \
39 winmm
40 wineasio_dll_LIBRARY_PATH=
41 wineasio_dll_LIBRARIES= uuid
43 wineasio_dll_OBJS = $(wineasio_dll_C_SRCS:.c=.o) \
44 $(wineasio_dll_CXX_SRCS:.cpp=.o) \
45 $(wineasio_dll_RC_SRCS:.rc=.res)
49 ### Global source lists
51 C_SRCS = $(wineasio_dll_C_SRCS)
52 CXX_SRCS = $(wineasio_dll_CXX_SRCS)
53 RC_SRCS = $(wineasio_dll_RC_SRCS)
56 ### Tools
58 CC = gcc
59 CXX = g++
60 WINECC = winegcc
61 RC = wrc
64 ### Generic targets
66 all: asio.h $(SUBDIRS) $(DLLS:%=%.so) $(EXES:%=%.so)
68 ### Build rules
70 .PHONY: all clean dummy
72 $(SUBDIRS): dummy
73 @cd $@ && $(MAKE)
75 # Implicit rules
77 .SUFFIXES: .cpp .rc .res
78 DEFINCL = $(INCLUDE_PATH) $(DEFINES) $(OPTIONS)
80 .c.o:
81 $(CC) -c $(DEFINCL) $(CFLAGS) $(CEXTRA) -o $@ $<
83 .cpp.o:
84 $(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<
86 .cxx.o:
87 $(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<
89 .rc.res:
90 $(RC) $(RCFLAGS) $(RCEXTRA) $(DEFINCL) -fo$@ $<
92 # Rules for cleaning
94 CLEAN_FILES = y.tab.c y.tab.h lex.yy.c core *.orig *.rej \
95 \\\#*\\\# *~ *% .\\\#*
97 clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
98 $(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(C_SRCS:.c=.o) $(CXX_SRCS:.cpp=.o)
99 $(RM) $(DLLS:%=%.so) $(EXES:%=%.so) $(EXES:%.exe=%)
101 $(SUBDIRS:%=%/__clean__): dummy
102 cd `dirname $@` && $(MAKE) clean
104 $(EXTRASUBDIRS:%=%/__clean__): dummy
105 -cd `dirname $@` && $(RM) $(CLEAN_FILES)
107 distclean:: clean
108 $(RM) asio.h
110 ### Target specific build rules
111 DEFLIB = $(LIBRARY_PATH) $(LIBRARIES) $(DLL_PATH)
113 $(wineasio_dll_MODULE).so: $(wineasio_dll_OBJS)
114 $(WINECC) $(wineasio_dll_LDFLAGS) -o $@ $(wineasio_dll_OBJS) $(wineasio_dll_LIBRARY_PATH) $(DEFLIB) $(wineasio_dll_DLLS:%=-l%) $(wineasio_dll_LIBRARIES:%=-l%)
116 install:
117 if [ -d /usr/lib32/wine ]; then cp wineasio.dll.so /usr/lib32/wine; else cp wineasio.dll.so /usr/lib/wine; fi