xref: /haiku/src/add-ons/media/plugins/ffmpeg/Jamfile (revision 508f54795f39c3e7552d87c95aae9dd8ec6f505b)
1SubDir HAIKU_TOP src add-ons media plugins ffmpeg ;
2
3SetSubDirSupportedPlatformsBeOSCompatible ;
4
5UsePrivateHeaders media shared ;
6
7SubDirHdrs [ FDirName $(SUBDIR) libavcodec ] ;
8SubDirHdrs [ FDirName $(SUBDIR) libavformat ] ;
9SubDirHdrs [ FDirName $(SUBDIR) libavutil ] ;
10SubDirHdrs [ FDirName $(SUBDIR) libswscale ] ;
11
12Addon ffmpeg :
13 	AVCodecDecoder.cpp
14 	AVCodecEncoder.cpp
15 	AVFormatReader.cpp
16 	AVFormatWriter.cpp
17 	CodecTable.cpp
18	DemuxerTable.cpp
19	EncoderTable.cpp
20	FFmpegPlugin.cpp
21	MuxerTable.cpp
22	CpuCapabilities.cpp
23
24	gfx_conv_c.cpp
25	gfx_conv_c_lookup.cpp
26	gfx_conv_mmx.cpp
27 	gfx_util.cpp
28 	yuvrgb.nasm
29	:
30	libavformat.a
31	libavcodec.a
32	libavcodec_$(TARGET_ARCH).a
33	libavutil.a
34	libswscale.a
35	be
36	libmedia.so
37	libz.a
38	$(TARGET_LIBSUPC++)
39;
40
41# FFmpeg libs configuration is in the config.h header. Architecture specific
42# defines have been commented out there and are being defined here instead.
43# NOTE: These are intentionally global variables, so we can re-use them in
44# sub-folders.
45HAIKU_FFMPEG_DEFINES = HAVE_AV_CONFIG_H _FILE_OFFSET_BITS=64
46	_LARGEFILE_SOURCE ;
47HAIKU_FFMPEG_USE_MMX = 1 ;
48HAIKU_FFMPEG_USE_MMX2 = 1 ;
49HAIKU_FFMPEG_USE_SSE = 0 ;
50HAIKU_FFMPEG_USE_SSSE3 = 1 ;
51HAIKU_FFMPEG_USE_AMD3DNOW = 0 ;
52HAIKU_FFMPEG_USE_AMD3DNOWEXT = 0 ;
53HAIKU_FFMPEG_GCC_EXTRA_FLAGS = ;
54if $(HAIKU_GCC_VERSION[1]) >= 3 {
55	HAIKU_FFMPEG_GCC_EXTRA_FLAGS = -fomit-frame-pointer -fno-pic ;
56} else {
57	HAIKU_FFMPEG_GCC_EXTRA_FLAGS = -fomit-frame-pointer -DPIC ;
58}
59
60if $(TARGET_ARCH) = x86 {
61	HAIKU_FFMPEG_DEFINES += ARCH_X86=1 ARCH_X86_32=1 ;
62	HAIKU_FFMPEG_DEFINES += ARCH_PPC=0 ;
63	HAIKU_FFMPEG_DEFINES += ARCH_SPARC=0 ;
64	HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOW=$(HAIKU_FFMPEG_USE_AMD3DNOW) ;
65	HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOWEXT=$(HAIKU_FFMPEG_USE_AMD3DNOWEXT) ;
66	HAIKU_FFMPEG_DEFINES += HAVE_MMX=$(HAIKU_FFMPEG_USE_MMX) ;
67	HAIKU_FFMPEG_DEFINES += HAVE_MMX2=$(HAIKU_FFMPEG_USE_MMX2) ;
68	HAIKU_FFMPEG_DEFINES += HAVE_SSE=$(HAIKU_FFMPEG_USE_SSE) ;
69	HAIKU_FFMPEG_DEFINES += HAVE_SSSE3=$(HAIKU_FFMPEG_USE_SSSE3) ;
70	HAIKU_FFMPEG_DEFINES += HAVE_ALTIVEC=0 ;
71	HAIKU_FFMPEG_DEFINES += HAVE_VIS=0 ;
72} else if $(TARGET_ARCH) = ppc {
73	HAIKU_FFMPEG_DEFINES += ARCH_X86=0 ARCH_X86_32=0 ;
74	HAIKU_FFMPEG_DEFINES += ARCH_PPC=1 ;
75	HAIKU_FFMPEG_DEFINES += ARCH_SPARC=0 ;
76	HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ;
77	HAIKU_FFMPEG_DEFINES += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSSE3=0 ;
78	HAIKU_FFMPEG_DEFINES += HAVE_ALTIVEC=1 ;
79	HAIKU_FFMPEG_DEFINES += HAVE_VIS=0 ;
80} else if $(TARGET_ARCH) = sparc {
81	HAIKU_FFMPEG_DEFINES += ARCH_X86=0 ARCH_X86_32=0 ;
82	HAIKU_FFMPEG_DEFINES += ARCH_PPC=0 ;
83	HAIKU_FFMPEG_DEFINES += ARCH_SPARC=1 ;
84	HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ;
85	HAIKU_FFMPEG_DEFINES += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSSE3=0 ;
86	HAIKU_FFMPEG_DEFINES += HAVE_ALTIVEC=0 ;
87	HAIKU_FFMPEG_DEFINES += HAVE_VIS=1 ;
88}
89
90if $(HAIKU_INCLUDE_GPL_ADDONS) = 1 {
91	HAIKU_FFMPEG_DEFINES += CONFIG_GPL=1 ;
92} else {
93	HAIKU_FFMPEG_DEFINES += CONFIG_GPL=0 ;
94}
95
96
97HAIKU_FFMPEG_DEFINES = [ FDefines $(HAIKU_FFMPEG_DEFINES) ] ;
98
99SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavcodec ;
100SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavformat ;
101SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavutil ;
102SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libswscale ;
103