Makefile.am 3.56 KB
Newer Older
1 2
GITVERSION_FILE=liblinphone_gitversion.h
GITVERSION_FILE_TMP=liblinphone_gitversion.h.tmp
Simon Morlat's avatar
Simon Morlat committed
3
GITDESCRIBE=`git describe --always`
4
GITREVISION=`git rev-parse HEAD`
5 6

ECHO=/bin/echo
7

Simon Morlat's avatar
Simon Morlat committed
8
SUBDIRS=. help
aymeric's avatar
aymeric committed
9

10 11 12 13 14
EXTRA_DIST=linphonecore_jni.cc $(GITVERSION_FILE)

BUILT_SOURCES=$(GITVERSION_FILE)

CLEANFILES=$(GITVERSION_FILE)
Simon Morlat's avatar
Simon Morlat committed
15

aymeric's avatar
aymeric committed
16 17 18
## Process this file with automake to produce Makefile.in
linphone_includedir=$(includedir)/linphone

19
linphone_include_HEADERS=linphonecore.h linphonefriend.h linphonepresence.h linphonecore_utils.h lpconfig.h sipsetup.h event.h
jehan's avatar
jehan committed
20 21 22 23

if BUILD_TUNNEL
linphone_include_HEADERS+=linphone_tunnel.h
endif
aymeric's avatar
aymeric committed
24 25 26 27 28

lib_LTLIBRARIES=liblinphone.la

liblinphone_la_SOURCES=\
	linphonecore.c linphonecore.h private.h\
29
	offeranswer.c offeranswer.h\
Simon Morlat's avatar
Simon Morlat committed
30
	sal.c sal.h \
31
	callbacks.c \
aymeric's avatar
aymeric committed
32
	misc.c  \
33
	address.c \
aymeric's avatar
aymeric committed
34 35 36 37 38 39 40
	enum.c enum.h \
	presence.c \
	proxy.c \
	friend.c \
	authentication.c \
	lpconfig.c lpconfig.h \
	chat.c \
41
	linphonecall.c \
42
	sipsetup.c sipsetup.h \
Simon Morlat's avatar
Simon Morlat committed
43
	siplogin.c \
Simon Morlat's avatar
Simon Morlat committed
44
	lsd.c linphonecore_utils.h \
Simon Morlat's avatar
Simon Morlat committed
45
	ec-calibrator.c \
Simon Morlat's avatar
Simon Morlat committed
46
	conference.c \
Margaux Clerc's avatar
Margaux Clerc committed
47
	message_storage.c \
Simon Morlat's avatar
Simon Morlat committed
48
	info.c \
jehan's avatar
jehan committed
49
	event.c event.h \
50
	$(GITVERSION_FILE)
Yann Diorcet's avatar
Yann Diorcet committed
51 52

if BUILD_UPNP
Yann Diorcet's avatar
Yann Diorcet committed
53
liblinphone_la_SOURCES+=upnp.c upnp.h
Yann Diorcet's avatar
Yann Diorcet committed
54
endif
Simon Morlat's avatar
Simon Morlat committed
55
	
Simon Morlat's avatar
Simon Morlat committed
56 57 58 59 60 61 62 63 64 65
liblinphone_la_SOURCES+=	bellesip_sal/sal_address_impl.c \
				bellesip_sal/sal_impl.c \
				bellesip_sal/sal_op_impl.c \
				bellesip_sal/sal_op_call.c \
				bellesip_sal/sal_op_registration.c \
				bellesip_sal/sal_sdp.c  \
				bellesip_sal/sal_op_message.c \
				bellesip_sal/sal_op_presence.c \
				bellesip_sal/sal_op_publish.c \
				bellesip_sal/sal_op_call_transfer.c \
66 67
				bellesip_sal/sal_op_info.c \
				bellesip_sal/sal_op_events.c
68

69
if BUILD_WIZARD
jehan's avatar
jehan committed
70
liblinphone_la_SOURCES+=sipwizard.c 
71
endif
Guillaume Beraudo's avatar
Guillaume Beraudo committed
72

73
liblinphone_la_SOURCES+=linphone_tunnel_config.c
Guillaume Beraudo's avatar
Guillaume Beraudo committed
74
if BUILD_TUNNEL
75 76 77
liblinphone_la_SOURCES+=linphone_tunnel.cc TunnelManager.cc TunnelManager.hh 
else
liblinphone_la_SOURCES+=linphone_tunnel_stubs.c
Guillaume Beraudo's avatar
Guillaume Beraudo committed
78 79
endif

aymeric's avatar
aymeric committed
80 81


82
liblinphone_la_LDFLAGS= -version-info $(LIBLINPHONE_SO_VERSION) -no-undefined
aymeric's avatar
aymeric committed
83 84

liblinphone_la_LIBADD= \
jehan's avatar
jehan committed
85
		$(SIPSTACK_LIBS) \
86
		$(MEDIASTREAMER_LIBS) \
Guillaume Beraudo's avatar
Guillaume Beraudo committed
87
		$(ORTP_LIBS) $(OPENSSL_LIBS) \
Sylvain Berfini's avatar
Sylvain Berfini committed
88
		$(TUNNEL_LIBS) \
Margaux Clerc's avatar
Margaux Clerc committed
89
		$(LIBSOUP_LIBS) \
Ghislain MARY's avatar
Ghislain MARY committed
90 91
		$(SQLITE3_LIBS) \
		$(LIBXML2_LIBS) 
Margaux Clerc's avatar
Margaux Clerc committed
92

aymeric's avatar
aymeric committed
93

Simon Morlat's avatar
Simon Morlat committed
94
if ENABLE_TESTS
95
noinst_PROGRAMS=test_lsd test_ecc test_numbers
96 97 98

test_lsd_SOURCES=test_lsd.c

jehan's avatar
jehan committed
99
test_lsd_LDADD=liblinphone.la $(liblinphone_la_LIBADD)
aymeric's avatar
aymeric committed
100

Simon Morlat's avatar
Simon Morlat committed
101 102
test_ecc_SOURCES=test_ecc.c

jehan's avatar
jehan committed
103
test_ecc_LDADD=liblinphone.la $(liblinphone_la_LIBADD)
104 105 106 107

test_numbers_SOURCES=test_numbers.c

test_numbers_LDADD=liblinphone.la $(liblinphone_la_LIBADD)
jehan's avatar
jehan committed
108
endif
Simon Morlat's avatar
Simon Morlat committed
109

Yann Diorcet's avatar
Yann Diorcet committed
110
AM_CPPFLAGS=\
jehan's avatar
jehan committed
111
	-I$(top_srcdir) -I$(top_srcdir)/include
Simon Morlat's avatar
Simon Morlat committed
112

Yann Diorcet's avatar
Yann Diorcet committed
113 114
AM_CFLAGS=\
	$(STRICT_OPTIONS)  -DIN_LINPHONE \
Jehan Monnier's avatar
Jehan Monnier committed
115
	$(ORTP_CFLAGS) \
116
	$(MEDIASTREAMER_CFLAGS) \
jehan's avatar
jehan committed
117
	$(SIPSTACK_CFLAGS) \
Sylvain Berfini's avatar
Wizard  
Sylvain Berfini committed
118
	$(LIBSOUP_CFLAGS) \
aymeric's avatar
aymeric committed
119 120
	-DENABLE_TRACE 	\
	-DLOG_DOMAIN=\"LinphoneCore\" \
Guillaume Beraudo's avatar
Guillaume Beraudo committed
121 122 123
	$(IPV6_CFLAGS) \
	-DORTP_INET6 \
	$(VIDEO_CFLAGS) \
Margaux Clerc's avatar
Margaux Clerc committed
124
	$(TUNNEL_CFLAGS) \
Ghislain MARY's avatar
Ghislain MARY committed
125 126
	$(SQLITE3_CFLAGS) \
	$(LIBXML2_CFLAGS)
127 128 129 130

if BUILD_WIZARD
AM_CFLAGS+= -DBUILD_WIZARD 
endif
131

Ghislain MARY's avatar
Ghislain MARY committed
132
AM_CFLAGS+= -DUSE_BELLESIP
Simon Morlat's avatar
Simon Morlat committed
133 134

AM_CXXFLAGS=$(AM_CFLAGS)
135

136 137 138 139 140 141 142
make_gitversion_h:
	if test "$(GITDESCRIBE)" != "" ; then \
		$(ECHO) -n "#define LIBLINPHONE_GIT_VERSION \"$(GITDESCRIBE)\"" > $(GITVERSION_FILE_TMP) ; \
	elif test "$(GITREVISION)" != "" ; then \
		$(ECHO) -n "#define LIBLINPHONE_GIT_VERSION \"$(LINPHONE_VERSION)_$(GITREVISION)\"" > $(GITVERSION_FILE_TMP) ; \
	else \
		$(ECHO) -n "" > $(GITVERSION_FILE_TMP) ; \
143
	fi
144 145 146
	if test ! -f $(srcdir)/$(GITVERSION_FILE) ; then \
		cp -f $(GITVERSION_FILE_TMP) $(srcdir)/$(GITVERSION_FILE) ; \
	fi
147 148
	if test "`cat $(GITVERSION_FILE_TMP)`" != "`cat $(srcdir)/$(GITVERSION_FILE)`" ; then \
		cp -f $(GITVERSION_FILE_TMP) $(srcdir)/$(GITVERSION_FILE) ; \
149
	fi
150 151 152
	rm -f $(GITVERSION_FILE_TMP) ;

$(GITVERSION_FILE): make_gitversion_h