-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile64
127 lines (89 loc) · 3.26 KB
/
Makefile64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
### Generated by Winemaker
# For MacOS set a few things differently then everyone else
PLATFORM := $(shell uname -s)
ifeq ($(PLATFORM),Darwin)
PREFIX = /usr/local
PLATDLL = /usr/local/lib
INTSAMPLES = -DASIOST32INT
else
PREFIX = /usr
PLATDLL = /usr/lib
INTSAMPLES =
endif
SRCDIR = .
SUBDIRS =
DLLS = wineasio.dll
EXES =
### Common settings
CEXTRA = -g -O2 $(INTSAMPLES) -D__WINESRC__ -DNATIVE_INT64 -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith
CXXEXTRA = $(INTSAMPLES) -D__WINESRC__ -DNATIVE_INT64 -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith
RCEXTRA =
INCLUDE_PATH = -I. -I/usr/include -I$(PREFIX)/include -I$(PREFIX)/include/wine -I$(PREFIX)/include/wine/windows
DLL_PATH =
LIBRARY_PATH =
LIBRARIES = -ljack
### wineasio.dll sources and settings
wineasio_dll_MODULE = wineasio.dll
wineasio_dll_C_SRCS = asio.c \
main.c \
regsvr.c
wineasio_dll_CXX_SRCS =
wineasio_dll_RC_SRCS =
wineasio_dll_LDFLAGS = -shared \
$(wineasio_dll_MODULE:%=%.spec) \
-mnocygwin \
-L$(PLATDLL)/wine \
-L$(PLATDLL)
wineasio_dll_DLL_PATH =
wineasio_dll_DLLS = odbc32 \
ole32 \
winmm
wineasio_dll_LIBRARY_PATH=
wineasio_dll_LIBRARIES= uuid
wineasio_dll_OBJS = $(wineasio_dll_C_SRCS:.c=.o) \
$(wineasio_dll_CXX_SRCS:.cpp=.o) \
$(wineasio_dll_RC_SRCS:.rc=.res)
### Global source lists
C_SRCS = $(wineasio_dll_C_SRCS)
CXX_SRCS = $(wineasio_dll_CXX_SRCS)
RC_SRCS = $(wineasio_dll_RC_SRCS)
### Tools
CC = gcc
CXX = g++
WINECC = winegcc
RC = wrc
### Generic targets
all: asio.h $(SUBDIRS) $(DLLS:%=%.so) $(EXES:%=%.so)
### Build rules
.PHONY: all clean dummy
$(SUBDIRS): dummy
@cd $@ && $(MAKE)
# Implicit rules
.SUFFIXES: .cpp .rc .res
DEFINCL = $(INCLUDE_PATH) $(DEFINES) $(OPTIONS)
.c.o:
$(CC) -c $(DEFINCL) $(CFLAGS) $(CEXTRA) -o $@ $<
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<
.rc.res:
$(RC) $(RCFLAGS) $(RCEXTRA) $(DEFINCL) -fo$@ $<
# Rules for cleaning
CLEAN_FILES = y.tab.c y.tab.h lex.yy.c core *.orig *.rej \
\\\#*\\\# *~ *% .\\\#*
clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
$(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(C_SRCS:.c=.o) $(CXX_SRCS:.cpp=.o)
$(RM) $(DLLS:%=%.so) $(EXES:%=%.so) $(EXES:%.exe=%)
$(SUBDIRS:%=%/__clean__): dummy
cd `dirname $@` && $(MAKE) clean
$(EXTRASUBDIRS:%=%/__clean__): dummy
-cd `dirname $@` && $(RM) $(CLEAN_FILES)
distclean:: clean
$(RM) asio.h
### Target specific build rules
DEFLIB = $(LIBRARY_PATH) $(LIBRARIES) $(DLL_PATH)
$(wineasio_dll_MODULE).so: $(wineasio_dll_OBJS)
$(WINECC) $(wineasio_dll_LDFLAGS) -o $@ $(wineasio_dll_OBJS) $(wineasio_dll_LIBRARY_PATH) $(DEFLIB) $(wineasio_dll_DLLS:%=-l%) $(wineasio_dll_LIBRARIES:%=-l%)
install:
if [ -d $(PREFIX)/lib/wine ]; then cp wineasio.dll.so $(DESTDIR)$(PREFIX)/lib/wine; else cp wineasio.dll.so $(DESTDIR)$(PREFIX)/lib/wine; fi