forked from voipmonitor/sniffer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
249 lines (184 loc) · 11 KB
/
Makefile.in
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
##### CPU variants #####
GCCARCH = $(shell uname -m)
ifeq ($(GCCARCH),amd64)
GCCARCH = core2
endif
ifeq ($(GCCARCH),i386)
GCCARCH = core2
endif
ifeq ($(GCCARCH),x86_64)
GCCARCH = core2
endif
ifeq ($(findstring arm,$(GCCARCH)),arm)
GCCARCH = armv6k
endif
GCCARCH = native
GCCVERSION = $(shell gcc --version | grep ^gcc | sed 's/^.* //g' | cut -f1,2 -d.)
ifeq "$(GCCVERSION)" "4.1"
GCCARCH = core2
endif
version = $(shell grep RTPSENSOR_VERSION voipmonitor.h | cut -d" " -f 3 | tr -d "\"")
objects = config_mysql.o regcache.o codec_alaw.o codec_ulaw.o format_slinear.o format_wav.o format_ogg.o calltable.o rtp.o voipmonitor.o sniff.o jitterbuffer/astmm.o jitterbuffer/utils.o jitterbuffer/fixedjitterbuf.o jitterbuffer/jitterbuf.o jitterbuffer/abstract_jb.o jitterbuffer/frame.o manager.o tools.o filter_mysql.o hash.o mos_g729.o odbc.o rtcp.o pcap_queue.o sql_db.o md5.o mirrorip.o ipaccount.o skinny.o pstat.o generator.o tcpreassembly.o http.o cleanspool.o fraud.o
headers = $(shell ls -1 *.h | tr "\n" " ")
#args = -g3 -Wall -march=$(GCCARCH)
#args = -O2 -Wall -march=$(GCCARCH)
#CFLAGS+=-I /usr/local/include/mysql++/ -I /usr/include/mysql++/ -I /usr/include/mysql/ -g3 -Wall -I jitterbuffer/ -L/usr/local/lib/ -fPIC
#LDFLAGS := $(LDFLAGS) -static -static-libgcc
shared: LIBS=-lpthread -lpcap -lz -lvorbis -lvorbisenc -logg -lodbc -lmysqlclient -lrt -lsnappy -lcurl -lssl -lcrypto -ljson -lssh -lssh_threads #-lnids
shared: CFLAGS+= -DQUEUE_NONBLOCK2 -I/usr/local/include -I/usr/include/mysql/ -Wall -I jitterbuffer/ -L/usr/local/lib/mysql -L/usr/lib/mysql -L/usr/local/lib/ -L/usr/lib64/mysql -fPIC -g3 -O2
shared: args = -g3 -Wall -march=$(GCCARCH) -mtune=${GCCARCH} -O2
static: LIBS=-static -L/usr/lib/mysql -L/usr/lib64/mysql -L/usr/lib/mysql -lodbc -lltdl -ldl -lrt -lz -lssh -lssh_threads -lcrypt -lm -lcurl -lssl -lcrypto -static-libstdc++ -static-libgcc -lpcap -L/usr/lib/mysql -lpthread -lmysqlclient -lpthread -lz -lc -lvorbis -lvorbisenc -logg -lrt -lsnappy -ljson
static: CFLAGS+= -DQUEUE_NONBLOCK2 -I/usr/local/include -I /usr/include/mysql/ -Wall -I jitterbuffer/ -L/usr/local/lib/ -fPIC -O2
static: args = -O2 -Wall -march=$(GCCARCH) -mtune=${GCCARCH}
staticlibc: LIBS=-static -L/opt/libc/lib/ -L/usr/lib/mysql -L/usr/lib64/mysql -L/usr/lib/mysql -lc_nonshared -lodbc -lltdl -ldl -lrt -lz -lssh -lssh_threads -lcurl -lcrypt -lm -lssl -lcrypto -static-libstdc++ -static-libgcc -lpcap -L/usr/lib/mysql -lpthread -lmysqlclient -lpthread -lz -lc -lvorbis -lvorbisenc -logg -lrt -lsnappy -ljson
staticlibc: CFLAGS+= -DQUEUE_NONBLOCK2 -I/opt/libc/include -L/opt/libc/lib/ -I/usr/local/include -I /usr/include/mysql/ -Wall -I jitterbuffer/ -L/usr/local/lib/ -fPIC -O2
staticlibc: args = -O2 -Wall -march=$(GCCARCH) -mtune=${GCCARCH}
armv5shared: LIBS=-lpthread -lpcap -lz -lcurl -lssl -lcrypto -lvorbis -lvorbisenc -logg -lodbc -lmysqlclient -lrt -lsnappy -ljson -lssh -lssh_threads
armv5shared: CFLAGS+= -DQUEUE_NONBLOCK2 -DPACKED -I /usr/include/mysql/ -g3 -Wall -I jitterbuffer/ -L/usr/local/lib/ -L/usr/lib64/mysql -fPIC
armv5shared: args = -g3 -Wall
armv5static: LIBS=-static -L/usr/lib/mysql -lodbc -lltdl -ldl -lrt -lz -lcrypt -lm -lssh -lssh_threads -lcurl -lssl -lcrypto -static-libstdc++ -static-libgcc -lpcap -L/usr/lib/mysql -L/usr/lib64/mysql/ -lmysqlclient -lpthread -lz -lc -lvorbis -lvorbisenc -logg -lrt -lsnappy -ljson
armv5static: CFLAGS+= -DQUEUE_NONBLOCK2 -DPACKED -I /usr/include/mysql/ -g3 -Wall -I jitterbuffer/ -L/usr/local/lib/ -L/usr/lib64/mysql -fPIC
armv5static: args = -g3 -Wall
core2: LIBS=-static -L/usr/lib/mysql -L/usr/lib64/mysql -L/usr/lib/mysql -lodbc -lltdl -ldl -lrt -lz -lssh -lssh_threads -lcrypt -lm -lcurl -lssl -lcrypto -static-libstdc++ -static-libgcc -lpcap -L/usr/lib/mysql -lpthread -lmysqlclient -lpthread -lz -lc -lvorbis -lvorbisenc -logg -lrt -lsnappy -ljson
core2: CFLAGS+= -DQUEUE_NONBLOCK2 -I /usr/include/mysql/ -Wall -I jitterbuffer/ -L/usr/local/lib/ -fPIC -O2 -g3
core2: args = -O2 -Wall -march=core2 -mtune=core2 -g3
core2debug: LIBS=-static -L/usr/lib/mysql -L/usr/lib64/mysql -L/usr/lib/mysql -lodbc -lltdl -ldl -lrt -lz -lcrypt -lm -lssh -lssh_threads -lcurl -lssl -lcrypto -static-libstdc++ -static-libgcc -lpcap -L/usr/lib/mysql -lpthread -lmysqlclient -lpthread -lz -lc -lvorbis -lvorbisenc -logg -lrt -lsnappy -ljson
core2debug: CFLAGS+= -DQUEUE_NONBLOCK2 -I /usr/include/mysql/ -Wall -I jitterbuffer/ -L/usr/local/lib/ -fPIC -O2 -g3
core2debug: args = -O2 -Wall -march=core2 -mtune=core2 -g3
shared: cleantest $(objects)
g++ $(objects) ${CFLAGS} -o voipmonitor ${LIBS}
static: cleantest $(objects)
g++ $(objects) ${CFLAGS} -o voipmonitor ${LIBS}
core2: cleantest $(objects)
g++ $(objects) ${CFLAGS} -o voipmonitor ${LIBS}
core2debug: cleantest $(objects)
g++ $(objects) ${CFLAGS} -o voipmonitor ${LIBS}
staticlibc: cleantest $(objects)
g++ $(objects) ${CFLAGS} -o voipmonitor ${LIBS}
armv5shared: cleantest $(objects)
g++ $(objects) ${CFLAGS} -o voipmonitor ${LIBS}
armv5static: cleantest $(objects)
g++ $(objects) ${CFLAGS} -o voipmonitor ${LIBS}
cleantest:
@cmp -s .cleancount .lastclean || $(MAKE) clean
codec_alaw.o : codec_alaw.cpp codec_alaw.h ${headers}
g++ -c codec_alaw.cpp $(args) ${CFLAGS}
codec_ulaw.o : codec_ulaw.cpp codec_ulaw.h ${headers}
g++ -c codec_ulaw.cpp $(args) ${CFLAGS}
format_slinear.o : format_slinear.cpp format_slinear.h ${headers}
g++ -c format_slinear.cpp $(args) ${CFLAGS}
format_wav.o : format_wav.cpp format_wav.h ${headers}
g++ -c format_wav.cpp $(args) ${CFLAGS}
format_ogg.o : format_ogg.cpp format_ogg.h ${headers}
g++ -c format_ogg.cpp $(args) ${CFLAGS}
calltable.o : calltable.cpp calltable.h ${headers}
g++ -c calltable.cpp $(args) ${CFLAGS}
rtp.o : rtp.cpp rtp.h ${headers}
g++ -c rtp.cpp $(args) ${CFLAGS}
rtcp.o : rtcp.cpp rtcp.h ${headers}
g++ -c rtcp.cpp $(args) ${CFLAGS}
voipmonitor.o : voipmonitor.cpp voipmonitor.h ${headers}
g++ -c voipmonitor.cpp $(args) ${CFLAGS}
sniff.o : sniff.cpp sniff.h ${headers}
g++ -c sniff.cpp $(args) ${CFLAGS}
manager.o : manager.cpp manager.h ${headers}
g++ -c manager.cpp $(args) ${CFLAGS}
tools.o : tools.cpp tools.h ${headers}
g++ -c tools.cpp $(args) ${CFLAGS}
filter_mysql.o : filter_mysql.cpp filter_mysql.h ${headers}
g++ -c filter_mysql.cpp $(args) ${CFLAGS}
hash.o : hash.cpp hash.h ${headers}
g++ -c hash.cpp $(args) ${CFLAGS}
mos_g729.o : mos_g729.cpp mos_g729.h ${headers}
g++ -c mos_g729.cpp $(args) ${CFLAGS}
pcap_queue.o : pcap_queue.cpp pcap_queue.h ${headers}
g++ -c pcap_queue.cpp $(args) ${CFLAGS}
sql_db.o : sql_db.cpp sql_db.h ${headers}
g++ -c sql_db.cpp $(args) ${CFLAGS}
md5.o : md5.cpp md5.h ${headers}
g++ -c md5.cpp $(args) ${CFLAGS}
mirrorip.o : mirrorip.cpp mirrorip.h ${headers}
g++ -c mirrorip.cpp $(args) ${CFLAGS}
ipaccount.o : ipaccount.cpp ipaccount.h ${headers}
g++ -c ipaccount.cpp $(args) ${CFLAGS}
skinny.o : skinny.cpp skinny.h ${headers}
g++ -c skinny.cpp $(args) ${CFLAGS}
http.o : http.cpp http.h ${headers}
g++ -c http.cpp $(args) ${CFLAGS}
tcpreassembly.o : tcpreassembly.cpp tcpreassembly.h ${headers}
g++ -c tcpreassembly.cpp $(args) ${CFLAGS}
cleanspool.o : cleanspool.cpp cleanspool.h ${headers}
g++ -c cleanspool.cpp $(args) ${CFLAGS}
pstat.o : pstat.cpp pstat.h
g++ -c pstat.cpp $(args) ${CFLAGS}
odbc.o : odbc.cpp odbc.h
g++ -c odbc.cpp $(args) ${CFLAGS}
generator.o : generator.cpp generator.h
g++ -c generator.cpp $(args) ${CFLAGS}
regcache.o : regcache.cpp regcache.h
g++ -c regcache.cpp $(args) ${CFLAGS}
sql_mysql.o : sql_mysql.cpp sql_mysql.h
g++ -c sql_mysql.cpp $(args) ${CFLAGS}
config_mysql.o : config_mysql.cpp config_mysql.h
g++ -c config_mysql.cpp $(args) ${CFLAGS}
fraud.o : fraud.cpp fraud.h
g++ -c fraud.cpp $(args) ${CFLAGS}
clean :
rm -f $(objects) voipmonitor
cp -f .cleancount .lastclean
targz64: core2
rm -rf voipmonitor-amd64-${version}-static*
mkdir -p voipmonitor-amd64-${version}-static/usr/local/sbin
cp voipmonitor voipmonitor-amd64-${version}-static/usr/local/sbin/
chmod +x voipmonitor-amd64-${version}-static/usr/local/sbin/voipmonitor
mkdir -p voipmonitor-amd64-${version}-static/usr/local/share/voipmonitor/audio
cp samples/audio/* voipmonitor-amd64-${version}-static/usr/local/share/voipmonitor/audio/
mkdir -p voipmonitor-amd64-${version}-static/etc/init.d
cp config/voipmonitor.conf voipmonitor-amd64-${version}-static/etc/
cp config/init.d/voipmonitor voipmonitor-amd64-${version}-static/etc/init.d/
chmod +x voipmonitor-amd64-${version}-static/etc/init.d/voipmonitor
cp scripts/install-script.sh voipmonitor-amd64-${version}-static/
chmod +x voipmonitor-amd64-${version}-static/install-script.sh
tar -czf voipmonitor-amd64-${version}-static.tar.gz voipmonitor-amd64-${version}-static
rm -rf voipmonitor-amd64-${version}-static
targz64debug: core2debug
rm -rf voipmonitor-amd64-${version}-static*
mkdir -p voipmonitor-amd64-${version}-static/usr/local/sbin
cp voipmonitor voipmonitor-amd64-${version}-static/usr/local/sbin/
chmod +x voipmonitor-amd64-${version}-static/usr/local/sbin/voipmonitor
mkdir -p voipmonitor-amd64-${version}-static/usr/local/share/voipmonitor/audio
cp samples/audio/* voipmonitor-amd64-${version}-static/usr/local/share/voipmonitor/audio/
mkdir -p voipmonitor-amd64-${version}-static/etc/init.d
cp config/voipmonitor.conf voipmonitor-amd64-${version}-static/etc/
cp config/init.d/voipmonitor voipmonitor-amd64-${version}-static/etc/init.d/
chmod +x voipmonitor-amd64-${version}-static/etc/init.d/voipmonitor
cp scripts/install-script.sh voipmonitor-amd64-${version}-static/
chmod +x voipmonitor-amd64-${version}-static/install-script.sh
tar -czf voipmonitor-amd64-${version}-static-debug.tar.gz voipmonitor-amd64-${version}-static
rm -rf voipmonitor-amd64-${version}-static
targz32: core2
rm -rf voipmonitor-i686-${version}-static*
mkdir -p voipmonitor-i686-${version}-static/usr/local/sbin
cp voipmonitor voipmonitor-i686-${version}-static/usr/local/sbin/
chmod +x voipmonitor-i686-${version}-static/usr/local/sbin/voipmonitor
mkdir -p voipmonitor-amd64-${version}-static/usr/local/share/voipmonitor/audio
cp samples/audio/* voipmonitor-amd64-${version}-static/usr/local/share/voipmonitor/audio/
mkdir -p voipmonitor-i686-${version}-static/etc/init.d
cp config/voipmonitor.conf voipmonitor-i686-${version}-static/etc/
cp config/init.d/voipmonitor voipmonitor-i686-${version}-static/etc/init.d/
chmod +x voipmonitor-i686-${version}-static/etc/init.d/voipmonitor
cp scripts/install-script.sh voipmonitor-i686-${version}-static/
chmod +x voipmonitor-i686-${version}-static/install-script.sh
tar -czf voipmonitor-i686-${version}-static.tar.gz voipmonitor-i686-${version}-static
rm -rf voipmonitor-i686-${version}-static
source: clean
rm -rf voipmonitor-${version}-src
mkdir voipmonitor-${version}-src
cp -a * voipmonitor-${version}-src/
rm -rf voipmonitor-${version}-src/voipmonitor-${version}-src
rm -rf `find voipmonitor-${version}-src -type d -name .svn`
rm voipmonitor-${version}-src/Makefile
echo 1 > voipmonitor-${version}-src/.cleancount
tar -czf voipmonitor-${version}-src.tar.gz voipmonitor-${version}-src
install:
install voipmonitor /usr/local/sbin/