Makefile.am 5.56 KB
Newer Older
1 2
GITVERSION_FILE=gitversion.h
GITVERSION_FILE_TMP=gitversion.h.tmp
3

Simon Morlat's avatar
Simon Morlat committed
4 5
ECHO=/bin/echo

6 7 8
ANDROID_SRC_FILES= \
	msandroid.cpp \
	android-display.c \
Simon Morlat's avatar
Simon Morlat committed
9
	android-display-bad.cpp \
10 11
	msandroidvideo.cpp

smorlat's avatar
smorlat committed
12 13 14
EXTRA_DIST= winsnd2.c winsnd.c winvideo.c  \
	winvideods.c wincevideods.c dxfilter.h dxfilter.cpp \
	msfileplayer_win.c msfilerec_win.c winsndds.cpp nowebcamCIF.jpg winsnd3.c vfw-missing.h \
15 16
	winvideo2.c msjava.c $(ANDROID_SRC_FILES) \
	$(GITVERSION_FILE)
aymeric's avatar
aymeric committed
17

18
BUILT_SOURCES=alldescs.h $(GITVERSION_FILE)
aymeric's avatar
aymeric committed
19

Simon Morlat's avatar
Simon Morlat committed
20
CLEANFILES=alldescs.h filterdescs.txt $(GITVERSION_FILE)
aymeric's avatar
aymeric committed
21

22
INCLUDES=-I$(top_srcdir)/include/
aymeric's avatar
aymeric committed
23 24 25

lib_LTLIBRARIES=libmediastreamer.la

26
libmediastreamer_la_SOURCES=	mscommon.c    $(GITVERSION_FILE) \
aymeric's avatar
aymeric committed
27 28 29
				msfilter.c     \
				msqueue.c      \
				msticker.c     \
30
				eventqueue.c \
aymeric's avatar
aymeric committed
31 32 33 34 35 36 37 38 39 40 41 42
				alaw.c 	       \
				ulaw.c         \
				mssndcard.c    \
				msrtp.c	       \
				dtmfgen.c      \
				ice.c          \
				tee.c          \
				msconf.c       \
				msjoin.c       \
				g711common.h \
				msvolume.c \
				mswebcam.c \
smorlat's avatar
smorlat committed
43
				mtu.c \
44 45 46 47 48 49
				void.c \
				dsptools.c \
				kiss_fft.c  \
				_kiss_fft_guts.h \
				kiss_fft.h \
				kiss_fftr.c \
smorlat's avatar
smorlat committed
50
				kiss_fftr.h \
51 52
				equalizer.c \
				chanadapt.c \
53
				audiomixer.c \
54
				itc.c \
55 56
				tonedetector.c \
				bitratecontrol.c \
57
				qualityindicator.c \
58
				g722_decode.c g722.h \
59
				g722_encode.c \
Simon Morlat's avatar
Simon Morlat committed
60
				msg722.c \
61 62
				l16.c \
				audioconference.c
63

aymeric's avatar
aymeric committed
64

65 66
#dummy c++ file to force libtool to use c++ linking (because of msdscap-mingw.cc)
nodist_EXTRA_libmediastreamer_la_SOURCES = dummy.cxx
aymeric's avatar
aymeric committed
67 68 69

libmediastreamer_la_SOURCES+=audiostream.c

70 71 72 73 74 75 76 77 78

if BUILD_SPEEX
libmediastreamer_la_SOURCES+=msspeex.c speexec.c
endif

if BUILD_GSM
libmediastreamer_la_SOURCES+=gsm.c
endif

79 80 81 82
if BUILD_G726
libmediastreamer_la_SOURCES+=g726.c
endif

83 84 85 86 87 88 89 90
if BUILD_WIN32
libmediastreamer_la_SOURCES+=	winsnd3.c \
				msfileplayer_win.c msfilerec_win.c
else
libmediastreamer_la_SOURCES+=	msfileplayer.c \
				msfilerec.c    
endif

aymeric's avatar
aymeric committed
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
if BUILD_RESAMPLE
libmediastreamer_la_SOURCES+=msresample.c
endif

if BUILD_ALSA
libmediastreamer_la_SOURCES+=alsa.c
endif

if BUILD_OSS
libmediastreamer_la_SOURCES+=oss.c
endif

if BUILD_ARTS
libmediastreamer_la_SOURCES+=arts.c
endif

if BUILD_PORTAUDIO
libmediastreamer_la_SOURCES+=pasnd.c
endif

if BUILD_MACSND
libmediastreamer_la_SOURCES+=macsnd.c
endif

115 116 117 118
if BUILD_MACIOUNIT
libmediastreamer_la_SOURCES+=msiounit.c
endif

aymeric's avatar
aymeric committed
119 120 121 122
if BUILD_MACAQSND
libmediastreamer_la_SOURCES+=aqsnd.c
endif

123 124 125 126
if BUILD_PULSEAUDIO
libmediastreamer_la_SOURCES+=pulseaudio.c
endif

aymeric's avatar
aymeric committed
127 128 129 130

if BUILD_VIDEO

if BUILD_MACOSX
131
libmediastreamer_la_SOURCES+=qtcapture.m
132 133
endif

134 135 136 137 138 139
if BUILD_V4L1
libmediastreamer_la_SOURCES+=msv4l.c
endif

if BUILD_V4L2
libmediastreamer_la_SOURCES+=msv4l2.c
aymeric's avatar
aymeric committed
140 141
endif

142
if BUILD_WIN32
143
libmediastreamer_la_SOURCES+=msdscap-mingw.cc drawdib-display.c
144 145 146 147 148 149
endif

if BUILD_THEORA
libmediastreamer_la_SOURCES+=theora.c
endif

150 151 152 153
if BUILD_VP8
libmediastreamer_la_SOURCES+=vp8.c
endif

154
if BUILD_FFMPEG
smorlat's avatar
smorlat committed
155
libmediastreamer_la_SOURCES+=	videoenc.c \
aymeric's avatar
aymeric committed
156 157 158 159
				videodec.c \
				pixconv.c  \
				sizeconv.c \
				nowebcam.c nowebcam.h \
160
				swscale.h ffmpeg-priv.h \
161 162
				h264dec.c \
				jpegwriter.c
163 164
endif

Simon Morlat's avatar
Simon Morlat committed
165 166 167 168 169 170 171 172
if BUILD_SDL
libmediastreamer_la_SOURCES+=videoout.c 
endif

if BUILD_X11_XV
libmediastreamer_la_SOURCES+=x11video.c
endif

173
libmediastreamer_la_SOURCES+= rfc2429.h \
aymeric's avatar
aymeric committed
174 175
				msvideo.c \
				rfc3984.c \
176
				mire.c \
Simon Morlat's avatar
Simon Morlat committed
177 178
				extdisplay.c \
				layouts.c layouts.h
aymeric's avatar
aymeric committed
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197

libmediastreamer_la_SOURCES+=videostream.c

endif




alldescs.h:	Makefile.am $(libmediastreamer_la_SOURCES)
	builddir=`pwd` && cd $(srcdir) && \
	awk 'BEGIN { FS="[()]" ; }; /^\t*MS_FILTER_DESC_EXPORT/{ printf("%s\n", $$2) } '  > $$builddir/filterdescs.txt $(libmediastreamer_la_SOURCES) && \
	awk 'BEGIN { print("#include \"mediastreamer2/msfilter.h\"\n") } { printf("extern MSFilterDesc %s;\n",$$1) } ' $$builddir/filterdescs.txt > $$builddir/$@ && \
	awk 'BEGIN { print("MSFilterDesc * ms_filter_descs[]={") } { printf("&%s,\n",$$1) } END{ print("NULL\n};\n") } ' $$builddir/filterdescs.txt >> $$builddir/$@


libmediastreamer_la_LIBADD=	$(ORTP_LIBS) \
				$(PORTAUDIO_LIBS) \
				$(ALSA_LIBS) \
				$(ARTS_LIBS) \
198
				$(LIBPULSE_LIBS) \
aymeric's avatar
aymeric committed
199
				$(SPEEX_LIBS) \
smorlat's avatar
smorlat committed
200 201
				$(GSM_LIBS) \
				$(LIBV4L1_LIBS) \
202 203
				$(LIBV4L2_LIBS) \
				$(SPANDSP_LIBS)
Simon Morlat's avatar
Simon Morlat committed
204 205 206

libmediastreamer_la_LDFLAGS= -no-undefined -version-info $(LIBMEDIASTREAMER_SO_VERSION) 

207
if !BUILD_WIN32
Simon Morlat's avatar
Simon Morlat committed
208
libmediastreamer_la_LDFLAGS+=-rdynamic
209
endif
aymeric's avatar
aymeric committed
210 211

if BUILD_VIDEO
212 213 214 215 216 217 218 219 220 221 222 223
libmediastreamer_la_LIBADD+=	$(VIDEO_LIBS) \
				$(THEORA_LIBS)


if BUILD_WIN32
libmediastreamer_la_LIBADD+=	-lole32 \
				-loleaut32\
				-lwinmm \
				-luuid

endif

aymeric's avatar
aymeric committed
224
endif
Jehan Monnier's avatar
Jehan Monnier committed
225 226 227
if BUILD_WIN32_WCE
libmediastreamer_la_LIBADD+=	-lmmtimer
endif
aymeric's avatar
aymeric committed
228

Simon Morlat's avatar
Simon Morlat committed
229
AM_CFLAGS= $(ORTP_CFLAGS)   \
aymeric's avatar
aymeric committed
230 231
		$(SPEEX_CFLAGS)  \
		$(GSM_CFLAGS)    \
232
		$(STRICT_OPTIONS) \
233 234
		$(LIBPULSE_CFLAGS) \
		$(SPANDSP_CFLAGS)
Simon Morlat's avatar
Simon Morlat committed
235
		
aymeric's avatar
aymeric committed
236

Simon Morlat's avatar
Simon Morlat committed
237
AM_CXXFLAGS= $(ORTP_CFLAGS)   \
238 239
		$(STRICT_OPTIONS)

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

aymeric's avatar
aymeric committed
242 243 244 245
if BUILD_VIDEO
AM_CFLAGS+=$(VIDEO_CFLAGS)
endif

246 247 248 249 250
if BUILD_VP8
AM_CFLAGS+=$(VP8_CFLAGS)
libmediastreamer_la_LIBADD+=$(VP8_LIBS)
endif

smorlat's avatar
smorlat committed
251 252
AM_OBJCFLAGS=$(AM_CFLAGS)

aymeric's avatar
aymeric committed
253 254 255 256
imgdir=$(datadir)/images/

img_DATA=nowebcamCIF.jpg

257 258
make_gitversion_h:
	if test -d $(top_srcdir)/.git ; then \
Simon Morlat's avatar
Simon Morlat committed
259 260
		$(ECHO) -n "#define GIT_VERSION " > $(GITVERSION_FILE_TMP) &&\
		$(ECHO) \"`cd $(top_srcdir) && git describe`\" >> $(GITVERSION_FILE_TMP) &&\
261 262 263 264 265
		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
266 267
	if ! test -f $(srcdir)/$(GITVERSION_FILE) ; then \
		$(ECHO) -n "#define GIT_VERSION \"unknown\" " > $(srcdir)/$(GITVERSION_FILE) ;\
268 269 270 271 272 273 274 275 276
	fi

$(GITVERSION_FILE):	make_gitversion_h