Makefile.am 14 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 26
	android/loader.cpp android/loader.h \
	audiofilters/aac-eld-android.cpp
Ghislain MARY's avatar
Ghislain MARY committed
27 28 29

EXTRA_DIST= audiofilters/winsnd2.c audiofilters/winsnd.c videofilters/winvideo.c  \
	videofilters/winvideods.c videofilters/wincevideods.c dxfilter.h dxfilter.cpp \
30
	audiofilters/winsndds.cpp \
Ghislain MARY's avatar
Ghislain MARY committed
31 32
	voip/nowebcamCIF.jpg audiofilters/winsnd3.c utils/vfw-missing.h \
	videofilters/winvideo2.c utils/msjava.c $(ANDROID_SRC_FILES) \
33
	$(GITVERSION_FILE) yuv2rgb.fs yuv2rgb.vs libsrtp.map
aymeric's avatar
aymeric committed
34

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

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

39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
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) \
54
					$(OPUS_LIBS) \
55
					$(SRTP_LIBS) \
56
					$(POLARSSL_LIBS)
57 58


59 60 61 62
if LIBBZRTP
libmediastreamer_voip_la_LIBADD+=$(LIBBZRTP_LIB)
endif

63 64 65 66 67
lib_LTLIBRARIES=libmediastreamer_base.la
if BUILD_VOIP_LIBRARY
lib_LTLIBRARIES+=libmediastreamer_voip.la
endif

Ghislain MARY's avatar
Ghislain MARY committed
68
libmediastreamer_base_la_SOURCES=	base/mscommon.c \
69
					$(GITVERSION_FILE) \
Ghislain MARY's avatar
Ghislain MARY committed
70 71 72 73 74
					base/msfilter.c \
					base/msqueue.c \
					base/msticker.c \
					base/eventqueue.c \
					base/mssndcard.c \
Simon Morlat's avatar
Simon Morlat committed
75
					base/msfactory.c \
Ghislain MARY's avatar
Ghislain MARY committed
76 77 78 79 80 81
					otherfilters/tee.c \
					otherfilters/join.c \
					base/mswebcam.c \
					base/mtu.c \
					otherfilters/void.c \
					otherfilters/itc.c
82
libmediastreamer_voip_la_SOURCES=
aymeric's avatar
aymeric committed
83

84
#dummy c++ file to force libtool to use c++ linking (because of msdscap-mingw.cc)
85
nodist_EXTRA_libmediastreamer_base_la_SOURCES = dummy.cxx
aymeric's avatar
aymeric committed
86 87


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

118
if MS2_FILTERS
Ghislain MARY's avatar
Ghislain MARY committed
119 120 121
libmediastreamer_voip_la_SOURCES+=	audiofilters/alaw.c \
					audiofilters/ulaw.c \
					audiofilters/dtmfgen.c \
Margaux Clerc's avatar
Margaux Clerc committed
122
					audiofilters/g711.c audiofilters/g711.h \
Ghislain MARY's avatar
Ghislain MARY committed
123 124 125 126 127 128 129
					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 \
130
					utils/audiodiff.c \
Ghislain MARY's avatar
Ghislain MARY committed
131 132 133 134
					audiofilters/equalizer.c \
					audiofilters/chanadapt.c \
					audiofilters/audiomixer.c \
					audiofilters/tonedetector.c \
135
					audiofilters/devices.c audiofilters/devices.h \
Ghislain MARY's avatar
Ghislain MARY committed
136 137 138 139 140
					utils/g722.h \
					utils/g722_decode.c \
					utils/g722_encode.c \
					audiofilters/msg722.c \
					audiofilters/l16.c \
141 142 143
					audiofilters/genericplc.c \
					audiofilters/msfileplayer.c \
					audiofilters/msfilerec.c \
144
					audiofilters/waveheader.h \
145 146
					audiofilters/flowcontrol.c \
					audiofilters/msvaddtx.c
147

148
if BUILD_SPEEX
Ghislain MARY's avatar
Ghislain MARY committed
149
libmediastreamer_voip_la_SOURCES+=	audiofilters/msspeex.c audiofilters/speexec.c
150 151 152
endif

if BUILD_GSM
Ghislain MARY's avatar
Ghislain MARY committed
153
libmediastreamer_voip_la_SOURCES+=	audiofilters/gsm.c
154 155
endif

156
if BUILD_G726
Ghislain MARY's avatar
Ghislain MARY committed
157
libmediastreamer_voip_la_SOURCES+=	audiofilters/g726.c
158 159
endif

Ghislain MARY's avatar
Ghislain MARY committed
160 161 162 163
if BUILD_OPUS
libmediastreamer_voip_la_SOURCES+=	audiofilters/msopus.c
endif

164
if BUILD_WIN32
165
libmediastreamer_voip_la_SOURCES+=	audiofilters/winsnd3.c
166 167
endif

aymeric's avatar
aymeric committed
168
if BUILD_RESAMPLE
Ghislain MARY's avatar
Ghislain MARY committed
169
libmediastreamer_voip_la_SOURCES+=	audiofilters/msresample.c
aymeric's avatar
aymeric committed
170 171 172
endif

if BUILD_ALSA
Ghislain MARY's avatar
Ghislain MARY committed
173
libmediastreamer_voip_la_SOURCES+=	audiofilters/alsa.c
aymeric's avatar
aymeric committed
174 175
endif

176 177 178 179
if BUILD_QSA
libmediastreamer_voip_la_SOURCES+=	audiofilters/qsa.c
endif

aymeric's avatar
aymeric committed
180
if BUILD_OSS
Ghislain MARY's avatar
Ghislain MARY committed
181
libmediastreamer_voip_la_SOURCES+=	audiofilters/oss.c
aymeric's avatar
aymeric committed
182 183 184
endif

if BUILD_ARTS
Ghislain MARY's avatar
Ghislain MARY committed
185
libmediastreamer_voip_la_SOURCES+=	audiofilters/arts.c
aymeric's avatar
aymeric committed
186 187 188
endif

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

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

jehan's avatar
jehan committed
196
if BUILD_IOSIOUNIT
Ghislain MARY's avatar
Ghislain MARY committed
197
libmediastreamer_voip_la_SOURCES+=	audiofilters/msiounit.m
johan's avatar
johan committed
198
libmediastreamer_voip_la_SOURCES+=	audiofilters/aac-eld.c
199 200
endif

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

205
if BUILD_PULSEAUDIO
Ghislain MARY's avatar
Ghislain MARY committed
206
libmediastreamer_voip_la_SOURCES+=	audiofilters/pulseaudio.c
207 208
endif

aymeric's avatar
aymeric committed
209 210 211
if BUILD_VIDEO

if BUILD_MACOSX
212 213 214 215

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
216
					videofilters/msosxdisplay.m \
217
					utils/shaders.c utils/shaders.h \
Ghislain MARY's avatar
Ghislain MARY committed
218
					utils/opengles_display.c utils/opengles_display.h
219 220

libmediastreamer_voip_la_LIBADD+=libqtcapture_cocoa.la
221
nodist_libmediastreamer_voip_la_SOURCES = yuv2rgb.fs.h yuv2rgb.fs.h
222 223
endif

jehan's avatar
jehan committed
224
if BUILD_IOS
Ghislain MARY's avatar
Ghislain MARY committed
225
libmediastreamer_voip_la_SOURCES+=	voip/scaler.c \
226
					voip/ioshardware.m \
Ghislain MARY's avatar
Ghislain MARY committed
227 228 229 230 231 232
					videofilters/iosdisplay.m \
					videofilters/ioscapture.m \
					utils/shaders.c \
					utils/shaders.h \
					utils/opengles_display.c \
					utils/opengles_display.h
233
nodist_libmediastreamer_voip_la_SOURCES = yuv2rgb.fs.h yuv2rgb.fs.h
jehan's avatar
jehan committed
234
endif
235

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

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

244
if BUILD_WIN32
Ghislain MARY's avatar
Ghislain MARY committed
245
libmediastreamer_voip_la_SOURCES+=	videofilters/msdscap-mingw.cc videofilters/drawdib-display.c
246 247 248
endif

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

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

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

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

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

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

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

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

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

305
endif BUILD_VIDEO
aymeric's avatar
aymeric committed
306

307
endif MS2_FILTERS
aymeric's avatar
aymeric committed
308

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

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

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


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

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

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

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

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

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

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

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

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

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

407 408 409
if LIBBZRTP
AM_CFLAGS+=$(LIBBZRTP_CFLAGS)
endif
410

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

418 419 420 421 422
if BUILD_VP8
AM_CFLAGS+=$(VP8_CFLAGS)
libmediastreamer_voip_la_LIBADD+=$(VP8_LIBS)
endif

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

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

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

438
if BUILD_UPNP
439
AM_CFLAGS+=$(LIBUPNP_CFLAGS) -D_GNU_SOURCE
440 441 442
libmediastreamer_voip_la_LIBADD+=	$(LIBUPNP_LIBS)
endif

443
if BUILD_IOS
444 445 446 447 448 449 450 451 452
libmediastreamer_voip_la_LDFLAGS+=	-framework CoreGraphics
endif

if BUILD_MACOSX
libmediastreamer_voip_la_LDFLAGS+=	-framework Cocoa -framework OpenGL -framework QuartzCore
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 \
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