xref: /haiku/src/add-ons/media/plugins/ffmpeg/Jamfile (revision b6b0567fbd186f8ce8a0c90bdc7a7b5b4c649678)
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
23	gfx_conv_c.cpp
24	gfx_conv_c_lookup.cpp
25#	gfx_conv_mmx.cpp
26 	gfx_util.cpp
27	:
28	libavformat.a
29	libavcodec.a
30	libavcodec_$(TARGET_ARCH).a
31	libavutil.a
32	libswscale.a
33	be
34	libmedia.so
35	libz.a
36	$(TARGET_LIBSUPC++)
37;
38
39# FFmpeg libs configuration is in the config.h header. Architecture specific
40# defines have been commented out there and are being defined here instead.
41# NOTE: These are intentionally global variables, so we can re-use them in
42# sub-folders.
43HAIKU_FFMPEG_DEFINES = HAVE_AV_CONFIG_H _FILE_OFFSET_BITS=64
44	_LARGEFILE_SOURCE ;
45HAIKU_FFMPEG_USE_MMX = 1 ;
46HAIKU_FFMPEG_USE_MMX2 = 1 ;
47HAIKU_FFMPEG_USE_SSE = 0 ;
48HAIKU_FFMPEG_USE_SSSE3 = 1 ;
49HAIKU_FFMPEG_USE_AMD3DNOW = 0 ;
50HAIKU_FFMPEG_USE_AMD3DNOWEXT = 0 ;
51HAIKU_FFMPEG_GCC_EXTRA_FLAGS = ;
52if $(HAIKU_GCC_VERSION[1]) >= 3 {
53	HAIKU_FFMPEG_GCC_EXTRA_FLAGS = -fomit-frame-pointer -fno-pic ;
54} else {
55	HAIKU_FFMPEG_GCC_EXTRA_FLAGS = -fomit-frame-pointer -DPIC ;
56}
57
58if $(TARGET_ARCH) = x86 {
59	HAIKU_FFMPEG_DEFINES += ARCH_X86=1 ARCH_X86_32=1 ;
60	HAIKU_FFMPEG_DEFINES += ARCH_PPC=0 ;
61	HAIKU_FFMPEG_DEFINES += ARCH_SPARC=0 ;
62	HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOW=$(HAIKU_FFMPEG_USE_AMD3DNOW) ;
63	HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOWEXT=$(HAIKU_FFMPEG_USE_AMD3DNOWEXT) ;
64	HAIKU_FFMPEG_DEFINES += HAVE_MMX=$(HAIKU_FFMPEG_USE_MMX) ;
65	HAIKU_FFMPEG_DEFINES += HAVE_MMX2=$(HAIKU_FFMPEG_USE_MMX2) ;
66	HAIKU_FFMPEG_DEFINES += HAVE_SSE=$(HAIKU_FFMPEG_USE_SSE) ;
67	HAIKU_FFMPEG_DEFINES += HAVE_SSSE3=$(HAIKU_FFMPEG_USE_SSSE3) ;
68	HAIKU_FFMPEG_DEFINES += HAVE_ALTIVEC=0 ;
69	HAIKU_FFMPEG_DEFINES += HAVE_VIS=0 ;
70} else if $(TARGET_ARCH) = ppc {
71	HAIKU_FFMPEG_DEFINES += ARCH_X86=0 ARCH_X86_32=0 ;
72	HAIKU_FFMPEG_DEFINES += ARCH_PPC=1 ;
73	HAIKU_FFMPEG_DEFINES += ARCH_SPARC=0 ;
74	HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ;
75	HAIKU_FFMPEG_DEFINES += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSSE3=0 ;
76	HAIKU_FFMPEG_DEFINES += HAVE_ALTIVEC=1 ;
77	HAIKU_FFMPEG_DEFINES += HAVE_VIS=0 ;
78} else if $(TARGET_ARCH) = sparc {
79	HAIKU_FFMPEG_DEFINES += ARCH_X86=0 ARCH_X86_32=0 ;
80	HAIKU_FFMPEG_DEFINES += ARCH_PPC=0 ;
81	HAIKU_FFMPEG_DEFINES += ARCH_SPARC=1 ;
82	HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ;
83	HAIKU_FFMPEG_DEFINES += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSSE3=0 ;
84	HAIKU_FFMPEG_DEFINES += HAVE_ALTIVEC=0 ;
85	HAIKU_FFMPEG_DEFINES += HAVE_VIS=1 ;
86}
87
88if $(INCLUDE_GPL_ADDONS) = 1 {
89	HAIKU_FFMPEG_DEFINES += CONFIG_GPL=1 ;
90} else {
91	HAIKU_FFMPEG_DEFINES += CONFIG_GPL=0 ;
92}
93
94
95HAIKU_FFMPEG_DEFINES = [ FDefines $(HAIKU_FFMPEG_DEFINES) ] ;
96
97SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavcodec ;
98SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavformat ;
99SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavutil ;
100SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libswscale ;
101