-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMakefile.linux
72 lines (58 loc) · 2.13 KB
/
Makefile.linux
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
#
# VoIPong Voice Over IP Sniffer
# Copyright (C) 2005 Murat Balaban <murat || enderunix.org>
# All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
CC=cc
CFLAGS= -g -Wall -Iinclude
SHLIBS=-lpcap -ldl
CLEARX = rm -f *~ *core* *pid
OBJS= miscutil.o conf.o voipongglobals.o voipongsign.o voipong.o voipongsock.o \
voipongnet.o voipongpcap.o voipongvoip.o voipongmgmt.o voipongworker.o \
voipongcdr.o voipongcodec.o voiponglfp.o voipongfixed.o
all: modules voipong voipctl
voipong: $(OBJS)
$(CLEARX)
$(CC) -g -o voipong $(CFLAGS) $(LDFLAGS) $(OBJS) $(STLIBS) $(SHLIBS)
voipctl: voipctl.o voipongglobals.o
$(CLEARX)
$(CC) -g -o voipctl voipctl.o voipongglobals.o conf.o miscutil.o $(CFLAGS)
modules: modvocoder_pcmu modvocoder_pcma
modvocoder_pcmu:
$(CLEARX)
$(CC) -fPIC $(CFLAGS) -c modvocoder_pcmu.c
$(CC) -shared -nostdlib -o modvocoder_pcmu.so modvocoder_pcmu.o
modvocoder_pcma:
$(CLEARX)
$(CC) -fPIC $(CFLAGS) -c modvocoder_pcma.c
$(CC) -shared -nostdlib -o modvocoder_pcma.so modvocoder_pcma.o
install:
mkdir -p /usr/local/etc/voipong
mkdir -p /usr/local/etc/voipong/modules
cp voipong /usr/local/bin/
cp voipctl /usr/local/bin/
cp etc/voipong.conf /usr/local/etc/voipong/
chmod 750 /usr/local/bin/voipong
chmod 750 /usr/local/bin/voipctl
chmod 600 /usr/local/etc/voipong/voipong.conf
cp modvocoder_*.so /usr/local/etc/voipong/modules/
chmod 500 /usr/local/etc/voipong/modules/*
cls:
$(CLEARX)
clean:
$(CLEARX)
rm -f voipong voipctl $(OBJS) *.o *.so *~