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

Ghislain MARY's avatar
Ghislain MARY committed
180 181 182 183
if BUILD_OPUS
libmediastreamer_voip_la_SOURCES+=	audiofilters/msopus.c
endif

184
if BUILD_WIN32
185
libmediastreamer_voip_la_SOURCES+=	audiofilters/winsnd3.c
186 187
endif

aymeric's avatar
aymeric committed
188
if BUILD_RESAMPLE
Ghislain MARY's avatar
Ghislain MARY committed
189
libmediastreamer_voip_la_SOURCES+=	audiofilters/msresample.c
aymeric's avatar
aymeric committed
190 191 192
endif

if BUILD_ALSA
Ghislain MARY's avatar
Ghislain MARY committed
193
libmediastreamer_voip_la_SOURCES+=	audiofilters/alsa.c
aymeric's avatar
aymeric committed
194 195
endif

196 197 198 199
if BUILD_QSA
libmediastreamer_voip_la_SOURCES+=	audiofilters/qsa.c
endif

aymeric's avatar
aymeric committed
200
if BUILD_OSS
Ghislain MARY's avatar
Ghislain MARY committed
201
libmediastreamer_voip_la_SOURCES+=	audiofilters/oss.c
aymeric's avatar
aymeric committed
202 203 204
endif

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

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

if BUILD_MACSND
Ghislain MARY's avatar
Ghislain MARY committed
213
libmediastreamer_voip_la_SOURCES+=	audiofilters/macsnd.c
aymeric's avatar
aymeric committed
214 215
endif

jehan's avatar
jehan committed
216
if BUILD_IOSIOUNIT
Ghislain MARY's avatar
Ghislain MARY committed
217
libmediastreamer_voip_la_SOURCES+=	audiofilters/msiounit.m
johan's avatar
johan committed
218
libmediastreamer_voip_la_SOURCES+=	audiofilters/aac-eld.c
219 220
endif

aymeric's avatar
aymeric committed
221
if BUILD_MACAQSND
222
libmediastreamer_voip_la_SOURCES+=	audiofilters/aqsnd.m
aymeric's avatar
aymeric committed
223 224
endif

225
if BUILD_PULSEAUDIO
Ghislain MARY's avatar
Ghislain MARY committed
226
libmediastreamer_voip_la_SOURCES+=	audiofilters/pulseaudio.c
227 228
endif

229 230
libmediastreamer_voip_la_LIBTOOLFLAGS= --tag=CC

aymeric's avatar
aymeric committed
231 232
if BUILD_VIDEO

Ronan's avatar
Ronan committed
233
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
234

aymeric's avatar
aymeric committed
235
if BUILD_MACOSX
236
libmediastreamer_voip_la_SOURCES+=	videofilters/videotoolbox.c
237 238 239 240

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
241
					videofilters/msosxdisplay.m \
Simon Morlat's avatar
Simon Morlat committed
242
					$(GLDISPLAY_FILES)
243 244

libmediastreamer_voip_la_LIBADD+=libqtcapture_cocoa.la
245
nodist_libmediastreamer_voip_la_SOURCES = yuv2rgb.fs.h yuv2rgb.fs.h
246 247
endif

248
if BUILD_V4L1
Ghislain MARY's avatar
Ghislain MARY committed
249
libmediastreamer_voip_la_SOURCES+=	videofilters/msv4l.c
250 251 252
endif

if BUILD_V4L2
Ghislain MARY's avatar
Ghislain MARY committed
253
libmediastreamer_voip_la_SOURCES+=	videofilters/msv4l2.c
aymeric's avatar
aymeric committed
254 255
endif

256
if BUILD_WIN32
Simon Morlat's avatar
Simon Morlat committed
257
libmediastreamer_voip_la_SOURCES+=	videofilters/drawdib-display.c
258 259 260
endif

if BUILD_THEORA
Ghislain MARY's avatar
Ghislain MARY committed
261
libmediastreamer_voip_la_SOURCES+=	videofilters/theora.c
262 263
endif

264
if BUILD_VP8
Ghislain MARY's avatar
Ghislain MARY committed
265
libmediastreamer_voip_la_SOURCES+=	videofilters/vp8.c
266 267
endif

268
if BUILD_MATROSKA
269
libmediastreamer_voip_la_SOURCES+=	videofilters/mkv.c \
Simon Morlat's avatar
Simon Morlat committed
270
					utils/mkv_reader.c utils/mkv_reader.h
271 272
endif

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

Simon Morlat's avatar
Simon Morlat committed
283
if BUILD_SDL
284
libmediastreamer_voip_la_SOURCES+=	videofilters/videoout.c
Simon Morlat's avatar
Simon Morlat committed
285 286 287
endif

if BUILD_X11_XV
Ghislain MARY's avatar
Ghislain MARY committed
288
libmediastreamer_voip_la_SOURCES+=	videofilters/x11video.c
Simon Morlat's avatar
Simon Morlat committed
289 290
endif

291
if BUILD_X11_GL
Simon Morlat's avatar
Simon Morlat committed
292
libmediastreamer_voip_la_SOURCES+=	videofilters/glxvideo.c $(GLDISPLAY_FILES)
293 294
endif

Ghislain MARY's avatar
Ghislain MARY committed
295 296 297 298 299 300 301
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
302
					voip/videostarter.c \
303 304
					voip/vp8rtpfmt.c \
					voip/vp8rtpfmt.h \
Ghislain MARY's avatar
Ghislain MARY committed
305
					videofilters/mire.c \
Erwan Croze's avatar
Erwan Croze committed
306
					videofilters/nowebcam.c videofilters/ffmpegnowebcam.c voip/nowebcam.h \
Ghislain MARY's avatar
Ghislain MARY committed
307
					videofilters/extdisplay.c \
308
					utils/bits_rw.c \
309
					utils/x11_helper.c \
310
					utils/stream_regulator.c utils/stream_regulator.h \
311
					utils/h264utils.c utils/h264utils.h \
312 313
					voip/layouts.c voip/layouts.h \
					voip/video_preset_high_fps.c
aymeric's avatar
aymeric committed
314

315
if ORTP_ENABLED
Ghislain MARY's avatar
Ghislain MARY committed
316
libmediastreamer_voip_la_SOURCES+=	voip/videostream.c
317
endif
aymeric's avatar
aymeric committed
318

319
endif BUILD_VIDEO
aymeric's avatar
aymeric committed
320

321
endif MS2_FILTERS
aymeric's avatar
aymeric committed
322

323
if BUILD_UPNP
324
libmediastreamer_voip_la_SOURCES+=	upnp/upnp_igd.c \
325
					upnp/upnp_igd_private.h \
326 327 328 329
					upnp/upnp_igd_cmd.c \
					upnp/upnp_igd_utils.c \
					upnp/upnp_igd_utils.h
endif
aymeric's avatar
aymeric committed
330

331
basedescs.h:	Makefile $(libmediastreamer_base_la_SOURCES)
332 333 334 335
	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)/$@
336

337
voipdescs.h:	Makefile $(libmediastreamer_voip_la_SOURCES) $(libqtcapture_cocoa_la_SOURCES)
338
	cd $(srcdir) && \
339
	awk 'BEGIN { FS="[()]" ; }; /^\t*MS_FILTER_DESC_EXPORT/{ printf("%s\n", $$2) } '  > $(abs_builddir)/voipdescs.txt $(libmediastreamer_voip_la_SOURCES) $(libqtcapture_cocoa_la_SOURCES) && \
340 341
	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
342 343


344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365
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
366

367
if !BUILD_WIN32
368
libmediastreamer_base_la_LDFLAGS+=-rdynamic
369
endif
aymeric's avatar
aymeric committed
370

371
if BUILD_WIN32
372
libmediastreamer_base_la_LIBADD+=	-lole32 \
373 374 375
									-loleaut32\
									-lwinmm \
									-luuid
aymeric's avatar
aymeric committed
376
endif
377

Jehan Monnier's avatar
Jehan Monnier committed
378
if BUILD_WIN32_WCE
379
libmediastreamer_base_la_LIBADD+=	-lmmtimer
Jehan Monnier's avatar
Jehan Monnier committed
380
endif
aymeric's avatar
aymeric committed
381

jehan's avatar
jehan committed
382
#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
383
AM_CPPFLAGS=\
Ghislain MARY's avatar
Ghislain MARY committed
384
	-I$(top_srcdir)/include/ \
385 386 387 388 389
	-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 \
390
	-I$(top_srcdir)/src/videofilters \
391
	$(ORTP_CFLAGS)
jehan's avatar
jehan committed
392

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

Yann Diorcet's avatar
Yann Diorcet committed
406 407
AM_CXXFLAGS=\
	$(STRICT_OPTIONS) \
408
	$(STRICT_OPTIONS_CXX) \
Yann Diorcet's avatar
Yann Diorcet committed
409
	$(ORTP_CFLAGS)
410

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

413 414 415 416
if MS2_FILTERS
DEFS+= -DMS2_FILTERS
endif

aymeric's avatar
aymeric committed
417
if BUILD_VIDEO
Simon Morlat's avatar
Simon Morlat committed
418
AM_CFLAGS+=$(VIDEO_CFLAGS) $(GLEW_CFLAGS)
aymeric's avatar
aymeric committed
419 420
endif

421 422 423
if LIBBZRTP
AM_CFLAGS+=$(LIBBZRTP_CFLAGS)
endif
424

425 426
if BUILD_WIN32
libmediastreamer_voip_la_LIBADD+=       -lole32 \
427 428 429
										-loleaut32\
										-lwinmm \
										-luuid
430 431
endif

432 433 434 435 436
if BUILD_VP8
AM_CFLAGS+=$(VP8_CFLAGS)
libmediastreamer_voip_la_LIBADD+=$(VP8_LIBS)
endif

437 438
if BUILD_MATROSKA
AM_CFLAGS+=				$(EBML_CFLAGS) \
439 440
					$(MATROSKA_CFLAGS) \
					-DHAVE_MATROSKA
441 442 443 444 445

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

446 447 448 449 450 451
if BUILD_VIDEO
libmediastreamer_voip_la_LIBADD+=	$(VIDEO_LIBS) \
					$(THEORA_LIBS) \
					$(GLEW_LIBS)
endif

452
if BUILD_UPNP
453
AM_CFLAGS+=$(LIBUPNP_CFLAGS) -D_GNU_SOURCE
454 455 456
libmediastreamer_voip_la_LIBADD+=	$(LIBUPNP_LIBS)
endif

457 458
if BUILD_MACOSX
libmediastreamer_voip_la_LDFLAGS+=	-framework Cocoa -framework OpenGL -framework QuartzCore
459 460 461
if BUILD_VIDEO
libmediastreamer_voip_la_LDFLAGS+=	-framework VideoToolbox -framework CoreMedia
endif
462 463 464 465
endif

AM_OBJCFLAGS=$(AM_CFLAGS)

aymeric's avatar
aymeric committed
466 467
imgdir=$(datadir)/images/

Ghislain MARY's avatar
Ghislain MARY committed
468
img_DATA=voip/nowebcamCIF.jpg
aymeric's avatar
aymeric committed
469

470
make_gitversion_h:
471
	if test -n "$(GITLOG)" ; then \
472
		$(ECHO) -n "#define GIT_VERSION " > $(GITVERSION_FILE_TMP) &&\
Simon Morlat's avatar
Simon Morlat committed
473
		$(ECHO) \"`cd $(top_srcdir) && git describe --always`\" >> $(GITVERSION_FILE_TMP) &&\
474 475 476 477 478
		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
479 480
	if ! test -f $(srcdir)/$(GITVERSION_FILE) ; then \
		$(ECHO) -n "#define GIT_VERSION \"unknown\" " > $(srcdir)/$(GITVERSION_FILE) ;\
481 482 483 484
	fi

$(GITVERSION_FILE):	make_gitversion_h

485
yuv2rgb.fs.h: yuv2rgb.fs
486 487
	cd $(abs_srcdir) && \
	xxd -i yuv2rgb.fs | sed s/}\;/,0x00}\;/ > $(abs_builddir)/yuv2rgb.fs.h
488 489

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

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