-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.internal
772 lines (703 loc) · 30.6 KB
/
Makefile.internal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
CORES := 8
TUNE_CPU := core2
PREFIX = $(CURDIR)/prefix
NONFREE := --enable-nonfree --enable-openssl --enable-libsrt --enable-libfdk-aac # set to empty if plan to redistribute
export PATH := $(PREFIX)/bin:$(PATH)
export PKG_CONFIG_PATH := $(PREFIX)/lib/pkgconfig:$(PREFIX)/lib/x86_64-linux-gnu/pkgconfig:$(PKG_CONFIG_PATH)
export ACLOCAL_PATH := /usr/share/aclocal
DEPS=$(CURDIR)/dependencies.stamp
TOOLS=$(CURDIR)/tools.stamp
CMAKE=$(CURDIR)/cmake-3.15.0-Linux-x86_64/bin/cmake
NASM=$(PREFIX)/bin/nasm
YASM=$(PREFIX)/bin/yasm
LIBNUMA=$(PREFIX)/lib/libnuma.so
X264=$(PREFIX)/lib/libx264.so
X265=$(PREFIX)/lib/libx265.so
LIBVPX=$(PREFIX)/lib/libvpx.so
LAME=$(PREFIX)/lib/libmp3lame.so
OPUS=$(PREFIX)/lib/libopus.so
AOM=$(PREFIX)/lib/libaom.so
ASS=$(PREFIX)/lib/libass.so
FREETYPE=$(PREFIX)/lib/libfreetype.so
FRIBIDI=$(PREFIX)/lib/libfribidi.so
FONTCONFIG=$(PREFIX)/lib/libfontconfig.so
BZIP=$(PREFIX)/lib/libbz2.a
PNG=$(PREFIX)/lib/libpng.so
ZLIB=$(PREFIX)/lib/libz.so
GETTEXT=$(PREFIX)/bin/gettext
AUTOCONF=$(PREFIX)/bin/autoconf
AUTOMAKE=$(PREFIX)/bin/automake
LIBXML=$(PREFIX)/lib/libxml2.so
BLURAY=$(PREFIX)/lib/libbluray.so
UDFREAD=$(PREFIX)/lib/libudfread.so
BS2B=$(PREFIX)/lib/libbs2b.so
SNDFILE=$(PREFIX)/lib/libsndfile.so
PKGCONFIG=$(PREFIX)/bin/pkg-config
LIBDRM=$(PREFIX)/lib/libdrm.so
PCIACCESS=$(PREFIX)/lib/libpciaccess.so
XORGMACRO=$(PREFIX)/share/pkgconfig/xorg-macros.pc
FDK_AAC=$(PREFIX)/lib/libfdk-aac.so
MYSOFA=$(PREFIX)/lib/libmysofa.so
OPENJPEG=$(PREFIX)/lib/libopenjp2.so
OPENMPT=$(PREFIX)/lib/libopenmpt.so
OGG=$(PREFIX)/lib/libogg.so
VORBIS=$(PREFIX)/lib/libvorbis.so
RUBBER=$(PREFIX)/lib/librubberband.so
SAMPLERATE=$(PREFIX)/lib/libsamplerate.so
FFTW=$(PREFIX)/lib/libfftw3.so
VAMP_SDK=$(PREFIX)/lib/libvamp-sdk.so
SRT=$(PREFIX)/lib/libsrt.so
OPENSSL=$(PREFIX)/lib/libssl.so
THEORA=$(PREFIX)/lib/libtheora.so
TWOLAME=$(PREFIX)/lib/libtwolame.so
VIDSTAB=$(PREFIX)/lib/libvidstab.so
WEBP=$(PREFIX)/lib/libwebp.so
PARANOIA=$(PREFIX)/lib/libcdio_paranoia.so
CDIO=$(PREFIX)/lib/libcdio.so
LIBVA=$(PREFIX)/lib/libva.so
MFX=$(PREFIX)/lib/libmfx.so
NVHEAD=$(PREFIX)/lib/pkgconfig/ffnvcodec.pc
ICD_LOADER=$(PREFIX)/lib/libOpenCL.so
FFMPEG=$(PREFIX)/bin/ffmpeg
#EOLibs
$(PREFIX)/.prefix:
mkdir -p "$(PREFIX)"
touch $@
$(DEPS): $(PREFIX)/.prefix
@echo Grabbing dependencies
sudo apt-get -y install \
autoconf \
automake \
build-essential \
git-core \
libtool \
pkg-config \
texinfo \
wget \
gperf \
gettext \
autopoint \
autogen \
python-minimal \
meson
touch "$@"
$(CMAKE): $(CURDIR)/cmake-3.15.0-Linux-x86_64.tar.gz
@echo Unpacking cmake
rm -rf $(CURDIR)/cmake-3.15.0-Linux-x86_64
tar xf $(CURDIR)/cmake-3.15.0-Linux-x86_64.tar.gz
touch $(CMAKE)
NASM_DIR := nasm
$(NASM_DIR)/config.status: $(DEPS)
@echo Configuring nasm
# workaround that "make install" wants manpages built but we don't want to install man building toolchain
touch $(NASM_DIR)/nasm.1 $(NASM_DIR)/ndisasm.1
cd $(NASM_DIR) && \
./autogen.sh && \
CFLAGS='-mtune=native' ./configure "--prefix=$(PREFIX)"
$(NASM): $(PREFIX)/.prefix $(NASM_DIR)/config.status
@echo Building nasm
$(MAKE) -C $(NASM_DIR) -j $(CORES) || $(MAKE) -C $(NASM_DIR)
$(MAKE) -C $(NASM_DIR) install
YASM_DIR := yasm-1.3.0
$(YASM_DIR)/config.status: $(DEPS) $(YASM_DIR).tar.gz
@echo Configuring yasm
rm -rf $(YASM_DIR)
tar xf $(YASM_DIR).tar.gz
cd $(YASM_DIR) && \
CFLAGS='-mtune=native' ./configure "--prefix=$(PREFIX)" --disable-dependency-tracking
$(YASM): $(PREFIX)/.prefix $(YASM_DIR)/config.status
@echo Building yasm
$(MAKE) -C $(YASM_DIR) -j $(CORES) || $(MAKE) -C $(YASM_DIR)
$(MAKE) -C $(YASM_DIR) install
LIBNUMA_DIR := $(CURDIR)/libnuma
$(LIBNUMA_DIR)/config.status: $(DEPS)
@echo Configuring libnuma
cd $(LIBNUMA_DIR) && \
./autogen.sh && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)" --disable-static --enable-shared
$(LIBNUMA): $(LIBNUMA_DIR)/config.status
@echo Building libnuma
$(MAKE) -C $(LIBNUMA_DIR) -j $(CORES) || $(MAKE) -C $(LIBNUMA_DIR)
$(MAKE) -C $(LIBNUMA_DIR) install
$(TOOLS): $(DEPS) $(YASM) $(NASM) $(LIBNUMA) $(PREFIX)/.prefix $(CMAKE)
touch "$@"
X264_DIR := $(CURDIR)/libx264
$(X264_DIR)/config.h: $(TOOLS)
@echo Configuring x264
cd $(X264_DIR) && \
./configure "--prefix=$(PREFIX)" --enable-shared --enable-pic "--extra-cflags=-mtune=$(TUNE_CPU)" --bit-depth=all --chroma-format=all
$(X264): $(X264_DIR)/config.h
@echo Building x264
$(MAKE) -C $(X264_DIR) -j $(CORES) || $(MAKE) -C $(X264_DIR)
$(MAKE) -C $(X264_DIR) install
X265_DIR := $(CURDIR)/libx265/build/linux
$(X265_DIR)/Makefile: $(TOOLS) $(LIBNUMA)
@echo Configuring x265
cd $(X265_DIR) && $(CMAKE) -G "Unix Makefiles" "-DCMAKE_INSTALL_PREFIX=$(PREFIX)" -DENABLE_SHARED=on ../../source -DENABLE_AGGRESSIVE_CHECKS=off -DENABLE_ASSEMBLY=on -DENABLE_HDR10_PLUS=on -DHIGH_BIT_DEPTH=on -DCMAKE_BUILD_TYPE=Release -DNATIVE_BUILD=on "-DNUMA_ROOT_DIR=$(PREFIX)" "-DNUMA_INCLUDE_DIR=$(PREFIX)/include" "-DNUMA_LIBRARY=$(LIBNUMA)" "-DNUMA_LIBRARY_DIR:PATH=$(PREFIX)/lib" -DENABLE_NUMA=on "-DCMAKE_REQUIRED_INCLUDES=$(PREFIX)/include" "-DCMAKE_REQUIRED_LINK_OPTIONS=-L$(PREFIX)/lib"
$(X265): $(X265_DIR)/Makefile
@echo Building x265
$(MAKE) -C $(X265_DIR) -j $(CORES) || $(MAKE) -C $(X265_DIR)
$(MAKE) -C $(X265_DIR) install
LIBVPX_DIR := $(CURDIR)/libvpx
$(LIBVPX_DIR)/config.mk: $(TOOLS)
@echo Configuring libvpx
cd $(LIBVPX_DIR) && \
./configure --prefix=$(PREFIX) --cpu=$(TUNE_CPU) --enable-pic --disable-examples --disable-unit-tests --as=yasm --disable-docs --enable-vp9-highbitdepth --enable-better-hw-compatibility --enable-vp8 --enable-vp9 --enable-postproc --enable-vp9-postproc --enable-vp9-temporal-denoising --enable-webm-io --enable-libyuv --disable-dependency-tracking --enable-shared --disable-static
$(LIBVPX): $(LIBVPX_DIR)/config.mk
@echo Building libvpx
$(MAKE) -C $(LIBVPX_DIR) -j $(CORES) || $(MAKE) -C $(LIBVPX_DIR)
$(MAKE) -C $(LIBVPX_DIR) install
LAME_DIR := $(CURDIR)/lame-3.100
$(LAME_DIR)/config.h: $(TOOLS) $(LAME_DIR).tar.gz
@echo Configuring lame
rm -rf $(LAME_DIR)
tar xf $(LAME_DIR).tar.gz
cd $(LAME_DIR) && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)" --enable-shared --disable-static --enable-nasm --disable-dependency-tracking --disable-frontend --with-pic
$(LAME): $(LAME_DIR)/config.h
@echo Building lame
$(MAKE) -C $(LAME_DIR) -j $(CORES) || $(MAKE) -C $(LAME_DIR)
$(MAKE) -C $(LAME_DIR) install
OPUS_DIR := $(CURDIR)/opus
$(OPUS_DIR)/config.h: $(TOOLS)
@echo Configuring opus
cd $(OPUS_DIR) && \
./autogen.sh && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)" --enable-shared --disable-static --disable-doc --disable-extra-programs --with-pic
$(OPUS): $(OPUS_DIR)/config.h
@echo Building opus
$(MAKE) -C $(OPUS_DIR) -j $(CORES) || $(MAKE) -C $(OPUS_DIR)
$(MAKE) -C $(OPUS_DIR) install
AOM_DIR := $(CURDIR)/aom
$(AOM_DIR)/aom_build/Makefile: $(TOOLS) $(CMAKE)
@echo Configuring aom
mkdir -p "$(AOM_DIR)/aom_build"
rm -f $@
cd $(AOM_DIR)/aom_build && \
$(CMAKE) -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DENABLE_SHARED=on -DENABLE_NASM=on .. -DBUILD_SHARED_LIBS=on -DCONFIG_PIC=on -DCONFIG_SHARED=on -DCONFIG_STATIC=no -DENABLE_EXAMPLES=off -DENABLE_TESTDATA=off -DENABLE_TESTS=off
$(AOM): $(AOM_DIR)/aom_build/Makefile
@echo Building aom
$(MAKE) -C $(AOM_DIR)/aom_build -j $(CORES) || $(MAKE) -C $(AOM_DIR)/aom_build
$(MAKE) -C $(AOM_DIR)/aom_build install
BZIP_DIR := $(CURDIR)/bzip2-1.0.6
$(BZIP): $(TOOLS) $(BZIP_DIR).tar.gz
@echo Building bzip
rm -rf $(BZIP_DIR)
tar xf $(BZIP_DIR).tar.gz
$(MAKE) -C $(BZIP_DIR) "PREFIX=$(PREFIX)" CC="gcc -fPIC" install
ZLIB_DIR := $(CURDIR)/zlib
$(ZLIB_DIR)/zconf.h: $(TOOLS)
@echo Configuring zlib
rm -f $@
cd $(ZLIB_DIR) && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)"
$(ZLIB): $(ZLIB_DIR)/zconf.h
@echo Building zlib
$(MAKE) -C $(ZLIB_DIR) -j $(CORES) || $(MAKE) -C $(ZLIB_DIR)
$(MAKE) -C $(ZLIB_DIR) install
PNG_DIR := $(CURDIR)/libpng
$(PNG_DIR)/config.h: $(TOOLS) $(ZLIB)
@echo Configuring libpng
rm -f $@
cd $(PNG_DIR) && \
CFLAGS="-mtune=$(TUNE_CPU) `pkg-config zlib --cflags`" LDFLAGS="`pkg-config zlib --libs`" CPPFLAGS="`pkg-config zlib --cflags`" ./configure "--prefix=$(PREFIX)" --enable-shared --disable-static --disable-dependency-tracking --enable-hardware-optimizations=yes --enable-intel-sse=yes
$(PNG): $(PNG_DIR)/config.h
@echo Building libpng
$(MAKE) -C $(PNG_DIR) -j $(CORES) || $(MAKE) -C $(PNG_DIR)
$(MAKE) -C $(PNG_DIR) install
FREETYPE_DIR := $(CURDIR)/freetype-2.10.2
$(FREETYPE_DIR)/builds/unix/ftconfig.h: $(TOOLS) $(FREETYPE_DIR).tar.gz $(BZIP) $(PNG)
@echo Configuring freetype
rm -rf $(FREETYPE_DIR)
tar xf $(FREETYPE_DIR).tar.gz
cd $(FREETYPE_DIR) && \
./autogen.sh && \
CFLAGS="-mtune=$(TUNE_CPU)" BZIP2_CFLAGS="-I$(PREFIX)/include" BZIP2_LIBS="-L$(PREFIX)/lib -lbz2" ./configure "--prefix=$(PREFIX)" --enable-shared --disable-static --with-zlib=no --with-bzip2=yes --with-png=yes
$(FREETYPE): $(FREETYPE_DIR)/builds/unix/ftconfig.h
@echo Building freetype
$(MAKE) -C $(FREETYPE_DIR) -j $(CORES) || $(MAKE) -C $(FREETYPE_DIR)
$(MAKE) -C $(FREETYPE_DIR) install
FRIBIDI_DIR := $(CURDIR)/fribidi
$(FRIBIDI_DIR)/config.h: $(TOOLS)
@echo Configuring fribidi
rm -f $@
cd $(FRIBIDI_DIR) && \
NOCONFIGURE=1 ./autogen.sh && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)" --enable-shared --disable-static --disable-deprecated
$(FRIBIDI): $(FRIBIDI_DIR)/config.h
@echo Building fribidi
$(MAKE) -C $(FRIBIDI_DIR) -j $(CORES) || $(MAKE) -C $(FRIBIDI_DIR)
$(MAKE) -C $(FRIBIDI_DIR) install
GETTEXT_DIR := $(CURDIR)/gettext-0.19.8
$(GETTEXT_DIR)/gettext-tools/config.h: $(TOOLS) $(GETTEXT_DIR).tar.gz
@echo Configuring gettext
rm -rf $(GETTEXT_DIR)
tar xf $(GETTEXT_DIR).tar.gz
cd $(GETTEXT_DIR) && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)" --enable-shared --disable-static --disable-dependency-tracking --disable-java --disable-native-java --disable-curses --without-git
$(GETTEXT): $(GETTEXT_DIR)/gettext-tools/config.h
@echo Building gettext
$(MAKE) -C $(GETTEXT_DIR) -j $(CORES) || $(MAKE) -C $(GETTEXT_DIR)
$(MAKE) -C $(GETTEXT_DIR) install
AUTOCONF_DIR := $(CURDIR)/autoconf-2.69
$(AUTOCONF_DIR)/Makefile: $(TOOLS) $(AUTOCONF_DIR).tar.gz
@echo Configuring autoconf
rm -rf $(AUTOCONF_DIR)
tar xf $(AUTOCONF_DIR).tar.gz
cd $(AUTOCONF_DIR) && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)"
$(AUTOCONF): $(AUTOCONF_DIR)/Makefile
@echo Building autoconf
$(MAKE) -C $(AUTOCONF_DIR) -j $(CORES) || $(MAKE) -C $(AUTOCONF_DIR)
$(MAKE) -C $(AUTOCONF_DIR) install
AUTOMAKE_DIR := $(CURDIR)/automake-1.16.1
$(AUTOMAKE_DIR)/Makefile: $(TOOLS) $(AUTOMAKE_DIR).tar.gz
@echo Configuring automake
rm -rf $(AUTOMAKE_DIR)
tar xf $(AUTOMAKE_DIR).tar.gz
cd $(AUTOMAKE_DIR) && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)"
$(AUTOMAKE): $(AUTOMAKE_DIR)/Makefile
@echo Building automake
$(MAKE) -C $(AUTOMAKE_DIR) -j $(CORES) || $(MAKE) -C $(AUTOMAKE_DIR)
$(MAKE) -C $(AUTOMAKE_DIR) install
LIBXML_DIR := $(CURDIR)/libxml2
$(LIBXML_DIR)/config.h: $(TOOLS)
@echo Configuring libxml
rm -f $@
cd $(LIBXML_DIR) && \
libtoolize && \
CFLAGS="-mtune=$(TUNE_CPU)" ./autogen.sh "--prefix=$(PREFIX)" --disable-dependency-tracking --with-python=no
$(LIBXML): $(LIBXML_DIR)/config.h
@echo Building libxml
$(MAKE) -C $(LIBXML_DIR) -j $(CORES) || $(MAKE) -C $(LIBXML_DIR)
$(MAKE) -C $(LIBXML_DIR) install
FONTCONFIG_DIR := $(CURDIR)/fontconfig
$(FONTCONFIG_DIR)/config.h: $(TOOLS) $(GETTEXT) $(AUTOCONF) $(AUTOMAKE) $(LIBXML)
@echo Configuring fontconfig
rm -f $@
cd $(FONTCONFIG_DIR) && \
CFLAGS="-mtune=$(TUNE_CPU)" ./autogen.sh "--prefix=$(PREFIX)" --enable-shared --disable-static --disable-dependency-tracking --disable-docs --enable-libxml2
$(FONTCONFIG): $(FONTCONFIG_DIR)/config.h
@echo Building fontconfig
$(MAKE) -C $(FONTCONFIG_DIR) -j $(CORES) || $(MAKE) -C $(FONTCONFIG_DIR)
$(MAKE) -C $(FONTCONFIG_DIR) install
ASS_DIR := $(CURDIR)/libass
$(ASS_DIR)/config.h: $(TOOLS) $(FREETYPE) $(FRIBIDI) $(FONTCONFIG)
@echo Configuring libass
rm -f $@
cd $(ASS_DIR) && ./autogen.sh && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)" --enable-shared --disable-static --disable-dependency-tracking --with-pic
$(ASS): $(ASS_DIR)/config.h
@echo Building libass
$(MAKE) -C $(ASS_DIR) -j $(CORES) || $(MAKE) -C $(ASS_DIR)
$(MAKE) -C $(ASS_DIR) install
UDFREAD_DIR:= $(CURDIR)/libudfread
$(UDFREAD_DIR)/config.h: $(TOOLS)
@echo Configuring udfread
rm -f $@
cd $(UDFREAD_DIR) && ./bootstrap && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)"
$(UDFREAD): $(UDFREAD_DIR)/config.h
@echo Building udfread
$(MAKE) -C $(UDFREAD_DIR) -j $(CORES) || $(MAKE) -C $(UDFREAD_DIR)
$(MAKE) -C $(UDFREAD_DIR) install
BLURAY_DIR := $(CURDIR)/libbluray
$(BLURAY_DIR)/config.h: $(TOOLS) $(UDFREAD)
@echo Configuring bluray
rm -f $@
cd $(BLURAY_DIR) && git submodule update --init --recursive
cd $(BLURAY_DIR) && ./bootstrap && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)" --enable-shared --disable-static --disable-dependency-tracking --disable-bdjava-jar
$(BLURAY): $(BLURAY_DIR)/config.h
@echo Building bluray
$(MAKE) -C $(BLURAY_DIR) -j $(CORES) || $(MAKE) -C $(BLURAY_DIR)
$(MAKE) -C $(BLURAY_DIR) install
PKGCONFIG_DIR := $(CURDIR)/pkg-config-0.27.1
$(PKGCONFIG_DIR)/config.h: $(TOOLS) $(PKGCONFIG_DIR).tar.gz
@echo Configuring pkg-config
rm -rf $(PKGCONFIG_DIR)
tar xf $(PKGCONFIG_DIR).tar.gz
cd $(PKGCONFIG_DIR) && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)" --enable-shared --disable-static --disable-dependency-tracking --with-internal-glib
$(PKGCONFIG): $(PKGCONFIG_DIR)/config.h
@echo Building pkg-config
$(MAKE) -C $(PKGCONFIG_DIR) -j $(CORES) || $(MAKE) -C $(PKGCONFIG_DIR)
$(MAKE) -C $(PKGCONFIG_DIR) install
SNDFILE_DIR := $(CURDIR)/libsndfile
$(SNDFILE_DIR)/src/config.h: $(TOOLS) $(PKGCONFIG)
@echo Configuring sndfile
rm -f $@
cd $(SNDFILE_DIR) && ./autogen.sh && \
CFLAGS="-mtune=$(TUNE_CPU)" CPPFLAGS="-I$(PREFIX)/include" ./configure "--prefix=$(PREFIX)" --enable-shared --disable-static --disable-dependency-tracking --disable-full-suite
$(SNDFILE): $(SNDFILE_DIR)/src/config.h
@echo Building sndfile
$(MAKE) -C $(SNDFILE_DIR) -j $(CORES) || $(MAKE) -C $(SNDFILE_DIR)
$(MAKE) -C $(SNDFILE_DIR) install
BS2B_DIR := $(CURDIR)/libbs2b
$(BS2B_DIR)/Makefile: $(TOOLS) $(SNDFILE)
@echo Configuring bs2b
rm -f $@
cd $(BS2B_DIR) && ./autogen.sh && \
CFLAGS="-mtune=$(TUNE_CPU)" CPPFLAGS="-I$(PREFIX)/include" LDFLAGS="-L$(PREFIX)/lib" ./configure "--prefix=$(PREFIX)" --enable-shared --disable-static --disable-dependency-tracking
$(BS2B): $(BS2B_DIR)/Makefile
@echo Building bs2db
$(MAKE) -C $(BS2B_DIR) -j $(CORES) || $(MAKE) -C $(BS2B_DIR)
$(MAKE) -C $(BS2B_DIR) install
XORGMACRO_DIR := $(CURDIR)/xorg-macros
$(XORGMACRO_DIR)/Makefile: $(TOOLS)
@echo Configuring xorg-macro
rm -f $@
cd $(XORGMACRO_DIR) && NOCONFIGURE=1 ./autogen.sh && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)"
$(XORGMACRO): $(XORGMACRO_DIR)/Makefile
@echo Building xorg-macro
$(MAKE) -C $(XORGMACRO_DIR) -j $(CORES) || $(MAKE) -C $(XORGMACRO_DIR)
$(MAKE) -C $(XORGMACRO_DIR) install
PCIACCESS_DIR := $(CURDIR)/xorg-libpciaccess
$(PCIACCESS_DIR)/config.h: $(TOOLS) $(XORGMACRO)
@echo Configuring pciaccess
rm -f $@
cd $(PCIACCESS_DIR) && NOCONFIGURE=1 ./autogen.sh && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)" --disable-dependency-tracking --disable-static
$(PCIACCESS): $(PCIACCESS_DIR)/config.h
@echo Building pciaccess
$(MAKE) -C $(PCIACCESS_DIR) -j $(CORES) || $(MAKE) -C $(PCIACCESS_DIR)
$(MAKE) -C $(PCIACCESS_DIR) install
LIBDRM_DIR := $(CURDIR)/libdrm
$(LIBDRM_DIR)/config.h: $(TOOLS) $(PCIACCESS)
@echo Configuring libdrm
cd $(LIBDRM_DIR) && \
meson build --prefix "$(PREFIX)"
$(LIBDRM): $(LIBDRM_DIR)/config.h
@echo Building libdrm
ninja -C $(LIBDRM_DIR)/build install
FDK_AAC_DIR := $(CURDIR)/fdk-aac
$(FDK_AAC_DIR)/Makefile: $(TOOLS)
@echo Configuring fdk-aac
rm -f $@
cd $(FDK_AAC_DIR) && libtoolize && ./autogen.sh && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)" --disable-dependency-tracking --disable-static --disable-example
$(FDK_AAC): $(FDK_AAC_DIR)/Makefile
@echo Building fdk-aac
$(MAKE) -C $(FDK_AAC_DIR) -j $(CORES) || $(MAKE) -C $(FDK_AAC_DIR)
$(MAKE) -C $(FDK_AAC_DIR) install
MYSOFA_DIR := $(CURDIR)/libmysofa
$(MYSOFA_DIR)/build/Makefile: $(TOOLS)
@echo Configuring mysofa
rm -f $@
cd $(MYSOFA_DIR)/build && \
$(CMAKE) -DCMAKE_BUILD_TYPE=Release .. -DBUILD_TESTS=off -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DCMAKE_INSTALL_LIBDIR=lib
$(MYSOFA): $(MYSOFA_DIR)/build/Makefile
@echo Building mysofa
$(MAKE) -C $(MYSOFA_DIR)/build -j $(CORES) || $(MAKE) -C $(MYSOFA_DIR)/build
$(MAKE) -C $(MYSOFA_DIR)/build install
OPENJPEG_DIR := $(CURDIR)/openjpeg
$(OPENJPEG_DIR)/build/Makefile: $(TOOLS)
@echo Configuring openjpeg
mkdir -p $(OPENJPEG_DIR)/build
cd $(OPENJPEG_DIR)/build && \
$(CMAKE) .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DCMAKE_INSTALL_LIBDIR=lib
$(OPENJPEG): $(OPENJPEG_DIR)/build/Makefile
@echo Building openjpeg
$(MAKE) -C $(OPENJPEG_DIR)/build -j $(CORES) || $(MAKE) -C $(OPENJPEG_DIR)/build
$(MAKE) -C $(OPENJPEG_DIR)/build install
OGG_DIR := $(CURDIR)/libogg
$(OGG_DIR)/config.h: $(TOOLS)
@echo Configuring libogg
rm -f $@
cd $(OGG_DIR) && \
CFLAGS="-mtune=$(TUNE_CPU)" ./autogen.sh "--prefix=$(PREFIX)" --disable-dependency-tracking --disable-static
$(OGG): $(OGG_DIR)/config.h
@echo Building ogg
$(MAKE) -C $(OGG_DIR) -j $(CORES) || $(MAKE) -C $(OGG_DIR)
$(MAKE) -C $(OGG_DIR) install
VORBIS_DIR := $(CURDIR)/vorbis
$(VORBIS_DIR)/config.h: $(TOOLS)
@echo Configuring vorbis
rm -f $@
cd $(VORBIS_DIR) && ./autogen.sh && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)" --disable-dependency-tracking --disable-static --disable-docs --disable-examples --disable-oggtest
$(VORBIS): $(VORBIS_DIR)/config.h
@echo Building vorbis
$(MAKE) -C $(VORBIS_DIR) -j $(CORES) || $(MAKE) -C $(VORBIS_DIR)
$(MAKE) -C $(VORBIS_DIR) install
OPENMPT_DIR := $(CURDIR)/libopenmpt-0.4.12+release.autotools
$(OPENMPT_DIR)/config.h: $(TOOLS) $(OPENMPT_DIR).tar.gz $(OGG) $(VORBIS)
@echo Configuring openmpt
rm -rf $(OPENMPT_DIR)
tar xf $(OPENMPT_DIR).tar.gz
cd "$(OPENMPT_DIR)" && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)" --disable-dependency-tracking --disable-static --disable-examples --disable-openmpt123 --disable-tests --disable-doxygen-doc --without-mpg123
$(OPENMPT): $(OPENMPT_DIR)/config.h
@echo Building openmpt
$(MAKE) -C $(OPENMPT_DIR) -j $(CORES) || $(MAKE) -C $(OPENMPT_DIR)
$(MAKE) -C $(OPENMPT_DIR) install
FFTW_DIR := $(CURDIR)/fftw-3.3.8
$(FFTW_DIR)/config.h: $(TOOLS) $(FFTW_DIR).tar.gz
@echo Configuring fftw
rm -rf $(FFTW_DIR)
tar xf $(FFTW_DIR).tar.gz
cd $(FFTW_DIR) && ./bootstrap.sh && \
CXXFLAGS="-mtune=$(TUNE_CPU)" CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)" --disable-dependency-tracking --enable-shared --disable-static --disable-doc --enable-sse2 --enable-avx --enable-avx2 --enable-fma --disable-fortran
$(FFTW): $(FFTW_DIR)/config.h
@echo Building fftw
$(MAKE) -C $(FFTW_DIR) -j $(CORES) || $(MAKE) -C $(FFTW_DIR)
$(MAKE) -C $(FFTW_DIR) install
SAMPLERATE_DIR := $(CURDIR)/libsamplerate
$(SAMPLERATE_DIR)/Makefile: $(TOOLS) $(FFTW)
@echo Configuring samplerate
rm -f $@
cd $(SAMPLERATE_DIR) && libtoolize && ./autogen.sh && \
FFTW3_CFLAGS="`pkg-config fftw3 --cflags`" CFLAGS="-mtune=$(TUNE_CPU)" FFTW3_LIBS="`pkg-config fftw3 --libs`" ./configure "--prefix=$(PREFIX)" --disable-dependency-tracking --enable-shared --disable-static --enable-fftw
$(SAMPLERATE): $(SAMPLERATE_DIR)/Makefile
@echo Building samplerate
$(MAKE) -C $(SAMPLERATE_DIR) -j $(CORES) || $(MAKE) -C $(SAMPLERATE_DIR)
$(MAKE) -C $(SAMPLERATE_DIR) install
VAMP_SDK_DIR := $(CURDIR)/vamp-plugin-sdk-2.7.1
$(VAMP_SDK_DIR)/Makefile: $(TOOLS) $(VAMP_SDK_DIR).tar.gz
@echo Configuring vamp-sdk
rm -rf $(VAMP_SDK_DIR)
tar xf $(VAMP_SDK_DIR).tar.gz
cd $(VAMP_SDK_DIR) && \
SNDFILE_LIBS="-L$(PREFIX)/lib -lsndfile" SNDFILE_CFLAGS="-I$(PREFIX)/include" CFLAGS="-mtune=$(TUNE_CPU)" ./configure "--prefix=$(PREFIX)" --disable-programs
$(VAMP_SDK): $(VAMP_SDK_DIR)/Makefile
@echo Building vamp-sdk
$(MAKE) -C $(VAMP_SDK_DIR) -j $(CORES) || $(MAKE) -C $(VAMP_SDK_DIR)
$(MAKE) -C $(VAMP_SDK_DIR) install
RUBBER_DIR := $(CURDIR)/rubberband-1.8.2
LADSPA_DIR := $(CURDIR)/ladspa_sdk
$(RUBBER_DIR)/Makefile: $(TOOLS) $(RUBBER_DIR).tar.bz2 $(SAMPLERATE) $(FFTW) $(VAMP_SDK) $(LADSPA_DIR).tgz
@echo Configuring rubberband
rm -rf $(RUBBER_DIR) $(LADSPA_DIR)
tar xf $(RUBBER_DIR).tar.bz2
tar xf $(LADSPA_DIR).tgz
cd $(RUBBER_DIR) && \
CPPFLAGS="-I$(LADSPA_DIR)/src" FFTW_CFLAGS="`pkg-config fftw3 --cflags`" FFTW_LIBS="`pkg-config fftw3 --libs`" CFLAGS="-mtune=$(TUNE_CPU) -I$(LADSPA_DIR)/src" CXXFLAGS="-mtune=$(TUNE_CPU) -I$(LADSPA_DIR)/src" ./configure "--prefix=$(PREFIX)"
$(RUBBER): $(RUBBER_DIR)/Makefile
@echo Building rubberband
$(MAKE) -C $(RUBBER_DIR) -j $(CORES) || $(MAKE) -C $(RUBBER_DIR)
touch $(RUBBER_DIR)/lib/librubberband-jni.so
$(MAKE) -C $(RUBBER_DIR) install
OPENSSL_DIR := $(CURDIR)/openssl
$(OPENSSL_DIR)/Makefile: $(TOOLS)
@echo Configuring openssl
rm -f $@
cd $(OPENSSL_DIR) && \
./Configure --prefix=$(PREFIX) --openssldir=$(PREFIX) shared linux-x86_64
$(OPENSSL): $(OPENSSL_DIR)/Makefile
@echo Building opennsl
$(MAKE) -C $(OPENSSL_DIR) -j $(CORES) || $(MAKE) -C $(OPENSSL_DIR)
$(MAKE) -C $(OPENSSL_DIR) install
SRT_DIR := $(CURDIR)/srt
$(SRT_DIR)/build/Makefile: $(TOOLS) $(CMAKE) $(OPENSSL)
@echo Configuring srt
mkdir -p $(SRT_DIR)/build
rm -f $@
cd $(SRT_DIR)/build && \
$(CMAKE) -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DCMAKE_INSTALL_LIBDIR=lib .. -DUSE_OPENSSL_PC=OFF -DENABLE_STATIC=OFF -DENABLE_APPS=OFF -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_INCLUDEDIR=include
$(SRT): $(SRT_DIR)/build/Makefile
@echo Building srt
$(MAKE) -C $(SRT_DIR)/build -j $(CORES) || $(MAKE) -C $(SRT_DIR)/build
$(MAKE) -C $(SRT_DIR)/build install
THEORA_DIR := $(CURDIR)/libtheora-1.1.1
$(THEORA_DIR)/config.h: $(TOOLS) $(THEORA_DIR).tar.bz2
@echo Configuring theora
rm -rf $(THEORA_DIR)
tar xf $(THEORA_DIR).tar.bz2
cd $(THEORA_DIR) && libtoolize && \
CFLAGS="-mtune=$(TUNE_CPU)" ./autogen.sh --prefix=$(PREFIX) --disable-dependency-tracking --disable-static --disable-oggtest --disable-vorbistest --disable-sdltest --disable-examples
$(THEORA): $(THEORA_DIR)/config.h
@echo Building theora
$(MAKE) -C $(THEORA_DIR) -j $(CORES) || $(MAKE) -C $(THEORA_DIR)
$(MAKE) -C $(THEORA_DIR) install
TWOLAME_DIR := $(CURDIR)/twolame
$(TWOLAME_DIR)/Makefile: $(TOOLS)
@echo Configuring twolame
rm -f $@
cd $(TWOLAME_DIR) && NOCONFIGURE=1 ./autogen.sh && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure --prefix=$(PREFIX) --disable-dependency-tracking --disable-static
# hack to disable building docs, as they fail the build in non-maintaner mode
echo 'all:' > $(TWOLAME_DIR)/doc/Makefile
echo 'install:' >> $(TWOLAME_DIR)/doc/Makefile
$(TWOLAME): $(TWOLAME_DIR)/Makefile
@echo Building twolame
$(MAKE) -C $(TWOLAME_DIR) -j $(CORES) || $(MAKE) -C $(TWOLAME_DIR)
$(MAKE) -C $(TWOLAME_DIR) install
VIDSTAB_DIR := $(CURDIR)/vid.stab
$(VIDSTAB_DIR)/build/Makefile: $(TOOLS) $(CMAKE)
@echo Configuring vidstab
rm -f $@
mkdir -p $(VIDSTAB_DIR)/build
cd $(VIDSTAB_DIR)/build && \
$(CMAKE) -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(PREFIX) ..
$(VIDSTAB): $(VIDSTAB_DIR)/build/Makefile
@echo Building vidstab
$(MAKE) -C $(VIDSTAB_DIR)/build -j $(CORES) || $(MAKE) -C $(VIDSTAB_DIR)/build
$(MAKE) -C $(VIDSTAB_DIR)/build install
touch $@
WEBP_DIR := $(CURDIR)/libwebp
$(WEBP_DIR)/Makefile: $(TOOLS)
@echo Configuring webp
rm -f $@
cd $(WEBP_DIR) && libtoolize && NOCONFIGURE=1 ./autogen.sh && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure --prefix=$(PREFIX) --disable-dependency-tracking --disable-static --enable-libwebpdecoder --enable-libwebpextras --enable-libwebpmux
$(WEBP): $(WEBP_DIR)/Makefile
@echo Building webp
$(MAKE) -C $(WEBP_DIR) -j $(CORES) || $(MAKE) -C $(WEBP_DIR)
$(MAKE) -C $(WEBP_DIR) install
CDIO_DIR := $(CURDIR)/libcdio
$(CDIO_DIR)/config.h: $(TOOLS)
@echo Configuring cdio
rm -f $@
cd $(CDIO_DIR) && libtoolize && \
CFLAGS="-mtune=$(TUNE_CPU)" ./autogen.sh --prefix=$(PREFIX) --disable-cpp-progs --disable-example-progs --disable-dependency-tracking --disable-static --without-cd-drive --without-cd-info --without-cdda-player --without-iso-info --without-iso-read
$(CDIO): $(CDIO_DIR)/config.h
@echo Building cdio
$(MAKE) -C $(CDIO_DIR) -j $(CORES) || $(MAKE) -C $(CDIO_DIR)
# workaround for buggy makefile trying to copy a man without building it
touch $(CDIO_DIR)/src/cd-read.1
$(MAKE) -C $(CDIO_DIR) install
PARANOIA_DIR := $(CURDIR)/libcdio-paranoia
$(PARANOIA_DIR)/config.h: $(TOOLS) $(CDIO)
@echo Configuring cdio-paranoia
rm -f $@
cd $(PARANOIA_DIR) && libtoolize && \
CFLAGS="-mtune=$(TUNE_CPU)" ./autogen.sh --prefix=$(PREFIX) --disable-example-progs --disable-dependency-tracking --disable-static
$(PARANOIA): $(PARANOIA_DIR)/config.h
@echo Building cdio-paranoia
$(MAKE) -C $(PARANOIA_DIR) -j $(CORES) || $(MAKE) -C $(PARANOIA_DIR)
$(MAKE) -C $(PARANOIA_DIR) install
LIBVA_DIR := $(CURDIR)/libva
$(LIBVA_DIR)/config.h: $(TOOLS)
@echo Configuring libva
rm -f $@
cd $(LIBVA_DIR) && libtoolize && NOCONFIGURE=1 ./autogen.sh && \
CFLAGS="-mtune=$(TUNE_CPU)" ./configure --prefix=$(PREFIX) --disable-x11 --disable-glx --disable-wayland --disable-static --disable-dependency-tracking
$(LIBVA): $(LIBVA_DIR)/config.h
@echo Building libva
$(MAKE) -C $(LIBVA_DIR) -j $(CORES) || $(MAKE) -C $(LIBVA_DIR)
$(MAKE) -C $(LIBVA_DIR) install
MFX_DIR := $(CURDIR)/MediaSDK
$(MFX_DIR)/build/Makefile: $(TOOLS) $(CMAKE) $(LIBVA)
@echo Configuring mfx
rm -f $@
mkdir -p $(MFX_DIR)/build
cd $(MFX_DIR)/build && \
$(CMAKE) -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(PREFIX) .. -DBUILD_SAMPLES=OFF -DENABLE_OPENCL=OFF
$(MFX): $(MFX_DIR)/build/Makefile
@echo Building mfx
$(MAKE) -C $(MFX_DIR)/build -j $(CORES) || $(MAKE) -C $(MFX_DIR)/build
$(MAKE) -C $(MFX_DIR)/build install
NVHEAD_DIR := $(CURDIR)/nv-codec-headers
$(NVHEAD): $(TOOLS)
@echo Building nv-headers
$(MAKE) -C $(NVHEAD_DIR) PREFIX=$(PREFIX)
$(MAKE) -C $(NVHEAD_DIR) PREFIX=$(PREFIX) install
ICD_LOADER_DIR := $(CURDIR)/OpenCL-ICD-Loader
$(ICD_LOADER_DIR)/build/Makefile: $(TOOLS) $(CMAKE)
@echo Configuring ICD loader
rm -f $@
mkdir -p $(ICD_LOADER_DIR)/build
cd $(ICD_LOADER_DIR)/build && \
$(CMAKE) -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(PREFIX) .. -DOPENCL_ICD_LOADER_HEADERS_DIR=$(CURDIR)/OpenCL-Headers
$(ICD_LOADER): $(ICD_LOADER_DIR)/build/Makefile
@echo Building ICD loader
$(MAKE) -C $(ICD_LOADER_DIR)/build -j $(CORES) || $(MAKE) -C $(ICD_LOADER_DIR)/build
$(MAKE) -C $(ICD_LOADER_DIR)/build install
touch $@
FFMPEG_DIR := $(CURDIR)/ffmpeg
$(FFMPEG_DIR)/config.h: $(TOOLS) $(AOM) $(ASS) $(BLURAY) $(BS2B) $(LIBDRM) $(MFX) $(LAME) $(MYSOFA) $(OPENJPEG) $(OPENMPT) $(OPUS) $(RUBBER) $(SRT) $(THEORA) $(TWOLAME) $(VIDSTAB) $(LIBVPX) $(WEBP) $(X264) $(X265) $(ICD_LOADER) $(PARANOIA) $(NVHEAD) $(FDK_AAC)
@echo Configuring ffmpeg
rm -f $@
cd "$(FFMPEG_DIR)" && \
./configure --prefix="${PREFIX}" \
--extra-cflags="-I${PREFIX}/include -mtune=${TUNE_CPU} -I$(CURDIR)/OpenCL-Headers/" \
'--extra-ldflags=-L${PREFIX}/lib -Wl,-rpath=\\\$$\$$ORIGIN/../lib -Wl,-z,origin -Wl,-rpath-link=$(PREFIX)/lib' \
--extra-libs="-lpthread -lm" --enable-gpl --enable-version3 \
${NONFREE} --enable-libaom --enable-libass --enable-libbluray \
--enable-libbs2b --enable-libcdio --enable-libfontconfig \
--enable-libfreetype --enable-libfribidi --enable-libmp3lame \
--enable-libopenjpeg --enable-libopenmpt --enable-libopus \
--enable-librubberband --enable-libtheora \
--enable-libtwolame --enable-libvidstab --enable-libvpx --enable-libwebp \
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libmysofa \
--enable-libdrm --enable-vaapi --enable-libmfx --enable-nvdec --enable-nvenc \
--enable-opencl --enable-ffnvcodec \
--cpu="${TUNE_CPU}" --x86asmexe=nasm \
--enable-asm --enable-mmx --enable-mmxext --enable-sse --enable-sse2 \
--enable-sse3 --enable-ssse3 --enable-sse4 --enable-sse42 --enable-avx \
--enable-avx2 --disable-fast-unaligned --enable-hwaccel=h264_nvdec \
--enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_nvdec \
--enable-hwaccel=hevc_vaapi --enable-hwaccel=vp8_nvdec \
--enable-hwaccel=vp8_vaapi --enable-hwaccel=vp9_nvdec \
--enable-hwaccel=vp9_vaapi --enable-encoder=h264_nvenc \
--enable-encoder=h264_vaapi --enable-encoder=hevc_nvenc \
--enable-encoder=hevc_vaapi --enable-encoder=mpeg2_vaapi \
--enable-encoder=nvenc --enable-encoder=nvenc_h264 \
--enable-encoder=nvenc_hevc --enable-encoder=vp9_vaapi
$(FFMPEG): $(FFMPEG_DIR)/config.h
@echo Building ffmpeg
$(MAKE) -C $(FFMPEG_DIR) -j $(CORES) || $(MAKE) -C $(FFMPEG_DIR)
$(MAKE) -C $(FFMPEG_DIR) install
all: $(FFMPEG)
PACKAGE := $(CURDIR)/ffmpeg.tgz
$(PACKAGE): $(FFMPEG)
tar czvf $(PACKAGE) -C $(PREFIX) bin/ffmpeg bin/ffprobe `ldd $(FFMPEG) $(PREFIX)/bin/ffprobe | awk '{print $$3}' | grep $(PREFIX) | sort -u | xargs -n 1 $(CURDIR)/expand-links.sh | sed -e "s:^$(PREFIX)/::g"`
package: $(PACKAGE)
clean:
cd $(NASM_DIR) && git clean -fxd
rm -rf $(YASM_DIR)
rm -rf $(PREFIX)
cd $(LIBNUMA_DIR) && git clean -fxd
cd $(X264_DIR) && git clean -fxd
cd $(X265_DIR) && git clean -fxd
cd $(LIBVPX_DIR) && git clean -fxd
rm -rf $(LAME_DIR)
cd $(OPUS_DIR) && git clean -fxd
cd $(AOM_DIR) && git clean -fxd
rm -rf $(BZIP_DIR)
cd $(ZLIB_DIR) && git clean -fxd && git reset --hard
cd $(PNG_DIR) && git clean -fxd
rm -rf $(FREETYPE_DIR)
cd $(FRIBIDI_DIR) && git clean -fxd
rm -rf $(GETTEXT_DIR)
rm -rf $(AUTOCONF_DIR)
rm -rf $(AUTOMAKE_DIR)
cd $(LIBXML_DIR) && git clean -fxd
cd $(FONTCONFIG_DIR) && git clean -fxd && git reset --hard
cd $(ASS_DIR) && git clean -fxd
cd $(UDFREAD_DIR) && git clean -fxd
cd $(BLURAY_DIR) && git clean -fxd
rm -rf $(PKGCONFIG_DIR)
cd $(SNDFILE_DIR) && git clean -fxd
cd $(BS2B_DIR) && git clean -fxd
cd $(XORGMACRO_DIR) && git clean -fxd
cd $(PCIACCESS_DIR) && git clean -fxd
cd $(LIBDRM_DIR) && git clean -fxd
cd $(MYSOFA_DIR) && git clean -fxd
cd $(OPENJPEG_DIR) && git clean -fxd
cd $(OGG_DIR) && git clean -fxd
cd $(VORBIS_DIR) && git clean -fxd
rm -rf $(OPENMPT_DIR)
rm -rf $(FFTW_DIR)
cd $(SAMPLERATE_DIR) && git clean -fxd
rm -rf $(VAMP_SDK_DIR)
rm -rf $(RUBBER_DIR) $(LADSPA_DIR)
cd $(OPENSSL_DIR) && git clean -fxd
cd $(SRT_DIR) && git clean -fxd
rm -rf $(THEORA_DIR)
cd $(TWOLAME_DIR) && git clean -fxd
cd $(VIDSTAB_DIR) && git clean -fxd
cd $(WEBP_DIR) && git clean -fxd
cd $(CDIO_DIR) && git clean -fxd
cd $(PARANOIA_DIR) && git clean -fxd
cd $(LIBVA_DIR) && git clean -fxd
cd $(MFX_DIR) && git clean -fxd
cd $(NVHEAD_DIR) && git clean -fxd
cd $(ICD_LOADER_DIR) && git clean -fxd
cd $(FFMPEG_DIR) && git clean -fxd
rm -rf $(DEPS) $(TOOLS)
.PHONY: all clean package
.SILENT:
.DEFAULT_GOAL := all