Makefile.am 14.6 KB
Newer Older
1 2
GITVERSION_FILE=gitversion.h
GITVERSION_FILE_TMP=gitversion.h.tmp
aymeric's avatar
aymeric committed
3

Guillaume BIENKOWSKI's avatar
Guillaume BIENKOWSKI committed
4
## This command is used to check if the sources are cloned in a git repo.
5
## We can't only depend on the presence of the .git/ directory anymore,
Guillaume BIENKOWSKI's avatar
Guillaume BIENKOWSKI committed
6
## because of gits submodule handling.
7
## We now simply issue a git log on configure.ac and if the output is empty (error or file not tracked), then we are not in git.
8
GITLOG=`cd "$(top_srcdir)" && git log -1 --pretty=format:%H configure.ac`
Guillaume BIENKOWSKI's avatar
Guillaume BIENKOWSKI committed
9

10
ECHO=/bin/echo
11

12
ANDROID_SRC_FILES= \
13 14 15 16
	android/AudioRecord.cpp android/AudioRecord.h \
	android/AudioSystem.cpp android/AudioSystem.h \
	android/AudioTrack.cpp android/AudioTrack.h \
	android/String8.cpp android/String8.h \
17
	android/hardware_echo_canceller.cpp android/hardware_echo_canceller.h \
18
	android/androidsound.cpp \
Ghislain MARY's avatar
Ghislain MARY committed
19
	android/androidsound_depr.cpp \
20
	android/androidvideo.cpp \
Ghislain MARY's avatar
Ghislain MARY committed
21 22
	android/android-display.c \
	android/android-display-bad.cpp \
23 24
	android/android-opengl-display.c \
	android/audio.h \
25
	android/loader.cpp android/loader.h \
26 27 28 29
	android/mediacodech264dec.c \
   	android/mediacodech264enc.c \
   	android/android_mediacodec.cpp \
   	android/android_mediacodec.h \
30
	audiofilters/aac-eld-android.cpp
Ghislain MARY's avatar
Ghislain MARY committed
31 32 33

EXTRA_DIST= audiofilters/winsnd2.c audiofilters/winsnd.c videofilters/winvideo.c  \
	videofilters/winvideods.c videofilters/wincevideods.c dxfilter.h dxfilter.cpp \
Simon Morlat's avatar
Simon Morlat committed
34
	audiofilters/winsndds.cpp videofilters/msdscap.cc \
Ghislain MARY's avatar
Ghislain MARY committed
35 36
	voip/nowebcamCIF.jpg audiofilters/winsnd3.c utils/vfw-missing.h \
	videofilters/winvideo2.c utils/msjava.c $(ANDROID_SRC_FILES) \
37
	$(GITVERSION_FILE) yuv2rgb.fs yuv2rgb.vs libsrtp.map
aymeric's avatar
aymeric committed
38

39
BUILT_SOURCES=basedescs.h $(GITVERSION_FILE) yuv2rgb.fs.h yuv2rgb.vs.h
aymeric's avatar
aymeric committed
40

41
CLEANFILES=basedescs.h voipdescs.h basedescs.txt voipdescs.txt $(GITVERSION_FILE) yuv2rgb.fs.h yuv2rgb.vs.h
aymeric's avatar
aymeric committed
42

43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
libmediastreamer_voip_la_LIBADD=	libmediastreamer_base.la \
					$(ORTP_LIBS) \
					$(VP8_LIBS) \
					$(PORTAUDIO_LIBS) \
					$(ALSA_LIBS) \
					$(QSA_LIBS) \
					$(ARTS_LIBS) \
					$(LIBPULSE_LIBS) \
					$(SPEEX_LIBS) \
					$(GSM_LIBS) \
					$(LIBV4L1_LIBS) \
					$(LIBV4L2_LIBS) \
					$(LIBV4LCONVERT_LIBS) \
					$(SPANDSP_LIBS) \
					$(PCAP_LIBS) \
58
					$(OPUS_LIBS) \
59
					$(SRTP_LIBS) \
60
					$(BCTOOLBOX_LIBS)
61 62


63 64 65 66
if LIBBZRTP
libmediastreamer_voip_la_LIBADD+=$(LIBBZRTP_LIB)
endif

67 68 69 70 71
lib_LTLIBRARIES=libmediastreamer_base.la
if BUILD_VOIP_LIBRARY
lib_LTLIBRARIES+=libmediastreamer_voip.la
endif

Ghislain MARY's avatar
Ghislain MARY committed
72
libmediastreamer_base_la_SOURCES=	base/mscommon.c \
73
					$(GITVERSION_FILE) \
Ghislain MARY's avatar
Ghislain MARY committed
74 75 76 77 78
					base/msfilter.c \
					base/msqueue.c \
					base/msticker.c \
					base/eventqueue.c \
					base/mssndcard.c \
Simon Morlat's avatar
Simon Morlat committed
79
					base/msfactory.c \
Ghislain MARY's avatar
Ghislain MARY committed
80 81
					otherfilters/tee.c \
					otherfilters/join.c \
82
					base/msvideopresets.c \
Ghislain MARY's avatar
Ghislain MARY committed
83 84
					base/mswebcam.c \
					base/mtu.c \
85
					base/msasync.c \
Ghislain MARY's avatar
Ghislain MARY committed
86 87
					otherfilters/void.c \
					otherfilters/itc.c
88
libmediastreamer_voip_la_SOURCES=
aymeric's avatar
aymeric committed
89

Simon Morlat's avatar
Simon Morlat committed
90
#dummy c++ file to force libtool to use c++ linking
91
nodist_EXTRA_libmediastreamer_base_la_SOURCES = dummy.cxx
aymeric's avatar
aymeric committed
92 93


94 95 96 97
if ENABLE_PCAP
libmediastreamer_voip_la_SOURCES += otherfilters/mspcapfileplayer.c
endif

98
if ORTP_ENABLED
99
BUILT_SOURCES+=voipdescs.h
Ghislain MARY's avatar
Ghislain MARY committed
100 101 102 103 104
libmediastreamer_voip_la_SOURCES+=	voip/private.h \
					voip/msvoip.c \
					voip/mediastream.c \
					voip/audiostream.c \
					voip/ringstream.c \
105
					voip/rfc4103_textstream.c \
106 107
					otherfilters/rfc4103_source.c \
					otherfilters/rfc4103_sink.c \
108
					voip/msmediaplayer.c \
Ghislain MARY's avatar
Ghislain MARY committed
109 110
					voip/ice.c \
					otherfilters/msrtp.c \
111
					otherfilters/msudp.c \
Ghislain MARY's avatar
Ghislain MARY committed
112 113 114
					voip/qualityindicator.c \
					voip/audioconference.c \
					voip/bitratedriver.c \
115
					voip/qosanalyzer.c voip/qosanalyzer.h \
116
					voip/bitratecontrol.c \
117
					voip/bandwidthcontroller.c \
118
					crypto/zrtp.c \
jehan's avatar
jehan committed
119
					voip/stun.c \
120
					crypto/ms_srtp.c \
121
					crypto/dtls_srtp.c \
122 123
					voip/msiframerequestslimiter.c \
					utils/pcap_sender.c utils/pcap_sender.h
124
else
125
libmediastreamer_base_la_SOURCES+=	ortp-deps/logging.c \
126 127
					ortp-deps/port.c \
					ortp-deps/str_utils.c
128 129 130 131
if MS2_FILTERS
libmediastreamer_base_la_SOURCES+=	ortp-deps/b64.c \
					ortp-deps/payloadtype.c
endif
132
endif
133

134
if MS2_FILTERS
Ghislain MARY's avatar
Ghislain MARY committed
135 136 137
libmediastreamer_voip_la_SOURCES+=	audiofilters/alaw.c \
					audiofilters/ulaw.c \
					audiofilters/dtmfgen.c \
Margaux Clerc's avatar
Margaux Clerc committed
138
					audiofilters/g711.c audiofilters/g711.h \
Ghislain MARY's avatar
Ghislain MARY committed
139 140 141 142 143 144 145
					audiofilters/msvolume.c \
					utils/dsptools.c \
					utils/kiss_fft.c \
					utils/_kiss_fft_guts.h \
					utils/kiss_fft.h \
					utils/kiss_fftr.c \
					utils/kiss_fftr.h \
146
					utils/audiodiff.c \
Ghislain MARY's avatar
Ghislain MARY committed
147 148 149 150
					audiofilters/equalizer.c \
					audiofilters/chanadapt.c \
					audiofilters/audiomixer.c \
					audiofilters/tonedetector.c \
151
					audiofilters/devices.c \
Ghislain MARY's avatar
Ghislain MARY committed
152 153 154 155 156
					utils/g722.h \
					utils/g722_decode.c \
					utils/g722_encode.c \
					audiofilters/msg722.c \
					audiofilters/l16.c \
johan's avatar
johan committed
157
					audiofilters/genericplc.h \
158
					audiofilters/genericplc.c \
johan's avatar
johan committed
159
					audiofilters/msgenericplc.c \
160 161
					audiofilters/msfileplayer.c \
					audiofilters/msfilerec.c \
162 163
					audiofilters/asyncrw.c \
					audiofilters/asyncrw.h \
164
					audiofilters/waveheader.h \
165 166
					audiofilters/flowcontrol.c \
					audiofilters/msvaddtx.c
167

168
if BUILD_SPEEX
Ghislain MARY's avatar
Ghislain MARY committed
169
libmediastreamer_voip_la_SOURCES+=	audiofilters/msspeex.c audiofilters/speexec.c
170 171 172
endif

if BUILD_GSM
Ghislain MARY's avatar
Ghislain MARY committed
173
libmediastreamer_voip_la_SOURCES+=	audiofilters/gsm.c
174 175
endif

176
if BUILD_G726
Ghislain MARY's avatar
Ghislain MARY committed
177
libmediastreamer_voip_la_SOURCES+=	audiofilters/g726.c
178 179
endif

180 181 182 183
if BUILD_G729
libmediastreamer_voip_la_SOURCES+=	audiofilters/g729.c
endif

Ghislain MARY's avatar
Ghislain MARY committed
184 185 186 187
if BUILD_OPUS
libmediastreamer_voip_la_SOURCES+=	audiofilters/msopus.c
endif

188
if BUILD_WIN32
189
libmediastreamer_voip_la_SOURCES+=	audiofilters/winsnd3.c
190 191
endif

aymeric's avatar
aymeric committed
192
if BUILD_RESAMPLE
Ghislain MARY's avatar
Ghislain MARY committed
193
libmediastreamer_voip_la_SOURCES+=	audiofilters/msresample.c
aymeric's avatar
aymeric committed
194 195 196
endif

if BUILD_ALSA
Ghislain MARY's avatar
Ghislain MARY committed
197
libmediastreamer_voip_la_SOURCES+=	audiofilters/alsa.c
aymeric's avatar
aymeric committed
198 199
endif

200 201 202 203
if BUILD_QSA
libmediastreamer_voip_la_SOURCES+=	audiofilters/qsa.c
endif

aymeric's avatar
aymeric committed
204
if BUILD_OSS
Ghislain MARY's avatar
Ghislain MARY committed
205
libmediastreamer_voip_la_SOURCES+=	audiofilters/oss.c
aymeric's avatar
aymeric committed
206 207 208
endif

if BUILD_ARTS
Ghislain MARY's avatar
Ghislain MARY committed
209
libmediastreamer_voip_la_SOURCES+=	audiofilters/arts.c
aymeric's avatar
aymeric committed
210 211 212
endif

if BUILD_PORTAUDIO
Ghislain MARY's avatar
Ghislain MARY committed
213
libmediastreamer_voip_la_SOURCES+=	audiofilters/pasnd.c
aymeric's avatar
aymeric committed
214 215 216
endif

if BUILD_MACSND
Ghislain MARY's avatar
Ghislain MARY committed
217
libmediastreamer_voip_la_SOURCES+=	audiofilters/macsnd.c
aymeric's avatar
aymeric committed
218 219
endif

jehan's avatar
jehan committed
220
if BUILD_IOSIOUNIT
Ghislain MARY's avatar
Ghislain MARY committed
221
libmediastreamer_voip_la_SOURCES+=	audiofilters/msiounit.m
johan's avatar
johan committed
222
libmediastreamer_voip_la_SOURCES+=	audiofilters/aac-eld.c
223 224
endif

aymeric's avatar
aymeric committed
225
if BUILD_MACAQSND
226
libmediastreamer_voip_la_SOURCES+=	audiofilters/aqsnd.m
aymeric's avatar
aymeric committed
227 228
endif

229
if BUILD_PULSEAUDIO
Ghislain MARY's avatar
Ghislain MARY committed
230
libmediastreamer_voip_la_SOURCES+=	audiofilters/pulseaudio.c
231 232
endif

233 234
libmediastreamer_voip_la_LIBTOOLFLAGS= --tag=CC

aymeric's avatar
aymeric committed
235 236
if BUILD_VIDEO

Ronan's avatar
Ronan committed
237
GLDISPLAY_FILES = utils/opengl_functions.c utils/opengl_functions.h utils/shader_util.c utils/shader_util.h utils/opengl_debug.h utils/opengles_display.c utils/opengles_display.h
Simon Morlat's avatar
Simon Morlat committed
238

aymeric's avatar
aymeric committed
239
if BUILD_MACOSX
240
libmediastreamer_voip_la_SOURCES+=	videofilters/videotoolbox.c
241 242 243 244

noinst_LTLIBRARIES=libqtcapture_cocoa.la
libqtcapture_cocoa_la_LIBTOOLFLAGS= --tag=CC
libqtcapture_cocoa_la_SOURCES = videofilters/qtcapture.m \
Ghislain MARY's avatar
Ghislain MARY committed
245
					videofilters/msosxdisplay.m \
Simon Morlat's avatar
Simon Morlat committed
246
					$(GLDISPLAY_FILES)
247 248

libmediastreamer_voip_la_LIBADD+=libqtcapture_cocoa.la
249
nodist_libmediastreamer_voip_la_SOURCES = yuv2rgb.fs.h yuv2rgb.fs.h
250 251
endif

252
if BUILD_V4L1
Ghislain MARY's avatar
Ghislain MARY committed
253
libmediastreamer_voip_la_SOURCES+=	videofilters/msv4l.c
254 255 256
endif

if BUILD_V4L2
Ghislain MARY's avatar
Ghislain MARY committed
257
libmediastreamer_voip_la_SOURCES+=	videofilters/msv4l2.c
aymeric's avatar
aymeric committed
258 259
endif

260
if BUILD_WIN32
Simon Morlat's avatar
Simon Morlat committed
261
libmediastreamer_voip_la_SOURCES+=	videofilters/drawdib-display.c
262 263 264
endif

if BUILD_THEORA
Ghislain MARY's avatar
Ghislain MARY committed
265
libmediastreamer_voip_la_SOURCES+=	videofilters/theora.c
266 267
endif

268
if BUILD_VP8
Ghislain MARY's avatar
Ghislain MARY committed
269
libmediastreamer_voip_la_SOURCES+=	videofilters/vp8.c
270 271
endif

272
if BUILD_MATROSKA
273
libmediastreamer_voip_la_SOURCES+=	videofilters/mkv.c \
Simon Morlat's avatar
Simon Morlat committed
274
					utils/mkv_reader.c utils/mkv_reader.h
275 276
endif

277
if BUILD_AVCODEC
Ghislain MARY's avatar
Ghislain MARY committed
278 279
libmediastreamer_voip_la_SOURCES+=	videofilters/videoenc.c \
					videofilters/videodec.c \
280 281 282
					utils/swscale.h \
					utils/ffmpeg-priv.h \
					utils/ffmpeg-priv.c \
Ghislain MARY's avatar
Ghislain MARY committed
283
					videofilters/h264dec.c \
284
					videofilters/ffmpegjpegwriter.c
285 286
endif

Simon Morlat's avatar
Simon Morlat committed
287
if BUILD_SDL
288
libmediastreamer_voip_la_SOURCES+=	videofilters/videoout.c
Simon Morlat's avatar
Simon Morlat committed
289 290 291
endif

if BUILD_X11_XV
Ghislain MARY's avatar
Ghislain MARY committed
292
libmediastreamer_voip_la_SOURCES+=	videofilters/x11video.c
Simon Morlat's avatar
Simon Morlat committed
293 294
endif

295
if BUILD_X11_GL
Simon Morlat's avatar
Simon Morlat committed
296
libmediastreamer_voip_la_SOURCES+=	videofilters/glxvideo.c $(GLDISPLAY_FILES)
297 298
endif

Ghislain MARY's avatar
Ghislain MARY committed
299 300 301 302 303 304 305
libmediastreamer_voip_la_SOURCES+=	voip/rfc2429.h \
					videofilters/pixconv.c  \
					videofilters/sizeconv.c \
					voip/msvideo.c \
					voip/msvideo_neon.c \
					voip/msvideo_neon.h \
					voip/rfc3984.c \
Ghislain MARY's avatar
Ghislain MARY committed
306
					voip/videostarter.c \
307 308
					voip/vp8rtpfmt.c \
					voip/vp8rtpfmt.h \
Ghislain MARY's avatar
Ghislain MARY committed
309
					videofilters/mire.c \
Erwan Croze's avatar
Erwan Croze committed
310
					videofilters/nowebcam.c videofilters/ffmpegnowebcam.c voip/nowebcam.h \
Ghislain MARY's avatar
Ghislain MARY committed
311
					videofilters/extdisplay.c \
312
					utils/bits_rw.c \
313
					utils/x11_helper.c \
314
					utils/stream_regulator.c utils/stream_regulator.h \
315
					utils/h264utils.c utils/h264utils.h \
316 317
					voip/layouts.c voip/layouts.h \
					voip/video_preset_high_fps.c
aymeric's avatar
aymeric committed
318

319
if ORTP_ENABLED
Ghislain MARY's avatar
Ghislain MARY committed
320
libmediastreamer_voip_la_SOURCES+=	voip/videostream.c
321
endif
aymeric's avatar
aymeric committed
322

323
endif BUILD_VIDEO
aymeric's avatar
aymeric committed
324

325
endif MS2_FILTERS
aymeric's avatar
aymeric committed
326

327
if BUILD_UPNP
328
libmediastreamer_voip_la_SOURCES+=	upnp/upnp_igd.c \
329
					upnp/upnp_igd_private.h \
330 331 332 333
					upnp/upnp_igd_cmd.c \
					upnp/upnp_igd_utils.c \
					upnp/upnp_igd_utils.h
endif
aymeric's avatar
aymeric committed
334

335
basedescs.h:	Makefile $(libmediastreamer_base_la_SOURCES)
336 337 338 339
	cd $(srcdir) && \
	awk 'BEGIN { FS="[()]" ; }; /^\t*MS_FILTER_DESC_EXPORT/{ printf("%s\n", $$2) } '  > $(abs_builddir)/basedescs.txt $(libmediastreamer_base_la_SOURCES) && \
	awk 'BEGIN { print("#include \"mediastreamer2/msfilter.h\"\n") } { printf("extern MSFilterDesc %s;\n",$$1) } ' $(abs_builddir)/basedescs.txt > $(abs_builddir)/$@ && \
	awk 'BEGIN { print("MSFilterDesc * ms_base_filter_descs[]={") } { printf("&%s,\n",$$1) } END{ print("NULL\n};\n") } ' $(abs_builddir)/basedescs.txt >> $(abs_builddir)/$@
340

341
voipdescs.h:	Makefile $(libmediastreamer_voip_la_SOURCES) $(libqtcapture_cocoa_la_SOURCES)
342
	cd $(srcdir) && \
343
	awk 'BEGIN { FS="[()]" ; }; /^\t*MS_FILTER_DESC_EXPORT/{ printf("%s\n", $$2) } '  > $(abs_builddir)/voipdescs.txt $(libmediastreamer_voip_la_SOURCES) $(libqtcapture_cocoa_la_SOURCES) && \
344 345
	awk 'BEGIN { print("#include \"mediastreamer2/msfilter.h\"\n") } { printf("extern MSFilterDesc %s;\n",$$1) } ' $(abs_builddir)/voipdescs.txt > $(abs_builddir)/$@ && \
	awk 'BEGIN { print("MSFilterDesc * ms_voip_filter_descs[]={") } { printf("&%s,\n",$$1) } END{ print("NULL\n};\n") } ' $(abs_builddir)/voipdescs.txt >> $(abs_builddir)/$@
aymeric's avatar
aymeric committed
346 347


348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369
libmediastreamer_base_la_LIBADD = $(ORTP_LIBS)
libmediastreamer_base_la_LDFLAGS = -no-undefined -version-info $(LIBMEDIASTREAMER_SO_VERSION)
libmediastreamer_voip_la_LDFLAGS = -no-undefined -version-info $(LIBMEDIASTREAMER_SO_VERSION)

if HAVE_LD_OUTPUT_DEF
libmediastreamer_base_la_LDFLAGS += -Wl,--output-def,libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).def
libmediastreamer_voip_la_LDFLAGS += -Wl,--output-def,libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).def
defexecdir = $(libdir)
defexec_DATA = libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).def libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).def
CLEANFILES += $(defexec_DATA)

libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).def: libmediastreamer_base.la
libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).def: libmediastreamer_voip.la

if BUILD_WIN32
defexec_DATA += libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).lib libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).lib
libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).lib: libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).def libmediastreamer_base.la
	$(DLLTOOL) --dllname libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).dll --input-def libmediastreamer_base-$(LIBMEDIASTREAMER_SO_CURRENT).def --output-lib $@ libmediastreamer_base.la
libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).lib: libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).def libmediastreamer_voip.la
	$(DLLTOOL) --dllname libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).dll --input-def libmediastreamer_voip-$(LIBMEDIASTREAMER_SO_CURRENT).def --output-lib $@ libmediastreamer_voip.la
endif
endif
Simon Morlat's avatar
Simon Morlat committed
370

371
if !BUILD_WIN32
372
libmediastreamer_base_la_LDFLAGS+=-rdynamic
373
endif
aymeric's avatar
aymeric committed
374

375
if BUILD_WIN32
376
libmediastreamer_base_la_LIBADD+=	-lole32 \
377 378 379
									-loleaut32\
									-lwinmm \
									-luuid
aymeric's avatar
aymeric committed
380
endif
381

Jehan Monnier's avatar
Jehan Monnier committed
382
if BUILD_WIN32_WCE
383
libmediastreamer_base_la_LIBADD+=	-lmmtimer
Jehan Monnier's avatar
Jehan Monnier committed
384
endif
aymeric's avatar
aymeric committed
385

jehan's avatar
jehan committed
386
#put ORTP_CFLAGS in AM_CPPFLAGS so that inner oRTP submodules is taken in priority rather than installed one, but after MS2 include path to avoid same issue for MS2
Yann Diorcet's avatar
Yann Diorcet committed
387
AM_CPPFLAGS=\
Ghislain MARY's avatar
Ghislain MARY committed
388
	-I$(top_srcdir)/include/ \
389 390 391 392 393
	-I$(top_srcdir)/src/base \
	-I$(top_srcdir)/src/utils \
	-I$(top_srcdir)/src/voip \
	-I$(top_srcdir)/src/audiofilters \
	-I$(top_srcdir)/src/otherfilters \
394
	-I$(top_srcdir)/src/videofilters \
395
	$(ORTP_CFLAGS)
jehan's avatar
jehan committed
396

Yann Diorcet's avatar
Yann Diorcet committed
397 398
AM_CFLAGS=\
	$(STRICT_OPTIONS) \
399
	$(STRICT_OPTIONS_CC) \
Yann Diorcet's avatar
Yann Diorcet committed
400 401 402 403 404
	$(SPEEX_CFLAGS)  \
	$(GSM_CFLAGS)    \
	$(LIBPULSE_CFLAGS) \
	$(SPANDSP_CFLAGS)  \
	$(MSSILK_CFLAGS) \
405
	$(PCAP_CFLAGS) \
406
	$(OPUS_CFLAGS) \
407
	$(SRTP_CFLAGS) \
408
	$(BCTOOLBOX_CFLAGS)
aymeric's avatar
aymeric committed
409

Yann Diorcet's avatar
Yann Diorcet committed
410 411
AM_CXXFLAGS=\
	$(STRICT_OPTIONS) \
412
	$(STRICT_OPTIONS_CXX) \
Yann Diorcet's avatar
Yann Diorcet committed
413
	$(ORTP_CFLAGS)
414

Simon Morlat's avatar
Simon Morlat committed
415 416
DEFS=@DEFS@  -DPACKAGE_PLUGINS_DIR=\"$(PACKAGE_PLUGINS_DIR)\" -DLOCALEDIR=\"$(localedir)\" -DMS2_INTERNAL

417 418 419 420
if MS2_FILTERS
DEFS+= -DMS2_FILTERS
endif

aymeric's avatar
aymeric committed
421
if BUILD_VIDEO
Simon Morlat's avatar
Simon Morlat committed
422
AM_CFLAGS+=$(VIDEO_CFLAGS) $(GLEW_CFLAGS)
aymeric's avatar
aymeric committed
423 424
endif

425 426 427
if LIBBZRTP
AM_CFLAGS+=$(LIBBZRTP_CFLAGS)
endif
428

429 430
if BUILD_WIN32
libmediastreamer_voip_la_LIBADD+=       -lole32 \
431 432 433
										-loleaut32\
										-lwinmm \
										-luuid
434 435
endif

436 437 438 439 440
if BUILD_VP8
AM_CFLAGS+=$(VP8_CFLAGS)
libmediastreamer_voip_la_LIBADD+=$(VP8_LIBS)
endif

441 442
if BUILD_MATROSKA
AM_CFLAGS+=				$(EBML_CFLAGS) \
443 444
					$(MATROSKA_CFLAGS) \
					-DHAVE_MATROSKA
445 446 447 448 449

libmediastreamer_voip_la_LIBADD+=	$(MATROSKA_LIBS) \
					$(EBML_LIBS)
endif

450 451 452 453 454 455
if BUILD_VIDEO
libmediastreamer_voip_la_LIBADD+=	$(VIDEO_LIBS) \
					$(THEORA_LIBS) \
					$(GLEW_LIBS)
endif

456
if BUILD_UPNP
457
AM_CFLAGS+=$(LIBUPNP_CFLAGS) -D_GNU_SOURCE
458 459 460
libmediastreamer_voip_la_LIBADD+=	$(LIBUPNP_LIBS)
endif

461 462
if BUILD_MACOSX
libmediastreamer_voip_la_LDFLAGS+=	-framework Cocoa -framework OpenGL -framework QuartzCore
463 464 465
if BUILD_VIDEO
libmediastreamer_voip_la_LDFLAGS+=	-framework VideoToolbox -framework CoreMedia
endif
466 467 468 469
endif

AM_OBJCFLAGS=$(AM_CFLAGS)

aymeric's avatar
aymeric committed
470 471
imgdir=$(datadir)/images/

Ghislain MARY's avatar
Ghislain MARY committed
472
img_DATA=voip/nowebcamCIF.jpg
aymeric's avatar
aymeric committed
473

474
make_gitversion_h:
475
	if test -n "$(GITLOG)" ; then \
476
		$(ECHO) -n "#define GIT_VERSION " > $(GITVERSION_FILE_TMP) &&\
Simon Morlat's avatar
Simon Morlat committed
477
		$(ECHO) \"`cd $(top_srcdir) && git describe --always`\" >> $(GITVERSION_FILE_TMP) &&\
478 479 480 481 482
		if test "`cat $(GITVERSION_FILE_TMP)`" != "`cat $(srcdir)/$(GITVERSION_FILE)`" ; then \
			cp -f $(GITVERSION_FILE_TMP) $(srcdir)/$(GITVERSION_FILE) ; \
		fi \
		&& rm -f $(GITVERSION_FILE_TMP) ;\
	fi
483 484
	if ! test -f $(srcdir)/$(GITVERSION_FILE) ; then \
		$(ECHO) -n "#define GIT_VERSION \"unknown\" " > $(srcdir)/$(GITVERSION_FILE) ;\
485 486 487 488
	fi

$(GITVERSION_FILE):	make_gitversion_h

489
yuv2rgb.fs.h: yuv2rgb.fs
490 491
	cd $(abs_srcdir) && \
	xxd -i yuv2rgb.fs | sed s/}\;/,0x00}\;/ > $(abs_builddir)/yuv2rgb.fs.h
492 493

yuv2rgb.vs.h: yuv2rgb.vs
494 495
	cd $(abs_srcdir) && \
	xxd -i yuv2rgb.vs | sed s/}\;/,0x00}\;/ > $(abs_builddir)/yuv2rgb.vs.h
496 497 498

#because make bundle serahc in this dir
install-data-local:
499
	$(MKDIR_P) $(DESTDIR)$(libdir)/mediastreamer/plugins