Statistics
| Branch: | Revision:

janus-gateway / Makefile.am @ ea61ba1b

History | View | Annotate | Download (6.24 KB)

1
# FIXME: These flags should be produced in configure.ac using AX_APPEND_COMPILE_FLAGS
2
AM_CFLAGS = \
3
	-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
4
	-Wunused -fstrict-aliasing -Wextra -Wformat=2 -Winit-self -Winline \
5
	-Wpacked -Wpointer-arith -Wmissing-format-attribute -Wmissing-noreturn \
6
	-Wnested-externs -Wstrict-prototypes -Wunsafe-loop-optimizations \
7
	-Wwrite-strings -Wno-missing-field-initializers -Wno-unused-parameter \
8
	-Wcast-align -Wformat-nonliteral -Wformat-security -Wswitch-default \
9
	-Wmissing-include-dirs -Waggregate-return -Wunused-but-set-variable \
10
	-Warray-bounds -Wold-style-definition -Wsign-compare -Wlarger-than=65537
11
AM_CFLAGS += -Wno-undef  # sophiasip is not -Wundef--safe
12
AM_CFLAGS += -Wredundant-decls  # sophiasip also contains redundant declarations
13
# FIXME: These should be enabled once the code is safe for them. That requires
14
# some fairly big refactoring though, which can wait.
15
# AM_CFLAGS += -Wshadow -Wstrict-aliasing=2
16

    
17
AM_CFLAGS += -fstack-protector-all -g -ggdb -rdynamic
18

    
19
# FIXME: make docs work with distcheck
20
DISTCHECK_CONFIGURE_FLAGS = --disable-docs --enable-post-processing
21

    
22
EXTRA_DIST = $(NULL)
23
CLEANFILES = $(NULL)
24

    
25
bin_PROGRAMS = janus
26

    
27
confdir = $(sysconfdir)/janus
28
conf_DATA = conf/janus.cfg
29

    
30
certdir = $(datadir)/janus/certs
31
cert_DATA = certs/mycert.key certs/mycert.pem
32

    
33
plugindir = $(libdir)/janus/plugins
34
plugin_LTLIBRARIES = $(NULL)
35

    
36
SUBDIRS = html
37
html_DATA = README.md
38

    
39
streamdir = $(datadir)/janus/streams
40
stream_DATA = $(NULL)
41

    
42
%.cfg: %.cfg.in
43
	$(MKDIR_P) $(@D)
44
	$(AM_V_GEN) sed -e "\
45
	    s|[@]confdir[@]|$(confdir)|;\
46
	    s|[@]certdir[@]|$(certdir)|;\
47
	    s|[@]plugindir[@]|$(plugindir)|;\
48
	    s|[@]streamdir[@]|$(streamdir)|" \
49
	$< > $@ || rm $@
50

    
51
EXTRA_DIST += conf/janus.cfg.in
52
CLEANFILES += conf/janus.cfg
53

    
54
##
55
# Janus
56
##
57

    
58
janus_SOURCES = \
59
	apierror.c \
60
	apierror.h \
61
	cmdline.c \
62
	cmdline.h \
63
	config.c \
64
	config.h \
65
	debug.h \
66
	dtls.c \
67
	dtls.h \
68
	ice.c \
69
	ice.h \
70
	janus.c \
71
	janus.h \
72
	mutex.h \
73
	record.c \
74
	record.h \
75
	rtcp.c \
76
	rtcp.h \
77
	rtp.h \
78
	sctp.c \
79
	sctp.h \
80
	sdp.c \
81
	sdp.h \
82
	utils.c \
83
	utils.h \
84
	plugins/plugin.c \
85
	plugins/plugin.h \
86
	$(NULL)
87

    
88
janus_CFLAGS = \
89
	$(AM_CFLAGS) \
90
	$(JANUS_CFLAGS) \
91
	-DPLUGINDIR=\"$(plugindir)\" \
92
	-DCONFDIR=\"$(confdir)\" \
93
	$(NULL)
94

    
95
janus_LDADD = \
96
	$(JANUS_LIBS) \
97
	$(JANUS_MANUAL_LIBS) \
98
	-lsrtp \
99
	$(NULL)
100

    
101
BUILT_SOURCES = cmdline.c
102

    
103
cmdline.c: janus.ggo
104
	gengetopt --set-package="janus" --set-version="$(VERSION)" < $^
105

    
106
EXTRA_DIST += janus.ggo
107
CLEANFILES += cmdline.c
108

    
109
##
110
# Plugins
111
##
112

    
113
plugins_cflags = \
114
	$(AM_CFLAGS) \
115
	$(PLUGINS_CFLAGS) \
116
	$(NULL)
117

    
118
plugins_libadd = \
119
	$(PLUGINS_LIBS) \
120
	$(NULL)
121

    
122
plugins_ldflags = \
123
	-export-dynamic \
124
	-no-undefined \
125
	-avoid-version \
126
	-module \
127
	$(NULL)
128

    
129
if ENABLE_PLUGIN_AUDIOBRIDGE
130
plugin_LTLIBRARIES += plugins/libjanus_audiobridge.la
131
plugins_libjanus_audiobridge_la_SOURCES = plugins/janus_audiobridge.c
132
plugins_libjanus_audiobridge_la_CFLAGS = $(plugins_cflags)
133
plugins_libjanus_audiobridge_la_LDFLAGS = $(plugins_ldflags)
134
plugins_libjanus_audiobridge_la_LIBADD = $(plugins_libadd)
135
conf_DATA += conf/janus.plugin.audiobridge.cfg
136
EXTRA_DIST += conf/janus.plugin.audiobridge.cfg
137
endif
138

    
139
if ENABLE_PLUGIN_ECHOTEST
140
plugin_LTLIBRARIES += plugins/libjanus_echotest.la
141
plugins_libjanus_echotest_la_SOURCES = plugins/janus_echotest.c
142
plugins_libjanus_echotest_la_CFLAGS = $(plugins_cflags)
143
plugins_libjanus_echotest_la_LDFLAGS = $(plugins_ldflags)
144
plugins_libjanus_echotest_la_LIBADD = $(plugins_libadd)
145
conf_DATA += conf/janus.plugin.echotest.cfg
146
EXTRA_DIST += conf/janus.plugin.echotest.cfg
147
endif
148

    
149
if ENABLE_PLUGIN_SIP
150
plugin_LTLIBRARIES += plugins/libjanus_sip.la
151
plugins_libjanus_sip_la_SOURCES = plugins/janus_sip.c
152
plugins_libjanus_sip_la_CFLAGS = $(plugins_cflags) $(PLUGIN_SIP_CFLAGS)
153
plugins_libjanus_sip_la_LDFLAGS = $(plugins_ldflags) $(PLUGIN_SIP_LDFLAGS)
154
plugins_libjanus_sip_la_LIBADD = $(plugins_libadd) $(PLUGIN_SIP_LIBADD)
155
conf_DATA += conf/janus.plugin.sip.cfg
156
EXTRA_DIST += conf/janus.plugin.sip.cfg
157
endif
158

    
159
if ENABLE_PLUGIN_STREAMING
160
plugin_LTLIBRARIES += plugins/libjanus_streaming.la
161
plugins_libjanus_streaming_la_SOURCES = plugins/janus_streaming.c
162
plugins_libjanus_streaming_la_CFLAGS = $(plugins_cflags)
163
plugins_libjanus_streaming_la_LDFLAGS = $(plugins_ldflags)
164
plugins_libjanus_streaming_la_LIBADD = $(plugins_libadd)
165
conf_DATA += conf/janus.plugin.streaming.cfg
166
stream_DATA += \
167
	plugins/streams/music.mulaw \
168
	plugins/streams/radio.alaw \
169
	plugins/streams/test_gstreamer.sh \
170
	plugins/streams/test_gstreamer_1.sh
171
EXTRA_DIST += \
172
	conf/janus.plugin.streaming.cfg.in \
173
	$(stream_DATA)
174
CLEANFILES += conf/janus.plugin.streaming.cfg
175
endif
176

    
177
if ENABLE_PLUGIN_VIDEOCALL
178
plugin_LTLIBRARIES += plugins/libjanus_videocall.la
179
plugins_libjanus_videocall_la_SOURCES = plugins/janus_videocall.c
180
plugins_libjanus_videocall_la_CFLAGS = $(plugins_cflags)
181
plugins_libjanus_videocall_la_LDFLAGS = $(plugins_ldflags)
182
plugins_libjanus_videocall_la_LIBADD = $(plugins_libadd)
183
conf_DATA += conf/janus.plugin.videocall.cfg
184
EXTRA_DIST += conf/janus.plugin.videocall.cfg
185
endif
186

    
187
if ENABLE_PLUGIN_VIDEOROOM
188
plugin_LTLIBRARIES += plugins/libjanus_videoroom.la
189
plugins_libjanus_videoroom_la_SOURCES = plugins/janus_videoroom.c
190
plugins_libjanus_videoroom_la_CFLAGS = $(plugins_cflags)
191
plugins_libjanus_videoroom_la_LDFLAGS = $(plugins_ldflags)
192
plugins_libjanus_videoroom_la_LIBADD = $(plugins_libadd)
193
conf_DATA += conf/janus.plugin.videoroom.cfg
194
EXTRA_DIST += conf/janus.plugin.videoroom.cfg
195
endif
196

    
197
if ENABLE_PLUGIN_VOICEMAIL
198
plugin_LTLIBRARIES += plugins/libjanus_voicemail.la
199
plugins_libjanus_voicemail_la_SOURCES = plugins/janus_voicemail.c
200
plugins_libjanus_voicemail_la_CFLAGS = $(plugins_cflags)
201
plugins_libjanus_voicemail_la_LDFLAGS = $(plugins_ldflags)
202
plugins_libjanus_voicemail_la_LIBADD = $(plugins_libadd)
203
conf_DATA += conf/janus.plugin.voicemail.cfg
204
EXTRA_DIST += conf/janus.plugin.voicemail.cfg
205
endif
206

    
207
##
208
# Post-processing
209
##
210

    
211
if ENABLE_POST_PROCESSING
212
bin_PROGRAMS += janus-pp-rec
213

    
214
janus_pp_rec_SOURCES = \
215
	postprocessing/pp-opus.c \
216
	postprocessing/pp-opus.h \
217
	postprocessing/pp-rtp.h \
218
	postprocessing/pp-webm.c \
219
	postprocessing/pp-webm.h \
220
	postprocessing/janus-pp-rec.c \
221
	$(NULL)
222

    
223
janus_pp_rec_CFLAGS = \
224
	$(AM_CFLAGS) \
225
	$(POST_PROCESSING_CFLAGS) \
226
	$(NULL)
227

    
228
janus_pp_rec_LDADD = \
229
	$(POST_PROCESSING_LIBS) \
230
	$(NULL)
231
endif
232

    
233
##
234
# Docs
235
##
236

    
237
if ENABLE_DOCS
238
SUBDIRS += docs
239
endif