-
Notifications
You must be signed in to change notification settings - Fork 41
/
Makefile
98 lines (62 loc) · 3.76 KB
/
Makefile
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
#!/usr/bin/make -f
# Makefile for LinVst #
CXX = g++
WINECXX = wineg++ -Wl,--subsystem,windows
CXX_FLAGS =
PREFIX = /usr
BIN_DIR = $(DESTDIR)$(PREFIX)/bin
VST_DIR = ./vst
BUILD_FLAGS = -fPIC -O2 -DLVRT -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -DBIN_DIR='"$(BIN_DIR)"' $(CXX_FLAGS)
BUILD_FLAGS_WIN = -m64 -fPIC -O2 -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -I/opt/wine-staging/include/wine/windows -I/opt/wine-stable/include/wine/windows -I/opt/wine-devel/include/wine/windows -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows
BUILD_FLAGS_WIN32 = -m32 -fPIC -O2 -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DWCLASS -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -I/opt/wine-staging/include/wine/windows -I/opt/wine-stable/include/wine/windows -I/opt/wine-devel/include/wine/windows -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows
LINK_FLAGS = $(LDFLAGS)
LINK_PLUGIN = -shared -lpthread -ldl -lX11 $(LINK_FLAGS)
LINK_WINE = -L/opt/wine-stable/lib64/wine -L/opt/wine-devel/lib64/wine -L/opt/wine-staging/lib64/wine -L/opt/wine-stable/lib64/wine/x86_64-unix -L/opt/wine-devel/lib64/wine/x86_64-unix -L/opt/wine-staging/lib64/wine/x86_64-unix -L/usr/lib/x86_64-linux-gnu/wine-development -lpthread -lX11 -lshell32 -lole32 $(LINK_FLAGS)
LINK_WINE32 = -m32 -L/opt/wine-stable/lib/wine -L/opt/wine-devel/lib/wine -L/opt/wine-staging/lib/wine -L/opt/wine-stable/lib/wine/i386-unix -L/opt/wine-devel/lib/wine/i386-unix -L/opt/wine-staging/lib/wine/i386-unix -L/usr/lib/i386-linux-gnu/wine-development -lpthread -lX11 -lshell32 -lole32 $(LINK_FLAGS)
PATH_TO_FILE = /usr/include/bits
TARGETS = linvst.so lin-vst-server.exe lin-vst-server32.exe
PATH := $(PATH):/opt/wine-stable/bin:/opt/wine-devel/bin:/opt/wine-staging/bin
# --------------------------------------------------------------
all: $(TARGETS)
linvst.so: linvst.unix.o remotevstclient.unix.o remotepluginclient.unix.o paths.unix.o
$(CXX) $^ $(LINK_PLUGIN) -o $@
lin-vst-server.exe: lin-vst-server.wine.o remotepluginserver.wine.o paths.wine.o
$(WINECXX) $^ $(LINK_WINE) -o $@
ifneq ("$(wildcard $(PATH_TO_FILE))","")
lin-vst-server32.exe: lin-vst-server.wine32.o remotepluginserver.wine32.o paths.wine32.o
$(WINECXX) $^ $(LINK_WINE32) -o $@
else
lin-vst-server32.exe:
endif
# --------------------------------------------------------------
linvst.unix.o: linvst.cpp
$(CXX) $(BUILD_FLAGS) -c $^ -o $@
remotevstclient.unix.o: remotevstclient.cpp
$(CXX) $(BUILD_FLAGS) -c $^ -o $@
remotepluginclient.unix.o: remotepluginclient.cpp
$(CXX) $(BUILD_FLAGS) -c $^ -o $@
paths.unix.o: paths.cpp
$(CXX) $(BUILD_FLAGS) -c $^ -o $@
# --------------------------------------------------------------
lin-vst-server.wine.o: lin-vst-server.cpp
$(WINECXX) $(BUILD_FLAGS_WIN) -c $^ -o $@
remotepluginserver.wine.o: remotepluginserver.cpp
$(WINECXX) $(BUILD_FLAGS_WIN) -c $^ -o $@
paths.wine.o: paths.cpp
$(WINECXX) $(BUILD_FLAGS_WIN) -c $^ -o $@
lin-vst-server.wine32.o: lin-vst-server.cpp
$(WINECXX) $(BUILD_FLAGS_WIN32) -c $^ -o $@
remotepluginserver.wine32.o: remotepluginserver.cpp
$(WINECXX) $(BUILD_FLAGS_WIN32) -c $^ -o $@
paths.wine32.o: paths.cpp
$(WINECXX) $(BUILD_FLAGS_WIN32) -c $^ -o $@
clean:
rm -fR *.o *.exe *.so vst $(TARGETS)
install:
install -d $(BIN_DIR)
install -d $(VST_DIR)
install -m 755 linvst.so $(VST_DIR)
install -m 755 lin-vst-server.exe lin-vst-server.exe.so $(BIN_DIR)
ifneq ("$(wildcard $(PATH_TO_FILE))","")
install -m 755 lin-vst-server32.exe lin-vst-server32.exe.so $(BIN_DIR)
endif