forked from chan-sccp/chan-sccp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
114 lines (93 loc) · 3.58 KB
/
Makefile.am
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
# FILE: AutoMake Makefile for chan-sccp-b
# COPYRIGHT: chan-sccp-b.sourceforge.net group 2009
# CREATED BY: Diederik de Groot <[email protected]>
# LICENSE: This program is free software and may be modified and distributed under the terms of the GNU Public License.
# See the LICENSE file at the top of the source tree.
# NOTE: Process this file with automake to produce a makefile.in script.
include $(top_srcdir)/amdoxygen.am
AUTOMAKE_OPTIONS = gnu
EXTRA_DIST = .version tools conf contrib/gen_sccpconf .revision
SUBDIRS = src doc
ACLOCAL_AMFLAGS = -I autoconf
AM_CPPFLAGS = $(LTDLINCL)
distdir = $(PACKAGE)-$(SCCP_VERSION)_$(SCCP_BRANCH)_r$(SCCP_REVISION)
# Update libtool if necessary
libtool: @LIBTOOL_DEPS@
cd $(srcdir) && \
$(SHELL) ./config.status --recheck
FORCE:
# Update ChangeLog file from SVN Log
ChangeLog: FORCE
@$(GIT) log v4.2.0...HEAD --pretty=medium >ChangeLog
# Update ChangeLog Files and Generate Doxygen Documentation
doxygen: ChangeLog doxygen-doc
deb:
dpkg-buildpackage -rfakeroot -us -uc
rpm: release
if ENABLE_RPMBUILD
@if [ ! -d ~/rpmbuild/BUILD ]; then mkdir -p ~/rpmbuild/BUILD;fi
@if [ ! -d ~/rpmbuild/SOURCES ]; then mkdir -p ~/rpmbuild/SOURCES;fi
@if [ ! -d ~/rpmbuild/SPECS ]; then mkdir -p ~/rpmbuild/SPECS;fi
@if [ ! -d ~/rpmbuild/RPMS ]; then mkdir -p ~/rpmbuild/RPMS;fi
@if [ ! -d ~/rpmbuild/SRPMS ]; then mkdir -p ~/rpmbuild/SRPMS;fi
@cp $(distdir).tar.gz ~/rpmbuild/SOURCES/;
@cp tools/chan-sccp-b.spec ~/rpmbuild/SOURCES/;
@if [ -f /etc/SuSE-release ]; then \
export ASTERISKVER="`echo $(ASTERISK_VER)|sed 's/\.//g'`"; \
fi;
@export RPMVERSION=$(SCCP_VERSION);
@export RPMBRANCH=$(SCCP_BRANCH);
@export RPMREVISION=$(SCCP_REVISION);
@cd /usr/src/packages/SOURCES/ && SOURCEDIR="Chan_SCCP-4.3.0_TRUNK_r6452" rpmbuild -bb chan-sccp-b.spec --define="_usr ~/rpmbuild/";
else
@echo ""; \
echo "RPM Build on your platform not (yet) supported !"; \
echo "If you like you could send us the required package build file for your platform"; \
echo "";
endif
release:
@rm -f ChangeLog
@$(MAKE) ChangeLog
@if [ "`grep -i $(SCCP_VERSION)_$(SCCP_BRANCH) NEWS`" == "" ]; then \
echo >>NEWS;\
echo "Version: $(SCCP_VERSION)_$(SCCP_BRANCH)" >> NEWS; \
echo "Please edit the NEWS file now..."; \
/usr/bin/joe NEWS; \
/usr/bin/debchange; \
tools/autorevision -o .revision -t m4 2>&1 >/dev/null; \
else \
echo "Could not find $(SCCP_VERSION)_$(SCCP_BRANCH) in NEWS file"; \
exit; \
fi
@$(MAKE) dist-gzip
gen_sccpconf:
cd contrib/gen_sccpconf && $(MAKE) $(AM_MAKEFLAGS) all
gen_sccpconf_install:
cd contrib/gen_sccpconf && $(MAKE) $(AM_MAKEFLAGS) install
isntall: install
rmcoverage:
[ -d coverage ] && rm -rf coverage;
coverage: src/.libs/chan_sccp.so
mkdir coverage; \
lcov --directory src/.libs -b src -c --o coverage/chan-sccp-b.info ; \
genhtml -o coverage -f -t chan-sccp-b coverage/chan-sccp-b.info
coverage-zero: rmcoverage
lcov --directory src/.libs -b src -z;
test:
@echo "Success"
install-data-local:
@test -d $(DESTDIR)$(PBX_ETC) || $(mkinstalldirs) $(DESTDIR)$(PBX_ETC); \
if [ ! -f $(DESTDIR)$(PBX_ETC)/sccp.conf ]; then \
echo "Installing $(DESTDIR)$(PBX_ETC)/sccp.conf..."; \
$(INSTALL) -m 644 $(top_srcdir)/conf/sccp.conf $(DESTDIR)$(PBX_ETC); \
fi
unload:
cd src;make unload
load:
cd src;make load
reload:
cd src;make reload
#install-exec-hook:
# @if test "$(DEBUG)" == "1" && test -n "$(GDB)" && test tools/chan-sccp-b_backtrace -nt /usr/bin/chan-sccp-b_backtrace; then \
# $(INSTALL) -C tools/chan-sccp-b_backtrace /usr/bin/chan-sccp-b_backtrace; \
# fi