|
| 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 | +plugindir = $(libdir)/janus/plugins |
| 31 | +plugin_LTLIBRARIES = $(NULL) |
| 32 | + |
| 33 | +streamdir = $(datadir)/janus/streams |
| 34 | +stream_DATA = $(NULL) |
| 35 | + |
| 36 | +%.cfg: %.cfg.in |
| 37 | + $(MKDIR_P) $(@D) |
| 38 | + $(AM_V_GEN) sed -e "s|[@]confdir[@]|$(confdir)|;s|[@]plugindir[@]|$(plugindir)|;s|[@]streamdir[@]|$(streamdir)|" \ |
| 39 | + $< > $@ || rm $@ |
| 40 | + |
| 41 | +EXTRA_DIST += conf/janus.cfg.in |
| 42 | +CLEANFILES += conf/janus.cfg |
| 43 | + |
| 44 | +## |
| 45 | +# Janus |
| 46 | +## |
| 47 | + |
| 48 | +janus_SOURCES = \ |
| 49 | + apierror.c \ |
| 50 | + apierror.h \ |
| 51 | + cmdline.c \ |
| 52 | + cmdline.h \ |
| 53 | + config.c \ |
| 54 | + config.h \ |
| 55 | + debug.h \ |
| 56 | + dtls.c \ |
| 57 | + dtls.h \ |
| 58 | + ice.c \ |
| 59 | + ice.h \ |
| 60 | + janus.c \ |
| 61 | + janus.h \ |
| 62 | + mutex.h \ |
| 63 | + record.c \ |
| 64 | + record.h \ |
| 65 | + rtcp.c \ |
| 66 | + rtcp.h \ |
| 67 | + rtp.h \ |
| 68 | + sctp.c \ |
| 69 | + sctp.h \ |
| 70 | + sdp.c \ |
| 71 | + sdp.h \ |
| 72 | + utils.c \ |
| 73 | + utils.h \ |
| 74 | + plugins/plugin.c \ |
| 75 | + plugins/plugin.h \ |
| 76 | + $(NULL) |
| 77 | + |
| 78 | +janus_CFLAGS = \ |
| 79 | + $(AM_CFLAGS) \ |
| 80 | + $(JANUS_CFLAGS) \ |
| 81 | + -DPLUGINDIR=\"$(plugindir)\" \ |
| 82 | + -DCONFDIR=\"$(confdir)\" \ |
| 83 | + $(NULL) |
| 84 | + |
| 85 | +janus_LDADD = \ |
| 86 | + $(JANUS_LIBS) \ |
| 87 | + $(JANUS_MANUAL_LIBS) \ |
| 88 | + -lsrtp \ |
| 89 | + $(NULL) |
| 90 | + |
| 91 | +BUILT_SOURCES = cmdline.c |
| 92 | + |
| 93 | +cmdline.c: janus.ggo |
| 94 | + gengetopt --set-package="janus" --set-version="$(VERSION)" < $^ |
| 95 | + |
| 96 | +EXTRA_DIST += janus.ggo certs/mycert.key certs/mycert.pem |
| 97 | +CLEANFILES += cmdline.c |
| 98 | + |
| 99 | +## |
| 100 | +# Plugins |
| 101 | +## |
| 102 | + |
| 103 | +plugins_cflags = \ |
| 104 | + $(AM_CFLAGS) \ |
| 105 | + $(PLUGINS_CFLAGS) \ |
| 106 | + $(NULL) |
| 107 | + |
| 108 | +plugins_libadd = \ |
| 109 | + $(PLUGINS_LIBS) \ |
| 110 | + $(NULL) |
| 111 | + |
| 112 | +plugins_ldflags = \ |
| 113 | + -export-dynamic \ |
| 114 | + -no-undefined \ |
| 115 | + -avoid-version \ |
| 116 | + -module \ |
| 117 | + $(NULL) |
| 118 | + |
| 119 | +if ENABLE_PLUGIN_AUDIOBRIDGE |
| 120 | +plugin_LTLIBRARIES += plugins/libjanus_audiobridge.la |
| 121 | +plugins_libjanus_audiobridge_la_SOURCES = plugins/janus_audiobridge.c |
| 122 | +plugins_libjanus_audiobridge_la_CFLAGS = $(plugins_cflags) |
| 123 | +plugins_libjanus_audiobridge_la_LDFLAGS = $(plugins_ldflags) |
| 124 | +plugins_libjanus_audiobridge_la_LIBADD = $(plugins_libadd) |
| 125 | +conf_DATA += conf/janus.plugin.audiobridge.cfg |
| 126 | +EXTRA_DIST += conf/janus.plugin.audiobridge.cfg |
| 127 | +endif |
| 128 | + |
| 129 | +if ENABLE_PLUGIN_ECHOTEST |
| 130 | +plugin_LTLIBRARIES += plugins/libjanus_echotest.la |
| 131 | +plugins_libjanus_echotest_la_SOURCES = plugins/janus_echotest.c |
| 132 | +plugins_libjanus_echotest_la_CFLAGS = $(plugins_cflags) |
| 133 | +plugins_libjanus_echotest_la_LDFLAGS = $(plugins_ldflags) |
| 134 | +plugins_libjanus_echotest_la_LIBADD = $(plugins_libadd) |
| 135 | +conf_DATA += conf/janus.plugin.echotest.cfg |
| 136 | +EXTRA_DIST += conf/janus.plugin.echotest.cfg |
| 137 | +endif |
| 138 | + |
| 139 | +if ENABLE_PLUGIN_SIP |
| 140 | +plugin_LTLIBRARIES += plugins/libjanus_sip.la |
| 141 | +plugins_libjanus_sip_la_SOURCES = plugins/janus_sip.c |
| 142 | +plugins_libjanus_sip_la_CFLAGS = $(plugins_cflags) $(PLUGIN_SIP_CFLAGS) |
| 143 | +plugins_libjanus_sip_la_LDFLAGS = $(plugins_ldflags) $(PLUGIN_SIP_LDFLAGS) |
| 144 | +plugins_libjanus_sip_la_LIBADD = $(plugins_libadd) $(PLUGIN_SIP_LIBADD) |
| 145 | +conf_DATA += conf/janus.plugin.sip.cfg |
| 146 | +EXTRA_DIST += conf/janus.plugin.sip.cfg |
| 147 | +endif |
| 148 | + |
| 149 | +if ENABLE_PLUGIN_STREAMING |
| 150 | +plugin_LTLIBRARIES += plugins/libjanus_streaming.la |
| 151 | +plugins_libjanus_streaming_la_SOURCES = plugins/janus_streaming.c |
| 152 | +plugins_libjanus_streaming_la_CFLAGS = $(plugins_cflags) |
| 153 | +plugins_libjanus_streaming_la_LDFLAGS = $(plugins_ldflags) |
| 154 | +plugins_libjanus_streaming_la_LIBADD = $(plugins_libadd) |
| 155 | +conf_DATA += conf/janus.plugin.streaming.cfg |
| 156 | +stream_DATA += \ |
| 157 | + plugins/streams/music.mulaw \ |
| 158 | + plugins/streams/radio.alaw |
| 159 | +EXTRA_DIST += \ |
| 160 | + conf/janus.plugin.streaming.cfg.in \ |
| 161 | + $(stream_DATA) |
| 162 | +CLEANFILES += conf/janus.plugin.streaming.cfg |
| 163 | +endif |
| 164 | + |
| 165 | +if ENABLE_PLUGIN_VIDEOCALL |
| 166 | +plugin_LTLIBRARIES += plugins/libjanus_videocall.la |
| 167 | +plugins_libjanus_videocall_la_SOURCES = plugins/janus_videocall.c |
| 168 | +plugins_libjanus_videocall_la_CFLAGS = $(plugins_cflags) |
| 169 | +plugins_libjanus_videocall_la_LDFLAGS = $(plugins_ldflags) |
| 170 | +plugins_libjanus_videocall_la_LIBADD = $(plugins_libadd) |
| 171 | +conf_DATA += conf/janus.plugin.videocall.cfg |
| 172 | +EXTRA_DIST += conf/janus.plugin.videocall.cfg |
| 173 | +endif |
| 174 | + |
| 175 | +if ENABLE_PLUGIN_VIDEOROOM |
| 176 | +plugin_LTLIBRARIES += plugins/libjanus_videoroom.la |
| 177 | +plugins_libjanus_videoroom_la_SOURCES = plugins/janus_videoroom.c |
| 178 | +plugins_libjanus_videoroom_la_CFLAGS = $(plugins_cflags) |
| 179 | +plugins_libjanus_videoroom_la_LDFLAGS = $(plugins_ldflags) |
| 180 | +plugins_libjanus_videoroom_la_LIBADD = $(plugins_libadd) |
| 181 | +conf_DATA += conf/janus.plugin.videoroom.cfg |
| 182 | +EXTRA_DIST += conf/janus.plugin.videoroom.cfg |
| 183 | +endif |
| 184 | + |
| 185 | +if ENABLE_PLUGIN_VOICEMAIL |
| 186 | +plugin_LTLIBRARIES += plugins/libjanus_voicemail.la |
| 187 | +plugins_libjanus_voicemail_la_SOURCES = plugins/janus_voicemail.c |
| 188 | +plugins_libjanus_voicemail_la_CFLAGS = $(plugins_cflags) |
| 189 | +plugins_libjanus_voicemail_la_LDFLAGS = $(plugins_ldflags) |
| 190 | +plugins_libjanus_voicemail_la_LIBADD = $(plugins_libadd) |
| 191 | +conf_DATA += conf/janus.plugin.voicemail.cfg |
| 192 | +EXTRA_DIST += conf/janus.plugin.voicemail.cfg |
| 193 | +endif |
| 194 | + |
| 195 | +## |
| 196 | +# Post-processing |
| 197 | +## |
| 198 | + |
| 199 | +if ENABLE_POST_PROCESSING |
| 200 | +bin_PROGRAMS += janus-pp-rec |
| 201 | + |
| 202 | +janus_pp_rec_SOURCES = \ |
| 203 | + postprocessing/pp-opus.c \ |
| 204 | + postprocessing/pp-opus.h \ |
| 205 | + postprocessing/pp-rtp.h \ |
| 206 | + postprocessing/pp-webm.c \ |
| 207 | + postprocessing/pp-webm.h \ |
| 208 | + postprocessing/janus-pp-rec.c \ |
| 209 | + $(NULL) |
| 210 | + |
| 211 | +janus_pp_rec_CFLAGS = \ |
| 212 | + $(AM_CFLAGS) \ |
| 213 | + $(POST_PROCESSING_CFLAGS) \ |
| 214 | + $(NULL) |
| 215 | + |
| 216 | +janus_pp_rec_LDADD = \ |
| 217 | + $(POST_PROCESSING_LIBS) \ |
| 218 | + $(NULL) |
| 219 | +endif |
| 220 | + |
| 221 | +## |
| 222 | +# Docs |
| 223 | +## |
| 224 | + |
| 225 | +if ENABLE_DOCS |
| 226 | +SUBDIRS = docs |
| 227 | +endif |
0 commit comments