forked from osxmidi/LinVst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (45 loc) · 1.96 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
#!/usr/bin/make -f
# Makefile for LinVst #
CXX = g++
WINECXX = wineg++
CXX_FLAGS =
PREFIX = /usr
BIN_DIR = $(DESTDIR)$(PREFIX)/bin
VST_DIR = ./vst
BUILD_FLAGS = -fPIC -O2 -DLVRT -DEMBED -DEMBEDDRAG -DWAVES -DVESTIGE $(CXX_FLAGS)
# add -DFOCUS to the above line for alternative keyboard focus operation, add -DEMBEDRESIZE to the above line for window resizing
BUILD_FLAGS_WIN = -m64 -O2 -DEMBED -DEMBEDDRAG -DWAVES -DWAVESLOOP -DVESTIGE -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows
# add -DEMBEDRESIZE to the above line for window resizing
LINK_FLAGS = $(LDFLAGS)
LINK_PLUGIN = -shared -lpthread -ldl -lX11 -lrt $(LINK_FLAGS)
LINK_WINE = -lpthread -lrt $(LINK_FLAGS)
TARGETS = linvst.so lin-vst-server.exe
# --------------------------------------------------------------
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 $@
# --------------------------------------------------------------
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 $@
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)