Makefile.am 14.1 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

Simon Morlat's avatar
Simon Morlat committed
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) \
François Grisez's avatar
François Grisez committed
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) \
jehan's avatar
jehan committed
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 85 86
					base/mswebcam.c \
					base/mtu.c \
					otherfilters/void.c \
					otherfilters/itc.c
87
libmediastreamer_voip_la_SOURCES=
aymeric's avatar
aymeric committed
88

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


93
if ORTP_ENABLED
94
BUILT_SOURCES+=voipdescs.h
Ghislain MARY's avatar
Ghislain MARY committed
95 96 97 98 99
libmediastreamer_voip_la_SOURCES+=	voip/private.h \
					voip/msvoip.c \
					voip/mediastream.c \
					voip/audiostream.c \
					voip/ringstream.c \
Sylvain Berfini's avatar
Sylvain Berfini committed
100
					voip/rfc4103_textstream.c \
101 102
					otherfilters/rfc4103_source.c \
					otherfilters/rfc4103_sink.c \
103
					voip/msmediaplayer.c \
Ghislain MARY's avatar
Ghislain MARY committed
104 105 106 107 108
					voip/ice.c \
					otherfilters/msrtp.c \
					voip/qualityindicator.c \
					voip/audioconference.c \
					voip/bitratedriver.c \
109
					voip/qosanalyzer.c voip/qosanalyzer.h \
johan's avatar
johan committed
110
					voip/bitratecontrol.c \
111
					crypto/zrtp.c \
jehan's avatar
jehan committed
112 113
					voip/stun.c \
					voip/stun_udp.c \
114
					crypto/ms_srtp.c \
115
					crypto/dtls_srtp.c
116
else
117
libmediastreamer_base_la_SOURCES+=	ortp-deps/logging.c \
118 119
					ortp-deps/port.c \
					ortp-deps/str_utils.c
120 121 122 123
if MS2_FILTERS
libmediastreamer_base_la_SOURCES+=	ortp-deps/b64.c \
					ortp-deps/payloadtype.c
endif
124
endif
125

126
if MS2_FILTERS
Ghislain MARY's avatar
Ghislain MARY committed
127 128 129
libmediastreamer_voip_la_SOURCES+=	audiofilters/alaw.c \
					audiofilters/ulaw.c \
					audiofilters/dtmfgen.c \
Margaux Clerc's avatar
Margaux Clerc committed
130
					audiofilters/g711.c audiofilters/g711.h \
Ghislain MARY's avatar
Ghislain MARY committed
131 132 133 134 135 136 137
					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 \
138
					utils/audiodiff.c \
Ghislain MARY's avatar
Ghislain MARY committed
139 140 141 142
					audiofilters/equalizer.c \
					audiofilters/chanadapt.c \
					audiofilters/audiomixer.c \
					audiofilters/tonedetector.c \
Ghislain MARY's avatar
Ghislain MARY committed
143
					audiofilters/devices.c \
Ghislain MARY's avatar
Ghislain MARY committed
144 145 146 147 148
					utils/g722.h \
					utils/g722_decode.c \
					utils/g722_encode.c \
					audiofilters/msg722.c \
					audiofilters/l16.c \
johan's avatar
johan committed
149
					audiofilters/genericplc.h \
150
					audiofilters/genericplc.c \
johan's avatar
johan committed
151
					audiofilters/msgenericplc.c \
152 153
					audiofilters/msfileplayer.c \
					audiofilters/msfilerec.c \
154
					audiofilters/waveheader.h \
155 156
					audiofilters/flowcontrol.c \
					audiofilters/msvaddtx.c
157

158
if BUILD_SPEEX
Ghislain MARY's avatar
Ghislain MARY committed
159
libmediastreamer_voip_la_SOURCES+=	audiofilters/msspeex.c audiofilters/speexec.c
160 161 162
endif

if BUILD_GSM
Ghislain MARY's avatar
Ghislain MARY committed
163
libmediastreamer_voip_la_SOURCES+=	audiofilters/gsm.c
164 165
endif

166
if BUILD_G726
Ghislain MARY's avatar
Ghislain MARY committed
167
libmediastreamer_voip_la_SOURCES+=	audiofilters/g726.c
168 169
endif

Ghislain MARY's avatar
Ghislain MARY committed
170 171 172 173
if BUILD_OPUS
libmediastreamer_voip_la_SOURCES+=	audiofilters/msopus.c
endif

174
if BUILD_WIN32
175
libmediastreamer_voip_la_SOURCES+=	audiofilters/winsnd3.c
176 177
endif

aymeric's avatar
aymeric committed
178
if BUILD_RESAMPLE
Ghislain MARY's avatar
Ghislain MARY committed
179
libmediastreamer_voip_la_SOURCES+=	audiofilters/msresample.c
aymeric's avatar
aymeric committed
180 181 182
endif

if BUILD_ALSA
Ghislain MARY's avatar
Ghislain MARY committed
183
libmediastreamer_voip_la_SOURCES+=	audiofilters/alsa.c
aymeric's avatar
aymeric committed
184 185
endif

186 187 188 189
if BUILD_QSA
libmediastreamer_voip_la_SOURCES+=	audiofilters/qsa.c
endif

aymeric's avatar
aymeric committed
190
if BUILD_OSS
Ghislain MARY's avatar
Ghislain MARY committed
191
libmediastreamer_voip_la_SOURCES+=	audiofilters/oss.c
aymeric's avatar
aymeric committed
192 193 194
endif

if BUILD_ARTS
Ghislain MARY's avatar
Ghislain MARY committed
195
libmediastreamer_voip_la_SOURCES+=	audiofilters/arts.c
aymeric's avatar
aymeric committed
196 197 198
endif

if BUILD_PORTAUDIO
Ghislain MARY's avatar
Ghislain MARY committed
199
libmediastreamer_voip_la_SOURCES+=	audiofilters/pasnd.c
aymeric's avatar
aymeric committed
200 201 202
endif

if BUILD_MACSND
Ghislain MARY's avatar
Ghislain MARY committed
203
libmediastreamer_voip_la_SOURCES+=	audiofilters/macsnd.c
aymeric's avatar
aymeric committed
204 205
endif

jehan's avatar
jehan committed
206
if BUILD_IOSIOUNIT
Ghislain MARY's avatar
Ghislain MARY committed
207
libmediastreamer_voip_la_SOURCES+=	audiofilters/msiounit.m
johan's avatar
johan committed
208
libmediastreamer_voip_la_SOURCES+=	audiofilters/aac-eld.c
209 210
endif

aymeric's avatar
aymeric committed
211
if BUILD_MACAQSND
Ghislain MARY's avatar
Ghislain MARY committed
212
libmediastreamer_voip_la_SOURCES+=	audiofilters/aqsnd.c
aymeric's avatar
aymeric committed
213 214
endif

215
if BUILD_PULSEAUDIO
Ghislain MARY's avatar
Ghislain MARY committed
216
libmediastreamer_voip_la_SOURCES+=	audiofilters/pulseaudio.c
217 218
endif

aymeric's avatar
aymeric committed
219 220 221
if BUILD_VIDEO

if BUILD_MACOSX
222
libmediastreamer_voip_la_SOURCES+=	videofilters/videotoolbox.c
223 224 225 226

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
227
					videofilters/msosxdisplay.m \
228
					utils/shaders.c utils/shaders.h \
Ghislain MARY's avatar
Ghislain MARY committed
229
					utils/opengles_display.c utils/opengles_display.h
230 231

libmediastreamer_voip_la_LIBADD+=libqtcapture_cocoa.la
232
nodist_libmediastreamer_voip_la_SOURCES = yuv2rgb.fs.h yuv2rgb.fs.h
233 234
endif

235
if BUILD_V4L1
Ghislain MARY's avatar
Ghislain MARY committed
236
libmediastreamer_voip_la_SOURCES+=	videofilters/msv4l.c
237 238 239
endif

if BUILD_V4L2
Ghislain MARY's avatar
Ghislain MARY committed
240
libmediastreamer_voip_la_SOURCES+=	videofilters/msv4l2.c
aymeric's avatar
aymeric committed
241 242
endif

243
if BUILD_WIN32
Simon Morlat's avatar
Simon Morlat committed
244
libmediastreamer_voip_la_SOURCES=	videofilters/drawdib-display.c
245 246 247
endif

if BUILD_THEORA
Ghislain MARY's avatar
Ghislain MARY committed
248
libmediastreamer_voip_la_SOURCES+=	videofilters/theora.c
249 250
endif

251
if BUILD_VP8
Ghislain MARY's avatar
Ghislain MARY committed
252
libmediastreamer_voip_la_SOURCES+=	videofilters/vp8.c
253 254
endif

255
if BUILD_MATROSKA
256
libmediastreamer_voip_la_SOURCES+=	videofilters/mkv.c \
Simon Morlat's avatar
Simon Morlat committed
257
					utils/mkv_reader.c utils/mkv_reader.h
258 259
endif

260
if BUILD_AVCODEC
Ghislain MARY's avatar
Ghislain MARY committed
261 262
libmediastreamer_voip_la_SOURCES+=	videofilters/videoenc.c \
					videofilters/videodec.c \
263 264 265
					utils/swscale.h \
					utils/ffmpeg-priv.h \
					utils/ffmpeg-priv.c \
Ghislain MARY's avatar
Ghislain MARY committed
266
					videofilters/h264dec.c \
267
					videofilters/jpegwriter.c
268 269
endif

Simon Morlat's avatar
Simon Morlat committed
270
if BUILD_SDL
271
libmediastreamer_voip_la_SOURCES+=	videofilters/videoout.c
Simon Morlat's avatar
Simon Morlat committed
272 273 274
endif

if BUILD_X11_XV
Ghislain MARY's avatar
Ghislain MARY committed
275
libmediastreamer_voip_la_SOURCES+=	videofilters/x11video.c
Simon Morlat's avatar
Simon Morlat committed
276 277
endif

278
if BUILD_X11_GL
Ghislain MARY's avatar
Ghislain MARY committed
279
libmediastreamer_voip_la_SOURCES+=	videofilters/glxvideo.c utils/opengles_display.c utils/shaders.c
280 281
endif

Ghislain MARY's avatar
Ghislain MARY committed
282 283 284 285 286 287 288
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
289
					voip/videostarter.c \
290 291
					voip/vp8rtpfmt.c \
					voip/vp8rtpfmt.h \
Ghislain MARY's avatar
Ghislain MARY committed
292
					videofilters/mire.c \
293
					videofilters/nowebcam.c voip/nowebcam.h \
Ghislain MARY's avatar
Ghislain MARY committed
294
					videofilters/extdisplay.c \
295
					utils/bits_rw.c \
296
					utils/x11_helper.c \
François Grisez's avatar
François Grisez committed
297
					utils/stream_regulator.c utils/stream_regulator.h \
298
					utils/h264utils.c utils/h264utils.h \
299 300
					voip/layouts.c voip/layouts.h \
					voip/video_preset_high_fps.c
aymeric's avatar
aymeric committed
301

302
if ORTP_ENABLED
Ghislain MARY's avatar
Ghislain MARY committed
303
libmediastreamer_voip_la_SOURCES+=	voip/videostream.c
304
endif
aymeric's avatar
aymeric committed
305

306
endif BUILD_VIDEO
aymeric's avatar
aymeric committed
307

308
endif MS2_FILTERS
aymeric's avatar
aymeric committed
309

310
if BUILD_UPNP
311
libmediastreamer_voip_la_SOURCES+=	upnp/upnp_igd.c \
Yann Diorcet's avatar
Yann Diorcet committed
312
					upnp/upnp_igd_private.h \
313 314 315 316
					upnp/upnp_igd_cmd.c \
					upnp/upnp_igd_utils.c \
					upnp/upnp_igd_utils.h
endif
aymeric's avatar
aymeric committed
317

318
basedescs.h:	Makefile $(libmediastreamer_base_la_SOURCES)
319 320 321 322
	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)/$@
323

324
voipdescs.h:	Makefile $(libmediastreamer_voip_la_SOURCES) $(libqtcapture_cocoa_la_SOURCES)
325
	cd $(srcdir) && \
326
	awk 'BEGIN { FS="[()]" ; }; /^\t*MS_FILTER_DESC_EXPORT/{ printf("%s\n", $$2) } '  > $(abs_builddir)/voipdescs.txt $(libmediastreamer_voip_la_SOURCES) $(libqtcapture_cocoa_la_SOURCES) && \
327 328
	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
329 330


331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352
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
353

354
if !BUILD_WIN32
355
libmediastreamer_base_la_LDFLAGS+=-rdynamic
356
endif
aymeric's avatar
aymeric committed
357

358
if BUILD_WIN32
359
libmediastreamer_base_la_LIBADD+=	-lole32 \
360 361 362
									-loleaut32\
									-lwinmm \
									-luuid
aymeric's avatar
aymeric committed
363
endif
364

Jehan Monnier's avatar
Jehan Monnier committed
365
if BUILD_WIN32_WCE
366
libmediastreamer_base_la_LIBADD+=	-lmmtimer
Jehan Monnier's avatar
Jehan Monnier committed
367
endif
aymeric's avatar
aymeric committed
368

jehan's avatar
jehan committed
369
#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
370
AM_CPPFLAGS=\
Ghislain MARY's avatar
Ghislain MARY committed
371
	-I$(top_srcdir)/include/ \
372 373 374 375 376
	-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 \
Ghislain MARY's avatar
Ghislain MARY committed
377
	-I$(top_srcdir)/src/videofilters \
378
	$(ORTP_CFLAGS)
jehan's avatar
jehan committed
379

Yann Diorcet's avatar
Yann Diorcet committed
380 381
AM_CFLAGS=\
	$(STRICT_OPTIONS) \
382
	$(STRICT_OPTIONS_CC) \
Yann Diorcet's avatar
Yann Diorcet committed
383 384 385 386 387
	$(SPEEX_CFLAGS)  \
	$(GSM_CFLAGS)    \
	$(LIBPULSE_CFLAGS) \
	$(SPANDSP_CFLAGS)  \
	$(MSSILK_CFLAGS) \
388
	$(PCAP_CFLAGS) \
jehan's avatar
jehan committed
389
	$(OPUS_CFLAGS) \
390
	$(SRTP_CFLAGS) \
391
	$(BCTOOLBOX_CFLAGS)
aymeric's avatar
aymeric committed
392

Yann Diorcet's avatar
Yann Diorcet committed
393 394
AM_CXXFLAGS=\
	$(STRICT_OPTIONS) \
395
	$(STRICT_OPTIONS_CXX) \
Yann Diorcet's avatar
Yann Diorcet committed
396
	$(ORTP_CFLAGS)
397

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

400 401 402 403
if MS2_FILTERS
DEFS+= -DMS2_FILTERS
endif

aymeric's avatar
aymeric committed
404
if BUILD_VIDEO
Simon Morlat's avatar
Simon Morlat committed
405
AM_CFLAGS+=$(VIDEO_CFLAGS) $(GLEW_CFLAGS)
aymeric's avatar
aymeric committed
406 407
endif

408 409 410
if LIBBZRTP
AM_CFLAGS+=$(LIBBZRTP_CFLAGS)
endif
smorlat's avatar
smorlat committed
411

412 413
if BUILD_WIN32
libmediastreamer_voip_la_LIBADD+=       -lole32 \
414 415 416
										-loleaut32\
										-lwinmm \
										-luuid
417 418
endif

Ghislain MARY's avatar
Ghislain MARY committed
419 420 421 422 423
if BUILD_VP8
AM_CFLAGS+=$(VP8_CFLAGS)
libmediastreamer_voip_la_LIBADD+=$(VP8_LIBS)
endif

424 425
if BUILD_MATROSKA
AM_CFLAGS+=				$(EBML_CFLAGS) \
426 427
					$(MATROSKA_CFLAGS) \
					-DHAVE_MATROSKA
428 429 430 431 432

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

433 434 435 436 437 438
if BUILD_VIDEO
libmediastreamer_voip_la_LIBADD+=	$(VIDEO_LIBS) \
					$(THEORA_LIBS) \
					$(GLEW_LIBS)
endif

439
if BUILD_UPNP
Yann Diorcet's avatar
Yann Diorcet committed
440
AM_CFLAGS+=$(LIBUPNP_CFLAGS) -D_GNU_SOURCE
441 442 443
libmediastreamer_voip_la_LIBADD+=	$(LIBUPNP_LIBS)
endif

444 445
if BUILD_MACOSX
libmediastreamer_voip_la_LDFLAGS+=	-framework Cocoa -framework OpenGL -framework QuartzCore
446 447 448
if BUILD_VIDEO
libmediastreamer_voip_la_LDFLAGS+=	-framework VideoToolbox -framework CoreMedia
endif
449 450 451 452
endif

AM_OBJCFLAGS=$(AM_CFLAGS)

aymeric's avatar
aymeric committed
453 454
imgdir=$(datadir)/images/

Ghislain MARY's avatar
Ghislain MARY committed
455
img_DATA=voip/nowebcamCIF.jpg
aymeric's avatar
aymeric committed
456

457
make_gitversion_h:
458
	if test -n "$(GITLOG)" ; then \
Simon Morlat's avatar
Simon Morlat committed
459
		$(ECHO) -n "#define GIT_VERSION " > $(GITVERSION_FILE_TMP) &&\
Simon Morlat's avatar
Simon Morlat committed
460
		$(ECHO) \"`cd $(top_srcdir) && git describe --always`\" >> $(GITVERSION_FILE_TMP) &&\
461 462 463 464 465
		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
466 467
	if ! test -f $(srcdir)/$(GITVERSION_FILE) ; then \
		$(ECHO) -n "#define GIT_VERSION \"unknown\" " > $(srcdir)/$(GITVERSION_FILE) ;\
468 469 470 471
	fi

$(GITVERSION_FILE):	make_gitversion_h

472
yuv2rgb.fs.h: yuv2rgb.fs
473 474
	cd $(abs_srcdir) && \
	xxd -i yuv2rgb.fs | sed s/}\;/,0x00}\;/ > $(abs_builddir)/yuv2rgb.fs.h
475 476

yuv2rgb.vs.h: yuv2rgb.vs
477 478
	cd $(abs_srcdir) && \
	xxd -i yuv2rgb.vs | sed s/}\;/,0x00}\;/ > $(abs_builddir)/yuv2rgb.vs.h
479 480 481

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