forked from BearWare/TeamTalk5
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
115 lines (100 loc) · 4.86 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
TEAMTALK_ROOT=$(PWD)/../..
#locations of 'hamcrest-core' and 'junit'
HAMCRESTCORE_JAR ?= /usr/share/java/hamcrest-core.jar
JUNIT_JAR ?= /usr/share/java/junit4.jar
ifeq ($(shell uname),Darwin)
SHARED_EXT := dylib
LIBPATHNAME=DYLD_LIBRARY_PATH
else
SHARED_EXT := so
LIBPATHNAME=LD_LIBRARY_PATH
endif
CLASSPATH ?= .:$(HAMCRESTCORE_JAR):$(JUNIT_JAR)
CLASSPATH_STD = $(CLASSPATH):$(PWD)/libs/TeamTalk5.jar:$(PWD)/libs/TeamTalk5Test.jar
CLASSPATH_PRO = $(CLASSPATH):$(PWD)/libs/TeamTalk5Pro.jar:$(PWD)/libs/TeamTalk5ProTest.jar
CLASSPATH_SRV = $(CLASSPATH):$(PWD)/libs/TeamTalk5Pro.jar:$(PWD)/libs/TeamTalk5SrvTest.jar
# DYLD_LIBRARY_PATH has been removed in Mac OS Sierra, so use
# -Djava.library.path instead
LIBPATH=$(TEAMTALK_ROOT)/Library/TeamTalk_DLL:$(TEAMTALK_ROOT)/Library/TeamTalkJNI/libs
SRCTARGET=-source 1.7 -target 1.7
# Override default settings in dk.bearware.TeamTalkTestCaseBase
JAVAPROP=-Djava.library.path=$(LIBPATH)
JAVAPROP+=-Ddk.bearware.sndinputid=$(INPUTDEVICEID)
JAVAPROP+=-Ddk.bearware.sndoutputid=$(OUTPUTDEVICEID)
JAVAPROP+=-Ddk.bearware.encrypted=$(ENCRYPTED)
JAVAPROP+=-Ddk.bearware.videodevid=$(VIDEODEVICEID)
JAVAPROP+=-Ddk.bearware.serverip=$(SERVERIP)
JAVAPROP+=-Ddk.bearware.serverbindip=$(SERVERBINDIP)
JAVAPROP+=-Ddk.bearware.videofile=$(VIDEOFILE)
JAVAPROP+=-Ddk.bearware.audiofile=$(AUDIOFILE)
JAVAPROP+=-Ddk.bearware.httpsfile=$(HTTPSFILE)
JAVAPROP+=-Ddk.bearware.opustools=$(OPUSTOOLS)
JAVAPROP+=-Ddk.bearware.verbose=$(VERBOSE)
JAVAPROP+=-Ddk.bearware.speexdsp=$(SPEEXDSP)
JAVAPROP+=-Ddk.bearware.webrtc=$(WEBRTC)
JAVAPROP+=-Ddk.bearware.githubskip=$(GITHUBSKIP)
help:
@echo "Targets:"
@echo " macnative"
@echo " - Setup libTeamTalk5-jni.$(SHARED_EXT) JNI DLL for TeamTalk5 DLL,"
@echo " i.e. run install_name_tool to set dependency path (otool -L)"
@echo " macnativepro"
@echo " - Setup libTeamTalk5Pro-jni.$(SHARED_EXT) JNI DLL for TeamTalk5Pro DLL,"
@echo " i.e. run install_name_tool to set dependency path (otool -L)"
@echo " runjunit"
@echo " - Run JUnit test-cases in TeamTalkStdTestSuite"
@echo " runjunitpro"
@echo " - Run JUnit test-cases in TeamTalkProTestSuite"
@echo " runjunitsrv"
@echo " - Run JUnit test-cases in TeamTalkSrvTestSuite"
@echo " testcase"
@echo " - Build and run a single test-case in TeamTalkTestCase-class"
@echo " E.g make TARGET=test_04_Auth testcase"
@echo " testcasepro"
@echo " - Build and run a single test-case in TeamTalkTestCase-class"
@echo " E.g make TARGET=test_04_Auth testcasepro"
@echo " testcasesrv"
@echo " - Build and run a single test-case in TeamTalkServerTestCase-class"
@echo " E.g make TARGET=test_04_Auth testcasesrv"
@echo ""
@echo "When running an application which uses the TeamTalk 5 SDK then"
@echo "ensure $(LIBPATHNAME) is set up with the path to both "
@echo "TeamTalk 5 DLL dependencies."
@echo ""
@echo "For TeamTalk 5 SDK Standard Edition i.e. libTeamTalk5.$(SHARED_EXT)"
@echo "and libTeamTalk5-jni.$(SHARED_EXT)"
@echo "For TeamTalk 5 SDK Professional Edition i.e. libTeamTalk5Pro.$(SHARED_EXT)"
@echo "and libTeamTalk5Pro-jni.$(SHARED_EXT)"
@echo ""
@echo "Example:"
@echo "$$ export $(LIBPATHNAME)=SDK_ROOT/Library/TeamTalk_DLL:SDK_ROOT/Library/TeamTalkJNI/libs"
@echo ""
@echo "Useful environment variables:"
@echo " INPUTDEVICEID"
@echo " 1978 = virtual sound device, -1 = default audio device. Default is -1."
@echo " OUTPUTDEVICEID"
@echo " 1978 = virtual sound device, -1 = default audio device. Default is -1."
@echo " ENCRYPTED"
@echo " 0 = Non-encrypted, 1 = Encrypted. Default is 0."
@echo " VIDEODEVICEID"
@echo " None = Disable video capure unit tests. Default is None."
@echo " SERVERIP"
@echo " Client should connect to this hostname/IP-address. Default is 127.0.0.1"
@echo " SERVERBINDIP"
@echo " Server should bind to this IP-address. Unspecified means same as SERVERIP"
macnative:
install_name_tool -change @rpath/libTeamTalk5.dylib $(TEAMTALK_ROOT)/Library/TeamTalk_DLL/libTeamTalk5.dylib libs/libTeamTalk5-jni.dylib
macnativepro:
install_name_tool -change @rpath/libTeamTalk5Pro.dylib $(TEAMTALK_ROOT)/Library/TeamTalk_DLL/libTeamTalk5Pro.dylib libs/libTeamTalk5Pro-jni.dylib
runjunit:
cd test && java -cp "$(CLASSPATH_STD)" $(JAVAPROP) org.junit.runner.JUnitCore TeamTalkStdTestSuite
runjunitpro:
cd test && java -cp "$(CLASSPATH_PRO)" $(JAVAPROP) org.junit.runner.JUnitCore TeamTalkProTestSuite
runjunitsrv:
cd test && java -cp "$(CLASSPATH_SRV)" $(JAVAPROP) org.junit.runner.JUnitCore TeamTalkServerTestSuite
testcase:
cd test && java -cp "$(CLASSPATH_STD)" $(JAVAPROP) SingleJUnitTestRunner dk.bearware.TeamTalkStdTestCase#$(TARGET)
testcasepro:
cd test && java -cp "$(CLASSPATH_PRO)" $(JAVAPROP) SingleJUnitTestRunner dk.bearware.TeamTalkProTestCase#$(TARGET)
testcasesrv:
cd test && java -cp "$(CLASSPATH_SRV)" $(JAVAPROP) SingleJUnitTestRunner dk.bearware.TeamTalkServerTestCase#$(TARGET)