From e07a675f71e7b784aef57fe86ffca01c7365d07e Mon Sep 17 00:00:00 2001 From: Johann <johannkoenig@google.com> Date: Wed, 10 Jan 2018 12:47:44 -0800 Subject: [PATCH] remove configure and Makefiles Change-Id: I32b2ce4839c359891841385467cf532b1ebe4a59 --- CMakeLists.txt | 3 +- README | 172 ---- aom/aom_codec.mk | 43 - aom_dsp/aom_dsp.mk | 409 --------- aom_mem/aom_mem.mk | 4 - aom_ports/aom_ports.mk | 29 - aom_scale/aom_scale.mk | 16 - aom_util/aom_util.mk | 18 - aomdec.c | 6 +- aomenc.c | 6 +- av1/av1_common.mk | 162 ---- av1/av1_cx.mk | 161 ---- av1/av1_dx.mk | 48 - build/cmake/aom_configure.cmake | 3 +- build/make/Android.mk | 194 ---- build/make/Makefile | 466 ---------- build/make/armlink_adapter.sh | 53 -- build/make/configure.sh | 1521 ------------------------------- build/make/gen_asm_deps.sh | 65 -- build/make/gen_msvs_def.sh | 82 -- build/make/gen_msvs_sln.sh | 257 ------ build/make/gen_msvs_vcxproj.sh | 477 ---------- build/make/iosbuild.sh | 1 + build/make/msvs_common.sh | 114 --- build/make/version.sh | 79 -- configure | 912 ------------------ docs.mk | 50 - examples.mk | 406 --------- examples/analyzer.cc | 4 +- libs.mk | 582 ------------ mainpage.dox | 6 +- solution.mk | 33 - test/android/Android.mk | 58 -- test/test-data.mk | 46 - test/test.mk | 243 ----- tools.mk | 126 --- tools/build_inspector.sh | 49 - 37 files changed, 15 insertions(+), 6889 deletions(-) delete mode 100644 README delete mode 100644 aom/aom_codec.mk delete mode 100644 aom_dsp/aom_dsp.mk delete mode 100644 aom_mem/aom_mem.mk delete mode 100644 aom_ports/aom_ports.mk delete mode 100644 aom_scale/aom_scale.mk delete mode 100644 aom_util/aom_util.mk delete mode 100644 av1/av1_common.mk delete mode 100644 av1/av1_cx.mk delete mode 100644 av1/av1_dx.mk delete mode 100644 build/make/Android.mk delete mode 100644 build/make/Makefile delete mode 100755 build/make/armlink_adapter.sh delete mode 100644 build/make/configure.sh delete mode 100755 build/make/gen_asm_deps.sh delete mode 100755 build/make/gen_msvs_def.sh delete mode 100755 build/make/gen_msvs_sln.sh delete mode 100755 build/make/gen_msvs_vcxproj.sh delete mode 100644 build/make/msvs_common.sh delete mode 100755 build/make/version.sh delete mode 100755 configure delete mode 100644 docs.mk delete mode 100644 examples.mk delete mode 100644 libs.mk delete mode 100644 solution.mk delete mode 100644 test/android/Android.mk delete mode 100644 test/test-data.mk delete mode 100644 test/test.mk delete mode 100644 tools.mk delete mode 100755 tools/build_inspector.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 56a47379e5..92b2ec8cbd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -544,8 +544,7 @@ if (XCODE) endif () if (ENABLE_EXAMPLES AND "${CMAKE_GENERATOR}" MATCHES "Makefiles$") - # Users of the configure build expect the example targets to be built in the - # examples sub directory of the configured build directory after running make. + # For historical purposes place the example binaries in the example directory. file(MAKE_DIRECTORY "${AOM_CONFIG_DIR}/examples") foreach (target ${AOM_EXAMPLE_TARGETS}) diff --git a/README b/README deleted file mode 100644 index 983a713437..0000000000 --- a/README +++ /dev/null @@ -1,172 +0,0 @@ -README - 9 March 2017 - -*************************** -DEPRECATED -- SEE README.md -*************************** - -Welcome to the AV1 Codec SDK! - -COMPILING THE APPLICATIONS/LIBRARIES: - The build system used is similar to autotools. Building generally consists of - "configuring" with your desired build options, then using GNU make to build - the application. - - 1. Prerequisites - - * All x86 targets require the Yasm[1] assembler be installed. - * All Windows builds require that Cygwin[2] be installed. - * Building the documentation requires Doxygen[3]. If you do not - have this package, the install-docs option will be disabled. - * Downloading the data for the unit tests requires curl[4] and sha1sum. - sha1sum is provided via the GNU coreutils, installed by default on - many *nix platforms, as well as MinGW and Cygwin. If coreutils is not - available, a compatible version of sha1sum can be built from - source[5]. These requirements are optional if not running the unit - tests. - - [1]: http://www.tortall.net/projects/yasm - [2]: http://www.cygwin.com - [3]: http://www.doxygen.org - [4]: http://curl.haxx.se - [5]: http://www.microbrew.org/tools/md5sha1sum/ - - 2. Out-of-tree builds - Out of tree builds are a supported method of building the application. For - an out of tree build, the source tree is kept separate from the object - files produced during compilation. For instance: - - $ mkdir build - $ cd build - $ ../libaom/configure <options> - $ make - - 3. Configuration options - The 'configure' script supports a number of options. The --help option can be - used to get a list of supported options: - $ ../libaom/configure --help - - 4. Cross development - For cross development, the most notable option is the --target option. The - most up-to-date list of supported targets can be found at the bottom of the - --help output of the configure script. As of this writing, the list of - available targets is: - - arm64-darwin-gcc - armv7-android-gcc - armv7-darwin-gcc - armv7-linux-rvct - armv7-linux-gcc - armv7-none-rvct - armv7-win32-vs12 - armv7-win32-vs14 - armv7-win32-vs15 - armv7s-darwin-gcc - mips32-linux-gcc - mips64-linux-gcc - sparc-solaris-gcc - x86-android-gcc - x86-darwin8-gcc - x86-darwin8-icc - x86-darwin9-gcc - x86-darwin9-icc - x86-darwin10-gcc - x86-darwin11-gcc - x86-darwin12-gcc - x86-darwin13-gcc - x86-darwin14-gcc - x86-darwin15-gcc - x86-darwin16-gcc - x86-iphonesimulator-gcc - x86-linux-gcc - x86-linux-icc - x86-os2-gcc - x86-solaris-gcc - x86-win32-gcc - x86-win32-vs12 - x86-win32-vs14 - x86-win32-vs15 - x86_64-android-gcc - x86_64-darwin9-gcc - x86_64-darwin10-gcc - x86_64-darwin11-gcc - x86_64-darwin12-gcc - x86_64-darwin13-gcc - x86_64-darwin14-gcc - x86_64-darwin15-gcc - x86_64-darwin16-gcc - x86_64-iphonesimulator-gcc - x86_64-linux-gcc - x86_64-linux-icc - x86_64-solaris-gcc - x86_64-win64-gcc - x86_64-win64-vs12 - x86_64-win64-vs14 - x86_64-win64-vs15 - generic-gnu - - The generic-gnu target, in conjunction with the CROSS environment variable, - can be used to cross compile architectures that aren't explicitly listed, if - the toolchain is a cross GNU (gcc/binutils) toolchain. Other POSIX toolchains - will likely work as well. For instance, to build using the mipsel-linux-uclibc - toolchain, the following command could be used (note, POSIX SH syntax, adapt - to your shell as necessary): - - $ CROSS=mipsel-linux-uclibc- ../libaom/configure - - In addition, the executables to be invoked can be overridden by specifying the - environment variables: CC, AR, LD, AS, STRIP, NM. Additional flags can be - passed to these executables with CFLAGS, LDFLAGS, and ASFLAGS. - - 5. Configuration errors - If the configuration step fails, the first step is to look in the error log. - This defaults to config.log. This should give a good indication of what went - wrong. If not, contact us for support. - -AV1 TEST VECTORS: - The test vectors can be downloaded and verified using the build system after - running configure. To specify an alternate directory the - LIBAOM_TEST_DATA_PATH environment variable can be used. - - $ ./configure --enable-unit-tests - $ LIBAOM_TEST_DATA_PATH=../-test-data make testdata - -UNIT TESTS: - The unit tests (consisting mainly of the test_libaom binary) can be run using - make. This will download the test data if necessary. - - $ ../libaom/configure --enable-unit-tests - $ make test - - Test may be run in parallel using make -j which supports up to 10 shards by - default. - $ make -j10 test - - If you have additional cores you can scale the tests to match: - $ shards=$(nproc); \ - make -j$shards test \ - NUM_SHARDS=$shards SHARDS="$(seq -s' ' 0 $(( shards - 1 )))" \ - && echo "success" - - The GTEST_FILTER environment variable (equivalent to --gtest_filter) can be - used to control which tests are run while sharding: - $ GTEST_FILTER='SSE2*' make -j10 test - -CODE STYLE: - The coding style used by this project is enforced with clang-format using the - configuration contained in the .clang-format file in the root of the - repository. - - Before pushing changes for review you can format your code with: - # Apply clang-format to modified .c, .h and .cc files - $ clang-format -i --style=file \ - $(git diff --name-only --diff-filter=ACMR '*.[hc]' '*.cc') - - Check the .clang-format file for the version used to generate it if there is - any difference between your local formatting and the review system. - - See also: http://clang.llvm.org/docs/ClangFormat.html - -SUPPORT - This library is an open source project supported by its community. Please - please email webm-discuss@webmproject.org for help. - diff --git a/aom/aom_codec.mk b/aom/aom_codec.mk deleted file mode 100644 index eb500a24c8..0000000000 --- a/aom/aom_codec.mk +++ /dev/null @@ -1,43 +0,0 @@ -## -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - - -API_EXPORTS += exports - -API_SRCS-$(CONFIG_AV1_ENCODER) += aom.h -API_SRCS-$(CONFIG_AV1_ENCODER) += aomcx.h -API_DOC_SRCS-$(CONFIG_AV1_ENCODER) += aom.h -API_DOC_SRCS-$(CONFIG_AV1_ENCODER) += aomcx.h - -API_SRCS-$(CONFIG_AV1_DECODER) += aom.h -API_SRCS-$(CONFIG_AV1_DECODER) += aomdx.h -API_DOC_SRCS-$(CONFIG_AV1_DECODER) += aom.h -API_DOC_SRCS-$(CONFIG_AV1_DECODER) += aomdx.h - -API_DOC_SRCS-yes += aom_codec.h -API_DOC_SRCS-yes += aom_decoder.h -API_DOC_SRCS-yes += aom_encoder.h -API_DOC_SRCS-yes += aom_frame_buffer.h -API_DOC_SRCS-yes += aom_image.h - -API_SRCS-yes += src/aom_decoder.c -API_SRCS-yes += aom_decoder.h -API_SRCS-yes += src/aom_encoder.c -API_SRCS-yes += aom_encoder.h -API_SRCS-yes += internal/aom_codec_internal.h -API_SRCS-yes += src/aom_codec.c -API_SRCS-yes += src/aom_image.c -API_SRCS-yes += aom_codec.h -API_SRCS-yes += aom_codec.mk -API_SRCS-yes += aom_frame_buffer.h -API_SRCS-yes += aom_image.h -API_SRCS-yes += src/aom_integer.c -API_SRCS-yes += aom_integer.h diff --git a/aom_dsp/aom_dsp.mk b/aom_dsp/aom_dsp.mk deleted file mode 100644 index 99be287259..0000000000 --- a/aom_dsp/aom_dsp.mk +++ /dev/null @@ -1,409 +0,0 @@ -## -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - - -DSP_SRCS-yes += aom_dsp.mk -DSP_SRCS-yes += aom_dsp_common.h - -DSP_SRCS-$(HAVE_MSA) += mips/macros_msa.h - -DSP_SRCS-$(ARCH_X86)$(ARCH_X86_64) += x86/synonyms.h -DSP_SRCS-$(ARCH_X86)$(ARCH_X86_64) += x86/synonyms_avx2.h - -# bit reader -DSP_SRCS-yes += prob.h - -ifeq ($(CONFIG_AV1_ENCODER),yes) -DSP_SRCS-yes += entenc.c -DSP_SRCS-yes += entenc.h -DSP_SRCS-yes += daalaboolwriter.c -DSP_SRCS-yes += daalaboolwriter.h -DSP_SRCS-yes += bitwriter.h -DSP_SRCS-yes += bitwriter_buffer.c -DSP_SRCS-yes += bitwriter_buffer.h -DSP_SRCS-yes += binary_codes_writer.c -DSP_SRCS-yes += binary_codes_writer.h -DSP_SRCS-yes += psnr.c -DSP_SRCS-yes += psnr.h -DSP_SRCS-$(CONFIG_INTERNAL_STATS) += ssim.c -DSP_SRCS-$(CONFIG_INTERNAL_STATS) += ssim.h -DSP_SRCS-$(CONFIG_INTERNAL_STATS) += psnrhvs.c -DSP_SRCS-$(CONFIG_INTERNAL_STATS) += fastssim.c -endif - -ifeq ($(CONFIG_AV1_DECODER),yes) -DSP_SRCS-yes += entdec.c -DSP_SRCS-yes += entdec.h -DSP_SRCS-yes += daalaboolreader.c -DSP_SRCS-yes += daalaboolreader.h -DSP_SRCS-yes += bitreader.h -DSP_SRCS-yes += bitreader_buffer.c -DSP_SRCS-yes += bitreader_buffer.h -DSP_SRCS-yes += binary_codes_reader.c -DSP_SRCS-yes += binary_codes_reader.h -endif - -# intra predictions -DSP_SRCS-yes += intrapred.c -DSP_SRCS-yes += intrapred_common.h - -DSP_SRCS-yes += entcode.c -DSP_SRCS-yes += entcode.h - -DSP_SRCS-$(HAVE_SSE) += x86/intrapred_sse2.asm -DSP_SRCS-$(HAVE_SSE2) += x86/intrapred_sse2.asm -DSP_SRCS-$(HAVE_SSSE3) += x86/intrapred_ssse3.asm -DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_8t_ssse3.asm - -DSP_SRCS-$(HAVE_SSE2) += x86/intrapred_sse2.c -DSP_SRCS-$(HAVE_SSSE3) += x86/intrapred_ssse3.c -DSP_SRCS-$(HAVE_AVX2) += x86/intrapred_avx2.c - -DSP_SRCS-$(HAVE_SSE) += x86/highbd_intrapred_sse2.asm -DSP_SRCS-$(HAVE_SSE2) += x86/highbd_intrapred_sse2.asm -DSP_SRCS-$(HAVE_SSE2) += x86/highbd_intrapred_sse2.c -DSP_SRCS-$(HAVE_SSSE3) += x86/highbd_intrapred_ssse3.c -DSP_SRCS-$(HAVE_AVX2) += x86/highbd_intrapred_avx2.c - -DSP_SRCS-$(HAVE_NEON_ASM) += arm/intrapred_neon_asm$(ASM) -DSP_SRCS-$(HAVE_NEON) += arm/intrapred_neon.c -DSP_SRCS-$(HAVE_MSA) += mips/intrapred_msa.c -DSP_SRCS-$(HAVE_DSPR2) += mips/intrapred4_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/intrapred8_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/intrapred16_dspr2.c - -DSP_SRCS-$(HAVE_DSPR2) += mips/common_dspr2.h -DSP_SRCS-$(HAVE_DSPR2) += mips/common_dspr2.c - -# inter predictions -DSP_SRCS-yes += blend.h -DSP_SRCS-yes += blend_a64_mask.c -DSP_SRCS-yes += blend_a64_hmask.c -DSP_SRCS-yes += blend_a64_vmask.c -DSP_SRCS-$(HAVE_SSE4_1) += x86/blend_sse4.h -DSP_SRCS-$(HAVE_SSE4_1) += x86/blend_a64_mask_sse4.c -DSP_SRCS-$(HAVE_SSE4_1) += x86/blend_a64_hmask_sse4.c -DSP_SRCS-$(HAVE_SSE4_1) += x86/blend_a64_vmask_sse4.c -ifeq ($(CONFIG_JNT_COMP),yes) -DSP_SRCS-$(HAVE_SSSE3) += x86/jnt_variance_ssse3.c -DSP_SRCS-$(HAVE_SSSE3) += x86/jnt_sad_ssse3.c -endif - -# interpolation filters -DSP_SRCS-yes += aom_convolve.c -DSP_SRCS-yes += aom_convolve.h -DSP_SRCS-yes += aom_filter.h - -DSP_SRCS-$(ARCH_X86)$(ARCH_X86_64) += x86/convolve.h -DSP_SRCS-$(ARCH_X86)$(ARCH_X86_64) += x86/aom_asm_stubs.c -DSP_SRCS-$(HAVE_SSE2) += x86/aom_subpixel_8t_sse2.asm -DSP_SRCS-$(HAVE_SSE2) += x86/aom_subpixel_bilinear_sse2.asm -DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_8t_ssse3.asm -DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_bilinear_ssse3.asm -DSP_SRCS-$(HAVE_AVX2) += x86/aom_subpixel_8t_intrin_avx2.c -DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_8t_intrin_ssse3.c -DSP_SRCS-$(HAVE_SSE2) += x86/aom_high_subpixel_8t_sse2.asm -DSP_SRCS-$(HAVE_SSE2) += x86/aom_high_subpixel_bilinear_sse2.asm -DSP_SRCS-$(HAVE_AVX2) += x86/highbd_convolve_avx2.c -DSP_SRCS-$(HAVE_SSE2) += x86/aom_convolve_copy_sse2.asm - -ifneq ($(CONFIG_EXT_PARTITION),yes) -ifeq ($(HAVE_NEON_ASM),yes) -DSP_SRCS-yes += arm/aom_convolve_copy_neon_asm$(ASM) -DSP_SRCS-yes += arm/aom_convolve8_avg_neon_asm$(ASM) -DSP_SRCS-yes += arm/aom_convolve8_neon_asm$(ASM) -DSP_SRCS-yes += arm/aom_convolve_avg_neon_asm$(ASM) -DSP_SRCS-yes += arm/aom_convolve_neon.c -else -ifeq ($(HAVE_NEON),yes) -DSP_SRCS-yes += arm/aom_convolve_copy_neon.c -DSP_SRCS-yes += arm/aom_convolve8_avg_neon.c -DSP_SRCS-yes += arm/aom_convolve8_neon.c -DSP_SRCS-yes += arm/aom_convolve_avg_neon.c -DSP_SRCS-yes += arm/aom_convolve_neon.c -endif # HAVE_NEON -endif # HAVE_NEON_ASM -endif # CONFIG_EXT_PARTITION - -# common (msa) -DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve8_avg_horiz_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve8_avg_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve8_avg_vert_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve8_horiz_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve8_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve8_vert_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve_avg_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve_copy_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve_msa.h - -# common (dspr2) -DSP_SRCS-$(HAVE_DSPR2) += mips/convolve_common_dspr2.h -DSP_SRCS-$(HAVE_DSPR2) += mips/convolve2_avg_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/convolve2_avg_horiz_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/convolve2_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/convolve2_horiz_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/convolve2_vert_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/convolve8_avg_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/convolve8_avg_horiz_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/convolve8_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/convolve8_horiz_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/convolve8_vert_dspr2.c - -# loop filters -DSP_SRCS-yes += loopfilter.c - -DSP_SRCS-$(ARCH_X86)$(ARCH_X86_64) += x86/loopfilter_sse2.c -DSP_SRCS-$(HAVE_SSE2) += x86/lpf_common_sse2.h - -ifneq ($(CONFIG_PARALLEL_DEBLOCKING),yes) -DSP_SRCS-$(HAVE_AVX2) += x86/loopfilter_avx2.c - -DSP_SRCS-$(HAVE_NEON) += arm/loopfilter_neon.c -ifeq ($(HAVE_NEON_ASM),yes) -DSP_SRCS-yes += arm/loopfilter_mb_neon$(ASM) -DSP_SRCS-yes += arm/loopfilter_16_neon$(ASM) -DSP_SRCS-yes += arm/loopfilter_8_neon$(ASM) -DSP_SRCS-yes += arm/loopfilter_4_neon$(ASM) -else -ifeq ($(HAVE_NEON),yes) -DSP_SRCS-yes += arm/loopfilter_16_neon.c -DSP_SRCS-yes += arm/loopfilter_8_neon.c -DSP_SRCS-yes += arm/loopfilter_4_neon.c -endif # HAVE_NEON -endif # HAVE_NEON_ASM - -DSP_SRCS-$(HAVE_MSA) += mips/loopfilter_msa.h -DSP_SRCS-$(HAVE_MSA) += mips/loopfilter_16_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/loopfilter_8_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/loopfilter_4_msa.c -DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_filters_dspr2.h -DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_filters_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_macros_dspr2.h -DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_masks_dspr2.h -DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_mb_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_mb_horiz_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_mb_vert_dspr2.c -endif # !CONFIG_PARALLEL_DEBLOCKING - -DSP_SRCS-$(HAVE_SSE2) += x86/highbd_loopfilter_sse2.c -DSP_SRCS-$(HAVE_AVX2) += x86/highbd_loopfilter_avx2.c - -DSP_SRCS-yes += txfm_common.h -DSP_SRCS-yes += x86/txfm_common_intrin.h -DSP_SRCS-$(HAVE_AVX2) += x86/common_avx2.h -DSP_SRCS-$(HAVE_SSE2) += x86/mem_sse2.h -DSP_SRCS-$(HAVE_SSE2) += x86/txfm_common_sse2.h -DSP_SRCS-$(HAVE_SSSE3) += x86/obmc_intrinsic_ssse3.h -DSP_SRCS-$(HAVE_MSA) += mips/txfm_macros_msa.h - -# forward transform -ifneq ($(findstring yes,$(CONFIG_AV1)),) -DSP_SRCS-$(HAVE_AVX2) += x86/txfm_common_avx2.h -ifeq ($(CONFIG_AV1_ENCODER),yes) -DSP_SRCS-yes += fwd_txfm.c -DSP_SRCS-yes += fwd_txfm.h -DSP_SRCS-$(HAVE_SSE2) += x86/fwd_txfm_sse2.h -DSP_SRCS-$(HAVE_SSE2) += x86/fwd_txfm_sse2.c -DSP_SRCS-$(HAVE_SSE2) += x86/fwd_dct32_8cols_sse2.c -DSP_SRCS-$(HAVE_SSE2) += x86/fwd_txfm_impl_sse2.h -DSP_SRCS-$(HAVE_SSE2) += x86/fwd_dct32x32_impl_sse2.h -ifeq ($(ARCH_X86_64),yes) -DSP_SRCS-$(HAVE_SSSE3) += x86/fwd_txfm_ssse3_x86_64.asm -endif -DSP_SRCS-$(HAVE_AVX2) += x86/fwd_txfm_avx2.h -DSP_SRCS-$(HAVE_AVX2) += x86/fwd_txfm_avx2.c -DSP_SRCS-$(HAVE_AVX2) += x86/fwd_dct32x32_impl_avx2.h -DSP_SRCS-$(HAVE_NEON) += arm/fwd_txfm_neon.c -DSP_SRCS-$(HAVE_MSA) += mips/fwd_txfm_msa.h -DSP_SRCS-$(HAVE_MSA) += mips/fwd_txfm_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/fwd_dct32x32_msa.c -endif # CONFIG_AV1_ENCODER -endif # CONFIG_AV1 - -# inverse transform -ifeq ($(CONFIG_AV1), yes) -DSP_SRCS-yes += inv_txfm.h -DSP_SRCS-yes += inv_txfm.c -DSP_SRCS-$(HAVE_SSE2) += x86/inv_txfm_sse2.h -DSP_SRCS-$(HAVE_SSE2) += x86/inv_txfm_sse2.c -DSP_SRCS-$(HAVE_SSE2) += x86/inv_wht_sse2.asm -DSP_SRCS-$(HAVE_SSSE3) += x86/inv_txfm_ssse3.c -DSP_SRCS-$(HAVE_AVX2) += x86/inv_txfm_common_avx2.h -DSP_SRCS-$(HAVE_AVX2) += x86/inv_txfm_avx2.c - -ifeq ($(HAVE_NEON_ASM),yes) -DSP_SRCS-yes += arm/save_reg_neon$(ASM) -DSP_SRCS-yes += arm/idct4x4_1_add_neon$(ASM) -DSP_SRCS-yes += arm/idct4x4_add_neon$(ASM) -DSP_SRCS-yes += arm/idct8x8_1_add_neon$(ASM) -DSP_SRCS-yes += arm/idct8x8_add_neon$(ASM) -DSP_SRCS-yes += arm/idct16x16_1_add_neon$(ASM) -DSP_SRCS-yes += arm/idct16x16_add_neon$(ASM) -DSP_SRCS-yes += arm/idct32x32_1_add_neon$(ASM) -DSP_SRCS-yes += arm/idct32x32_add_neon$(ASM) -else -ifeq ($(HAVE_NEON),yes) -DSP_SRCS-yes += arm/idct4x4_1_add_neon.c -DSP_SRCS-yes += arm/idct4x4_add_neon.c -DSP_SRCS-yes += arm/idct8x8_1_add_neon.c -DSP_SRCS-yes += arm/idct8x8_add_neon.c -DSP_SRCS-yes += arm/idct16x16_1_add_neon.c -DSP_SRCS-yes += arm/idct16x16_add_neon.c -DSP_SRCS-yes += arm/idct32x32_1_add_neon.c -DSP_SRCS-yes += arm/idct32x32_add_neon.c -endif # HAVE_NEON -endif # HAVE_NEON_ASM -DSP_SRCS-$(HAVE_NEON) += arm/idct16x16_neon.c - -DSP_SRCS-$(HAVE_MSA) += mips/inv_txfm_msa.h -DSP_SRCS-$(HAVE_MSA) += mips/idct4x4_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/idct8x8_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/idct16x16_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/idct32x32_msa.c - -DSP_SRCS-$(HAVE_DSPR2) += mips/inv_txfm_dspr2.h -DSP_SRCS-$(HAVE_DSPR2) += mips/itrans4_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/itrans8_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/itrans16_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/itrans32_dspr2.c -DSP_SRCS-$(HAVE_DSPR2) += mips/itrans32_cols_dspr2.c - -ifeq ($(CONFIG_LOOP_RESTORATION),yes) -DSP_SRCS-$(HAVE_SSE2) += x86/aom_convolve_hip_sse2.c -DSP_SRCS-$(HAVE_SSSE3) += x86/aom_highbd_convolve_hip_ssse3.c -endif # CONFIG_LOOP_RESTORATION -endif # CONFIG_AV1 - -# quantization -ifneq ($(filter yes,$(CONFIG_AV1_ENCODER)),) -DSP_SRCS-yes += quantize.c -DSP_SRCS-yes += quantize.h - -DSP_SRCS-$(HAVE_SSE2) += x86/quantize_sse2.c - -DSP_SRCS-$(HAVE_SSE2) += x86/highbd_quantize_intrin_sse2.c -DSP_SRCS-$(HAVE_AVX2) += x86/highbd_quantize_intrin_avx2.c - -ifeq ($(ARCH_X86_64),yes) -DSP_SRCS-$(HAVE_SSSE3) += x86/quantize_ssse3_x86_64.asm -DSP_SRCS-$(HAVE_AVX) += x86/quantize_avx_x86_64.asm -endif - -# avg -DSP_SRCS-yes += avg.c -DSP_SRCS-$(HAVE_SSE2) += x86/avg_intrin_sse2.c -DSP_SRCS-$(HAVE_NEON) += arm/avg_neon.c -DSP_SRCS-$(HAVE_NEON) += arm/hadamard_neon.c -ifeq ($(ARCH_X86_64),yes) -DSP_SRCS-$(HAVE_SSSE3) += x86/avg_ssse3_x86_64.asm -endif - -# high bit depth subtract -DSP_SRCS-$(HAVE_SSE2) += x86/highbd_subtract_sse2.c - -endif # CONFIG_AV1_ENCODER - -ifeq ($(CONFIG_AV1_ENCODER),yes) -DSP_SRCS-yes += sum_squares.c - -DSP_SRCS-$(HAVE_SSE2) += x86/sum_squares_sse2.c -endif # CONFIG_AV1_ENCODER - -ifeq ($(CONFIG_AV1_ENCODER),yes) -DSP_SRCS-yes += sad.c -DSP_SRCS-yes += sad_av1.c -DSP_SRCS-yes += subtract.c - -DSP_SRCS-$(HAVE_NEON) += arm/sad4d_neon.c -DSP_SRCS-$(HAVE_NEON) += arm/sad_neon.c -DSP_SRCS-$(HAVE_NEON) += arm/subtract_neon.c - -DSP_SRCS-$(HAVE_MSA) += mips/sad_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/subtract_msa.c - -DSP_SRCS-$(HAVE_SSE3) += x86/sad_sse3.asm -DSP_SRCS-$(HAVE_SSSE3) += x86/sad_ssse3.asm -DSP_SRCS-$(HAVE_SSE4_1) += x86/sad_sse4.asm -DSP_SRCS-$(HAVE_AVX2) += x86/sad4d_avx2.c -DSP_SRCS-$(HAVE_AVX2) += x86/sad_avx2.c -DSP_SRCS-$(HAVE_AVX2) += x86/sad_highbd_avx2.c - -ifeq ($(CONFIG_AV1_ENCODER),yes) -DSP_SRCS-$(HAVE_SSSE3) += x86/masked_sad_intrin_ssse3.c -DSP_SRCS-$(HAVE_SSSE3) += x86/masked_variance_intrin_ssse3.c -DSP_SRCS-$(HAVE_SSE4_1) += x86/obmc_sad_sse4.c -DSP_SRCS-$(HAVE_SSE4_1) += x86/obmc_variance_sse4.c -ifeq ($(CONFIG_EXT_PARTITION),yes) -DSP_SRCS-$(HAVE_AVX2) += x86/sad_impl_avx2.c -endif -endif #CONFIG_AV1_ENCODER - -DSP_SRCS-$(HAVE_SSE) += x86/sad4d_sse2.asm -DSP_SRCS-$(HAVE_SSE) += x86/sad_sse2.asm -DSP_SRCS-$(HAVE_SSE2) += x86/sad4d_sse2.asm -DSP_SRCS-$(HAVE_SSE2) += x86/sad_sse2.asm -DSP_SRCS-$(HAVE_SSE2) += x86/subtract_sse2.asm -DSP_SRCS-$(HAVE_SSE2) += x86/highbd_sad4d_sse2.asm -DSP_SRCS-$(HAVE_SSE2) += x86/highbd_sad_sse2.asm - -endif # CONFIG_AV1_ENCODER - -ifneq ($(filter yes,$(CONFIG_AV1_ENCODER)),) -DSP_SRCS-yes += variance.c -DSP_SRCS-yes += variance.h - -DSP_SRCS-$(HAVE_NEON) += arm/subpel_variance_neon.c -DSP_SRCS-$(HAVE_NEON) += arm/variance_neon.c - -DSP_SRCS-$(HAVE_MSA) += mips/variance_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/sub_pixel_variance_msa.c - -DSP_SRCS-$(HAVE_SSE) += x86/variance_sse2.c -DSP_SRCS-$(HAVE_SSE2) += x86/variance_sse2.c # Contains SSE2 and SSSE3 -DSP_SRCS-$(HAVE_SSE2) += x86/halfpix_variance_sse2.c -DSP_SRCS-$(HAVE_SSE2) += x86/halfpix_variance_impl_sse2.asm -DSP_SRCS-$(HAVE_AVX2) += x86/variance_avx2.c -DSP_SRCS-$(HAVE_AVX2) += x86/variance_impl_avx2.c - -ifeq ($(ARCH_X86_64),yes) -DSP_SRCS-$(HAVE_SSE2) += x86/ssim_opt_x86_64.asm -endif # ARCH_X86_64 - -DSP_SRCS-$(HAVE_SSE) += x86/subpel_variance_sse2.asm -DSP_SRCS-$(HAVE_SSE2) += x86/subpel_variance_sse2.asm # Contains SSE2 and SSSE3 -DSP_SRCS-$(HAVE_SSE2) += x86/highbd_variance_sse2.c -DSP_SRCS-$(HAVE_SSE4_1) += x86/highbd_variance_sse4.c -DSP_SRCS-$(HAVE_SSE2) += x86/highbd_variance_impl_sse2.asm -DSP_SRCS-$(HAVE_SSE2) += x86/highbd_subpel_variance_impl_sse2.asm -endif # CONFIG_AV1_ENCODER - -DSP_SRCS-no += $(DSP_SRCS_REMOVE-yes) - -DSP_SRCS-yes += aom_dsp_rtcd.c -DSP_SRCS-yes += aom_dsp_rtcd_defs.pl - -DSP_SRCS-yes += aom_simd.h -DSP_SRCS-yes += aom_simd_inline.h -DSP_SRCS-yes += simd/v64_intrinsics.h -DSP_SRCS-yes += simd/v64_intrinsics_c.h -DSP_SRCS-yes += simd/v128_intrinsics.h -DSP_SRCS-yes += simd/v128_intrinsics_c.h -DSP_SRCS-yes += simd/v256_intrinsics.h -DSP_SRCS-yes += simd/v256_intrinsics_c.h -DSP_SRCS-yes += simd/v256_intrinsics_v128.h -DSP_SRCS-$(HAVE_SSE2) += simd/v64_intrinsics_x86.h -DSP_SRCS-$(HAVE_SSE2) += simd/v128_intrinsics_x86.h -DSP_SRCS-$(HAVE_SSE2) += simd/v256_intrinsics_x86.h -DSP_SRCS-$(HAVE_NEON) += simd/v64_intrinsics_arm.h -DSP_SRCS-$(HAVE_NEON) += simd/v128_intrinsics_arm.h -DSP_SRCS-$(HAVE_NEON) += simd/v256_intrinsics_arm.h - -$(eval $(call rtcd_h_template,aom_dsp_rtcd,aom_dsp/aom_dsp_rtcd_defs.pl)) diff --git a/aom_mem/aom_mem.mk b/aom_mem/aom_mem.mk deleted file mode 100644 index e9162c2842..0000000000 --- a/aom_mem/aom_mem.mk +++ /dev/null @@ -1,4 +0,0 @@ -MEM_SRCS-yes += aom_mem.mk -MEM_SRCS-yes += aom_mem.c -MEM_SRCS-yes += aom_mem.h -MEM_SRCS-yes += include/aom_mem_intrnl.h diff --git a/aom_ports/aom_ports.mk b/aom_ports/aom_ports.mk deleted file mode 100644 index 1f18f6bd16..0000000000 --- a/aom_ports/aom_ports.mk +++ /dev/null @@ -1,29 +0,0 @@ -## -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - - - -PORTS_SRCS-yes += aom_ports.mk - -PORTS_SRCS-yes += bitops.h -PORTS_SRCS-yes += mem.h -PORTS_SRCS-yes += msvc.h -PORTS_SRCS-yes += system_state.h -PORTS_SRCS-yes += aom_timer.h - -ifeq ($(ARCH_X86)$(ARCH_X86_64),yes) -PORTS_SRCS-yes += emms.asm -PORTS_SRCS-yes += x86.h -PORTS_SRCS-yes += x86_abi_support.asm -endif - -PORTS_SRCS-$(ARCH_ARM) += arm_cpudetect.c -PORTS_SRCS-$(ARCH_ARM) += arm.h diff --git a/aom_scale/aom_scale.mk b/aom_scale/aom_scale.mk deleted file mode 100644 index e3a68cfcf0..0000000000 --- a/aom_scale/aom_scale.mk +++ /dev/null @@ -1,16 +0,0 @@ -SCALE_SRCS-yes += aom_scale.mk -SCALE_SRCS-yes += yv12config.h -SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += aom_scale.h -SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += generic/aom_scale.c -SCALE_SRCS-yes += generic/yv12config.c -SCALE_SRCS-yes += generic/yv12extend.c -SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += generic/gen_scalers.c -SCALE_SRCS-yes += aom_scale_rtcd.c -SCALE_SRCS-yes += aom_scale_rtcd.pl - -#mips(dspr2) -SCALE_SRCS-$(HAVE_DSPR2) += mips/dspr2/yv12extend_dspr2.c - -SCALE_SRCS-no += $(SCALE_SRCS_REMOVE-yes) - -$(eval $(call rtcd_h_template,aom_scale_rtcd,aom_scale/aom_scale_rtcd.pl)) diff --git a/aom_util/aom_util.mk b/aom_util/aom_util.mk deleted file mode 100644 index c9e26a0336..0000000000 --- a/aom_util/aom_util.mk +++ /dev/null @@ -1,18 +0,0 @@ -## -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - - -UTIL_SRCS-yes += aom_util.mk -UTIL_SRCS-yes += aom_thread.c -UTIL_SRCS-yes += aom_thread.h -UTIL_SRCS-yes += debug_util.c -UTIL_SRCS-yes += debug_util.h -UTIL_SRCS-yes += endian_inl.h diff --git a/aomdec.c b/aomdec.c index f2800a38b8..0ab8646019 100644 --- a/aomdec.c +++ b/aomdec.c @@ -871,9 +871,9 @@ static int main_loop(int argc, const char **argv_) { img = scaled_img; #else fprintf(stderr, - "Failed to scale output frame: %s.\n" - "Scaling is disabled in this configuration. " - "To enable scaling, configure with --enable-libyuv\n", + "Failed to scale output frame: %s.\n" + "libyuv is required for scaling but is currently disabled.\n" + "Be sure to specify -DCONFIG_LIBYUV=1 when running cmake.\n", aom_codec_error(&decoder)); goto fail; #endif diff --git a/aomenc.c b/aomenc.c index 3ea7477855..1103716df3 100644 --- a/aomenc.c +++ b/aomenc.c @@ -1652,8 +1652,10 @@ static void encode_frame(struct stream_state *stream, stream->encoder.err = 1; ctx_exit_on_error(&stream->encoder, "Stream %d: Failed to encode frame.\n" - "Scaling disabled in this configuration. \n" - "To enable, configure with --enable-libyuv\n", + "libyuv is required for scaling but is currently " + "disabled.\n" + "Be sure to specify -DCONFIG_LIBYUV=1 when running " + "cmake.\n", stream->index); #endif } diff --git a/av1/av1_common.mk b/av1/av1_common.mk deleted file mode 100644 index 317f746c4d..0000000000 --- a/av1/av1_common.mk +++ /dev/null @@ -1,162 +0,0 @@ -## -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - -AV1_COMMON_SRCS-yes += av1_common.mk -AV1_COMMON_SRCS-yes += av1_iface_common.h -AV1_COMMON_SRCS-yes += common/alloccommon.c -AV1_COMMON_SRCS-yes += common/av1_loopfilter.c -AV1_COMMON_SRCS-yes += common/av1_loopfilter.h -AV1_COMMON_SRCS-yes += common/blockd.c -AV1_COMMON_SRCS-yes += common/debugmodes.c -AV1_COMMON_SRCS-yes += common/entropy.c -AV1_COMMON_SRCS-yes += common/entropymode.c -AV1_COMMON_SRCS-yes += common/entropymv.c -AV1_COMMON_SRCS-yes += common/frame_buffers.c -AV1_COMMON_SRCS-yes += common/frame_buffers.h -AV1_COMMON_SRCS-yes += common/alloccommon.h -AV1_COMMON_SRCS-yes += common/blockd.h -AV1_COMMON_SRCS-yes += common/common.h -ifeq ($(CONFIG_DAALA_TX),yes) -AV1_COMMON_SRCS-yes += common/daala_tx.c -AV1_COMMON_SRCS-yes += common/daala_tx.h -AV1_COMMON_SRCS-yes += common/daala_tx_kernels.h -AV1_COMMON_SRCS-yes += common/daala_inv_txfm.c -AV1_COMMON_SRCS-yes += common/daala_inv_txfm.h -AV1_COMMON_SRCS-$(HAVE_AVX2) += common/x86/daala_tx_kernels.h -AV1_COMMON_SRCS-$(HAVE_AVX2) += common/x86/daala_inv_txfm_avx2.c -endif -AV1_COMMON_SRCS-yes += common/entropy.h -AV1_COMMON_SRCS-yes += common/entropymode.h -AV1_COMMON_SRCS-yes += common/entropymv.h -AV1_COMMON_SRCS-yes += common/enums.h -AV1_COMMON_SRCS-yes += common/filter.h -AV1_COMMON_SRCS-yes += common/filter.c -AV1_COMMON_SRCS-yes += common/idct.h -AV1_COMMON_SRCS-yes += common/idct.c -AV1_COMMON_SRCS-yes += common/thread_common.h -AV1_COMMON_SRCS-$(CONFIG_LV_MAP) += common/txb_common.h -AV1_COMMON_SRCS-$(CONFIG_LV_MAP) += common/txb_common.c -AV1_COMMON_SRCS-yes += common/mv.h -AV1_COMMON_SRCS-yes += common/onyxc_int.h -AV1_COMMON_SRCS-yes += common/pred_common.h -AV1_COMMON_SRCS-yes += common/pred_common.c -AV1_COMMON_SRCS-yes += common/quant_common.h -AV1_COMMON_SRCS-yes += common/reconinter.h -AV1_COMMON_SRCS-yes += common/reconintra.h -AV1_COMMON_SRCS-yes += common/av1_rtcd.c -AV1_COMMON_SRCS-yes += common/av1_rtcd_defs.pl -AV1_COMMON_SRCS-yes += common/scale.h -AV1_COMMON_SRCS-yes += common/scale.c -AV1_COMMON_SRCS-yes += common/seg_common.h -AV1_COMMON_SRCS-yes += common/seg_common.c -AV1_COMMON_SRCS-yes += common/tile_common.h -AV1_COMMON_SRCS-yes += common/tile_common.c -AV1_COMMON_SRCS-yes += common/thread_common.c -AV1_COMMON_SRCS-yes += common/mvref_common.c -AV1_COMMON_SRCS-yes += common/mvref_common.h -AV1_COMMON_SRCS-yes += common/quant_common.c -AV1_COMMON_SRCS-yes += common/reconinter.c -AV1_COMMON_SRCS-yes += common/reconintra.c -AV1_COMMON_SRCS-yes += common/resize.c -AV1_COMMON_SRCS-yes += common/resize.h -AV1_COMMON_SRCS-yes += common/common_data.h -AV1_COMMON_SRCS-yes += common/scan.c -AV1_COMMON_SRCS-yes += common/scan.h -AV1_COMMON_SRCS-yes += common/av1_txfm.h -AV1_COMMON_SRCS-yes += common/av1_txfm.c -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/av1_txfm_sse4.h -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/av1_txfm_sse4.c -AV1_COMMON_SRCS-yes += common/av1_inv_txfm1d.h -AV1_COMMON_SRCS-yes += common/av1_inv_txfm1d.c -AV1_COMMON_SRCS-yes += common/av1_inv_txfm2d.c -AV1_COMMON_SRCS-yes += common/av1_inv_txfm1d_cfg.h -AV1_COMMON_SRCS-$(HAVE_AVX2) += common/x86/convolve_avx2.c -AV1_COMMON_SRCS-$(HAVE_SSSE3) += common/x86/av1_convolve_ssse3.c -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/av1_convolve_scale_sse4.c -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/av1_highbd_convolve_sse4.c -AV1_COMMON_SRCS-yes += common/convolve.c -AV1_COMMON_SRCS-yes += common/convolve.h -ifeq ($(CONFIG_LOOP_RESTORATION),yes) -AV1_COMMON_SRCS-yes += common/restoration.h -AV1_COMMON_SRCS-yes += common/restoration.c -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/selfguided_sse4.c -AV1_COMMON_SRCS-$(HAVE_AVX2) += common/x86/selfguided_avx2.c -endif -ifeq ($(CONFIG_INTRA_EDGE),yes) -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/intra_edge_sse4.c -endif -AV1_COMMON_SRCS-yes += common/warped_motion.h -AV1_COMMON_SRCS-yes += common/warped_motion.c -AV1_COMMON_SRCS-$(HAVE_AVX2) += common/cdef_block_avx2.c -AV1_COMMON_SRCS-$(HAVE_SSE2) += common/cdef_block_sse2.c -AV1_COMMON_SRCS-$(HAVE_SSSE3) += common/cdef_block_ssse3.c -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/cdef_block_sse4.c -AV1_COMMON_SRCS-$(HAVE_NEON) += common/cdef_block_neon.c -AV1_COMMON_SRCS-yes += common/cdef_block.c -AV1_COMMON_SRCS-yes += common/cdef_block.h -AV1_COMMON_SRCS-yes += common/cdef_block_simd.h -AV1_COMMON_SRCS-yes += common/cdef.c -AV1_COMMON_SRCS-yes += common/cdef.h -AV1_COMMON_SRCS-yes += common/odintrin.c -AV1_COMMON_SRCS-yes += common/odintrin.h - -ifeq ($(CONFIG_CFL),yes) -AV1_COMMON_SRCS-yes += common/cfl.h -AV1_COMMON_SRCS-yes += common/cfl.c -AV1_COMMON_SRCS-$(HAVE_SSE2) += common/cfl_sse2.c -AV1_COMMON_SRCS-$(HAVE_SSSE3) += common/cfl_ssse3.c -AV1_COMMON_SRCS-$(HAVE_AVX2) += common/cfl_avx2.c -endif - -AV1_COMMON_SRCS-yes += common/obmc.h - -# common (msa) -AV1_COMMON_SRCS-$(HAVE_MSA) += common/mips/msa/av1_idct4x4_msa.c -AV1_COMMON_SRCS-$(HAVE_MSA) += common/mips/msa/av1_idct8x8_msa.c -AV1_COMMON_SRCS-$(HAVE_MSA) += common/mips/msa/av1_idct16x16_msa.c - -AV1_COMMON_SRCS-$(HAVE_SSE2) += common/x86/idct_intrin_sse2.c -AV1_COMMON_SRCS-$(HAVE_AVX2) += common/x86/hybrid_inv_txfm_avx2.c - -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/highbd_txfm_utility_sse4.h -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/highbd_inv_txfm_sse4.c -AV1_COMMON_SRCS-$(HAVE_AVX2) += common/x86/highbd_inv_txfm_avx2.c - -AV1_COMMON_SRCS-$(HAVE_SSE2) += common/x86/warp_plane_sse2.c -AV1_COMMON_SRCS-$(HAVE_SSSE3) += common/x86/warp_plane_ssse3.c -ifeq ($(CONFIG_JNT_COMP), yes) -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/warp_plane_sse4.c -endif -AV1_COMMON_SRCS-$(HAVE_SSSE3) += common/x86/highbd_warp_plane_ssse3.c -ifeq ($(CONFIG_JNT_COMP), yes) -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/highbd_warp_plane_sse4.c -endif - - -AV1_COMMON_SRCS-$(HAVE_SSE2) += common/x86/convolve_sse2.c -AV1_COMMON_SRCS-$(HAVE_SSE2) += common/x86/convolve_2d_sse2.c -ifeq ($(CONFIG_JNT_COMP), yes) -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/convolve_2d_sse4.c -endif -AV1_COMMON_SRCS-$(HAVE_AVX2) += common/x86/convolve_2d_avx2.c -AV1_COMMON_SRCS-$(HAVE_SSSE3) += common/x86/highbd_convolve_2d_ssse3.c -AV1_COMMON_SRCS-$(HAVE_AVX2) += common/x86/highbd_convolve_2d_avx2.c -ifeq ($(CONFIG_JNT_COMP), yes) -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/highbd_convolve_2d_sse4.c -endif - -ifeq ($(CONFIG_LV_MAP),yes) -AV1_COMMON_SRCS-$(HAVE_SSE2) += common/x86/txb_sse2.c -endif - -AV1_COMMON_SRCS-yes += common/token_cdfs.h - -$(eval $(call rtcd_h_template,av1_rtcd,av1/common/av1_rtcd_defs.pl)) diff --git a/av1/av1_cx.mk b/av1/av1_cx.mk deleted file mode 100644 index 122e816de0..0000000000 --- a/av1/av1_cx.mk +++ /dev/null @@ -1,161 +0,0 @@ -## -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - -AV1_CX_EXPORTS += exports_enc - -AV1_CX_SRCS-yes += $(AV1_COMMON_SRCS-yes) -AV1_CX_SRCS-no += $(AV1_COMMON_SRCS-no) -AV1_CX_SRCS_REMOVE-yes += $(AV1_COMMON_SRCS_REMOVE-yes) -AV1_CX_SRCS_REMOVE-no += $(AV1_COMMON_SRCS_REMOVE-no) - -AV1_CX_SRCS-yes += av1_cx_iface.c - -AV1_CX_SRCS-yes += encoder/av1_fwd_txfm1d.c -AV1_CX_SRCS-yes += encoder/av1_fwd_txfm1d.h -AV1_CX_SRCS-yes += encoder/av1_fwd_txfm1d_cfg.h -AV1_CX_SRCS-yes += encoder/av1_fwd_txfm2d.c -AV1_CX_SRCS-yes += encoder/av1_quantize.c -AV1_CX_SRCS-yes += encoder/av1_quantize.h -AV1_CX_SRCS-yes += encoder/bitstream.c -AV1_CX_SRCS-$(CONFIG_BGSPRITE) += encoder/bgsprite.c -AV1_CX_SRCS-$(CONFIG_BGSPRITE) += encoder/bgsprite.h -AV1_CX_SRCS-yes += encoder/context_tree.c -AV1_CX_SRCS-yes += encoder/context_tree.h -AV1_CX_SRCS-yes += encoder/cost.h -AV1_CX_SRCS-yes += encoder/cost.c -ifeq ($(CONFIG_DAALA_TX),yes) -AV1_CX_SRCS-yes += encoder/daala_fwd_txfm.c -AV1_CX_SRCS-yes += encoder/daala_fwd_txfm.h -endif -AV1_CX_SRCS-yes += encoder/dct.c -AV1_CX_SRCS-yes += encoder/hybrid_fwd_txfm.c -AV1_CX_SRCS-yes += encoder/hybrid_fwd_txfm.h -AV1_CX_SRCS-yes += encoder/encodeframe.c -AV1_CX_SRCS-yes += encoder/encodeframe.h -AV1_CX_SRCS-yes += encoder/encodemb.c -AV1_CX_SRCS-yes += encoder/encodemv.c -AV1_CX_SRCS-yes += encoder/ethread.h -AV1_CX_SRCS-yes += encoder/ethread.c -AV1_CX_SRCS-yes += encoder/extend.c -AV1_CX_SRCS-yes += encoder/firstpass.c -AV1_CX_SRCS-yes += encoder/mathutils.h -AV1_CX_SRCS-yes += ../third_party/fastfeat/fast.h -AV1_CX_SRCS-yes += ../third_party/fastfeat/nonmax.c -AV1_CX_SRCS-yes += ../third_party/fastfeat/fast_9.c -AV1_CX_SRCS-yes += ../third_party/fastfeat/fast.c -AV1_CX_SRCS-yes += encoder/corner_match.c -AV1_CX_SRCS-yes += encoder/corner_match.h -AV1_CX_SRCS-yes += encoder/corner_detect.c -AV1_CX_SRCS-yes += encoder/corner_detect.h -AV1_CX_SRCS-yes += encoder/global_motion.c -AV1_CX_SRCS-yes += encoder/global_motion.h -AV1_CX_SRCS-yes += encoder/ransac.c -AV1_CX_SRCS-yes += encoder/ransac.h -AV1_CX_SRCS-yes += encoder/block.h -AV1_CX_SRCS-yes += encoder/bitstream.h -AV1_CX_SRCS-yes += encoder/encodemb.h -AV1_CX_SRCS-yes += encoder/encodemv.h -AV1_CX_SRCS-$(CONFIG_LV_MAP) += encoder/encodetxb.c -AV1_CX_SRCS-$(CONFIG_LV_MAP) += encoder/encodetxb.h -AV1_CX_SRCS-yes += encoder/extend.h -AV1_CX_SRCS-yes += encoder/firstpass.h -AV1_CX_SRCS-yes += encoder/lookahead.c -AV1_CX_SRCS-yes += encoder/lookahead.h -AV1_CX_SRCS-yes += encoder/mcomp.h -AV1_CX_SRCS-yes += encoder/encoder.h -AV1_CX_SRCS-yes += encoder/random.h -AV1_CX_SRCS-yes += encoder/ratectrl.h -AV1_CX_SRCS-yes += encoder/rd.h -AV1_CX_SRCS-yes += encoder/rdopt.h -AV1_CX_SRCS-yes += encoder/tokenize.h -AV1_CX_SRCS-yes += encoder/mcomp.c -AV1_CX_SRCS-yes += encoder/encoder.c -AV1_CX_SRCS-yes += encoder/k_means_template.h -AV1_CX_SRCS-yes += encoder/palette.h -AV1_CX_SRCS-yes += encoder/palette.c -AV1_CX_SRCS-yes += encoder/picklpf.c -AV1_CX_SRCS-yes += encoder/picklpf.h -AV1_CX_SRCS-$(CONFIG_LOOP_RESTORATION) += encoder/pickrst.c -AV1_CX_SRCS-$(CONFIG_LOOP_RESTORATION) += encoder/pickrst.h -AV1_CX_SRCS-yes += encoder/ratectrl.c -AV1_CX_SRCS-yes += encoder/rd.c -AV1_CX_SRCS-yes += encoder/rdopt.c -AV1_CX_SRCS-yes += encoder/segmentation.c -AV1_CX_SRCS-yes += encoder/segmentation.h -AV1_CX_SRCS-yes += encoder/speed_features.c -AV1_CX_SRCS-yes += encoder/speed_features.h -AV1_CX_SRCS-$(CONFIG_INTERNAL_STATS) += encoder/blockiness.c - -AV1_CX_SRCS-yes += encoder/tokenize.c -AV1_CX_SRCS-yes += encoder/aq_variance.c -AV1_CX_SRCS-yes += encoder/aq_variance.h -AV1_CX_SRCS-yes += encoder/aq_cyclicrefresh.c -AV1_CX_SRCS-yes += encoder/aq_cyclicrefresh.h -AV1_CX_SRCS-yes += encoder/aq_complexity.c -AV1_CX_SRCS-yes += encoder/aq_complexity.h -AV1_CX_SRCS-yes += encoder/temporal_filter.c -AV1_CX_SRCS-yes += encoder/temporal_filter.h -AV1_CX_SRCS-yes += encoder/mbgraph.c -AV1_CX_SRCS-yes += encoder/mbgraph.h -AV1_CX_SRCS-yes += encoder/hash.c -AV1_CX_SRCS-yes += encoder/hash.h -ifeq ($(CONFIG_HASH_ME),yes) -AV1_CX_SRCS-yes += ../third_party/vector/vector.h -AV1_CX_SRCS-yes += ../third_party/vector/vector.c -AV1_CX_SRCS-yes += encoder/hash_motion.c -AV1_CX_SRCS-yes += encoder/hash_motion.h -endif -AV1_CX_SRCS-yes += encoder/pickcdef.c - -ifeq ($(CONFIG_LV_MAP),yes) -AV1_COMMON_SRCS-$(HAVE_SSE2) += encoder/x86/encodetxb_sse2.c -endif - -AV1_CX_SRCS-$(HAVE_SSE2) += encoder/x86/av1_quantize_sse2.c -AV1_CX_SRCS-$(HAVE_AVX2) += encoder/x86/av1_quantize_avx2.c -AV1_CX_SRCS-$(HAVE_SSE2) += encoder/x86/temporal_filter_apply_sse2.asm - -AV1_CX_SRCS-$(HAVE_SSE2) += encoder/x86/highbd_block_error_intrin_sse2.c -AV1_CX_SRCS-$(HAVE_AVX2) += encoder/x86/av1_highbd_quantize_avx2.c - - -AV1_CX_SRCS-$(HAVE_SSE2) += encoder/x86/dct_sse2.asm -AV1_CX_SRCS-$(HAVE_SSE2) += encoder/x86/error_sse2.asm - -ifeq ($(ARCH_X86_64),yes) -AV1_CX_SRCS-$(HAVE_SSSE3) += encoder/x86/av1_quantize_ssse3_x86_64.asm -endif - -AV1_CX_SRCS-$(HAVE_SSE2) += encoder/x86/dct_intrin_sse2.c -AV1_CX_SRCS-$(HAVE_AVX2) += encoder/x86/hybrid_fwd_txfm_avx2.c - -AV1_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/av1_fwd_txfm1d_sse4.c -AV1_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/av1_fwd_txfm2d_sse4.c -AV1_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/av1_highbd_quantize_sse4.c -AV1_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/av1_txfm1d_sse4.h -AV1_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/highbd_fwd_txfm_sse4.c - -AV1_CX_SRCS-yes += encoder/wedge_utils.c -AV1_CX_SRCS-$(HAVE_SSE2) += encoder/x86/wedge_utils_sse2.c -AV1_CX_SRCS-$(HAVE_AVX2) += encoder/x86/error_intrin_avx2.c -AV1_CX_SRCS-$(HAVE_NEON) += encoder/arm/neon/quantize_neon.c -AV1_CX_SRCS-$(HAVE_MSA) += encoder/mips/msa/error_msa.c -AV1_CX_SRCS-$(HAVE_MSA) += encoder/mips/msa/fdct4x4_msa.c -AV1_CX_SRCS-$(HAVE_MSA) += encoder/mips/msa/fdct8x8_msa.c -AV1_CX_SRCS-$(HAVE_MSA) += encoder/mips/msa/fdct16x16_msa.c -AV1_CX_SRCS-$(HAVE_MSA) += encoder/mips/msa/fdct_msa.h -AV1_CX_SRCS-$(HAVE_MSA) += encoder/mips/msa/temporal_filter_msa.c - -AV1_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/corner_match_sse4.c - -AV1_CX_SRCS-yes += encoder/tx_prune_model_weights.h - -AV1_CX_SRCS-yes := $(filter-out $(AV1_CX_SRCS_REMOVE-yes),$(AV1_CX_SRCS-yes)) diff --git a/av1/av1_dx.mk b/av1/av1_dx.mk deleted file mode 100644 index 05dc200e89..0000000000 --- a/av1/av1_dx.mk +++ /dev/null @@ -1,48 +0,0 @@ -## -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - -AV1_DX_EXPORTS += exports_dec - -AV1_DX_SRCS-yes += $(AV1_COMMON_SRCS-yes) -AV1_DX_SRCS-no += $(AV1_COMMON_SRCS-no) -AV1_DX_SRCS_REMOVE-yes += $(AV1_COMMON_SRCS_REMOVE-yes) -AV1_DX_SRCS_REMOVE-no += $(AV1_COMMON_SRCS_REMOVE-no) - -AV1_DX_SRCS-yes += av1_dx_iface.c - -AV1_DX_SRCS-yes += decoder/decodemv.c -AV1_DX_SRCS-yes += decoder/decodeframe.c -AV1_DX_SRCS-yes += decoder/decodeframe.h -AV1_DX_SRCS-yes += decoder/detokenize.c -AV1_DX_SRCS-yes += decoder/decodemv.h -AV1_DX_SRCS-$(CONFIG_LV_MAP) += decoder/decodetxb.c -AV1_DX_SRCS-$(CONFIG_LV_MAP) += decoder/decodetxb.h -AV1_DX_SRCS-yes += decoder/detokenize.h -AV1_DX_SRCS-yes += decoder/dthread.c -AV1_DX_SRCS-yes += decoder/dthread.h -AV1_DX_SRCS-yes += decoder/decoder.c -AV1_DX_SRCS-yes += decoder/decoder.h -AV1_DX_SRCS-yes += decoder/symbolrate.h - -AV1_DX_SRCS-$(CONFIG_OBU) += decoder/obu.c -AV1_DX_SRCS-$(CONFIG_OBU) += decoder/obu.h - -ifeq ($(CONFIG_ACCOUNTING),yes) -AV1_DX_SRCS-yes += decoder/accounting.h -AV1_DX_SRCS-yes += decoder/accounting.c -endif - -ifeq ($(CONFIG_INSPECTION),yes) -AV1_DX_SRCS-yes += decoder/inspection.c -AV1_DX_SRCS-yes += decoder/inspection.h -endif - -AV1_DX_SRCS-yes := $(filter-out $(AV1_DX_SRCS_REMOVE-yes),$(AV1_DX_SRCS-yes)) diff --git a/build/cmake/aom_configure.cmake b/build/cmake/aom_configure.cmake index 2e077267d3..c63355b7f0 100644 --- a/build/cmake/aom_configure.cmake +++ b/build/cmake/aom_configure.cmake @@ -255,8 +255,7 @@ else () if (ENABLE_WERROR) add_compiler_flag_if_supported("-Werror") endif () - # Flag(s) added here negate CMake defaults and produce build output similar - # to the existing configure/make build system. + # Flag(s) added here negate CMake defaults. add_compiler_flag_if_supported("-Wno-unused-function") if ("${CMAKE_BUILD_TYPE}" MATCHES "Rel") diff --git a/build/make/Android.mk b/build/make/Android.mk deleted file mode 100644 index e50faef92a..0000000000 --- a/build/make/Android.mk +++ /dev/null @@ -1,194 +0,0 @@ -## -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - - -# -# This file is to be used for compiling libaom for Android using the NDK. -# In an Android project place a libaom checkout in the jni directory. -# Run the configure script from the jni directory. Base libaom -# encoder/decoder configuration will look similar to: -# ./libaom/configure --target=armv7-android-gcc --disable-examples \ -# --sdk-path=/opt/android-ndk-r6b/ -# -# When targeting Android, realtime-only is enabled by default. This can -# be overridden by adding the command line flag: -# --disable-realtime-only -# -# This will create .mk files that contain variables that contain the -# source files to compile. -# -# Place an Android.mk file in the jni directory that references the -# Android.mk file in the libaom directory: -# LOCAL_PATH := $(call my-dir) -# include $(CLEAR_VARS) -# include jni/libaom/build/make/Android.mk -# -# There are currently two TARGET_ARCH_ABI targets for ARM. -# armeabi and armeabi-v7a. armeabi-v7a is selected by creating an -# Application.mk in the jni directory that contains: -# APP_ABI := armeabi-v7a -# -# By default libaom will detect at runtime the existance of NEON extension. -# For this we import the 'cpufeatures' module from the NDK sources. -# libaom can also be configured without this runtime detection method. -# Configuring with --disable-runtime-cpu-detect will assume presence of NEON. -# Configuring with --disable-runtime-cpu-detect --disable-neon \ -# --disable-neon-asm -# will remove any NEON dependency. -# -# Running ndk-build will build libaom and include it in your project. -# - -CONFIG_DIR := $(LOCAL_PATH)/ -LIBAOM_PATH := $(LOCAL_PATH)/libaom -ASM_CNV_PATH_LOCAL := $(TARGET_ARCH_ABI)/ads2gas -ASM_CNV_PATH := $(LOCAL_PATH)/$(ASM_CNV_PATH_LOCAL) - -# Use the makefiles generated by upstream configure to determine which files to -# build. Also set any architecture-specific flags. -ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) - include $(CONFIG_DIR)libs-armv7-android-gcc.mk - LOCAL_ARM_MODE := arm -else ifeq ($(TARGET_ARCH_ABI),arm64-v8a) - include $(CONFIG_DIR)libs-armv8-android-gcc.mk - LOCAL_ARM_MODE := arm -else ifeq ($(TARGET_ARCH_ABI),x86) - include $(CONFIG_DIR)libs-x86-android-gcc.mk -else ifeq ($(TARGET_ARCH_ABI),x86_64) - include $(CONFIG_DIR)libs-x86_64-android-gcc.mk -else ifeq ($(TARGET_ARCH_ABI),mips) - include $(CONFIG_DIR)libs-mips-android-gcc.mk -else - $(error Not a supported TARGET_ARCH_ABI: $(TARGET_ARCH_ABI)) -endif - -# Rule that is normally in Makefile created by libaom -# configure. Used to filter out source files based on configuration. -enabled=$(filter-out $($(1)-no),$($(1)-yes)) - -# Override the relative path that is defined by the libaom -# configure process -SRC_PATH_BARE := $(LIBAOM_PATH) - -# Include the list of files to be built -include $(LIBAOM_PATH)/libs.mk - -# Optimise the code. May want to revisit this setting in the future. -LOCAL_CFLAGS := -O3 - -# For x86, include the source code in the search path so it will find files -# like x86inc.asm and x86_abi_support.asm -LOCAL_ASMFLAGS := -I$(LIBAOM_PATH) - -.PRECIOUS: %.asm.s -$(ASM_CNV_PATH)/libaom/%.asm.s: $(LIBAOM_PATH)/%.asm - @mkdir -p $(dir $@) - @$(CONFIG_DIR)$(ASM_CONVERSION) <$< > $@ - -# For building *_rtcd.h, which have rules in libs.mk -TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN))) -target := libs - -LOCAL_SRC_FILES += aom_config.c - -# Remove duplicate entries -CODEC_SRCS_UNIQUE = $(sort $(CODEC_SRCS)) - -# Pull out C files. aom_config.c is in the immediate directory and -# so it does not need libaom/ prefixed like the rest of the source files. -# The neon files with intrinsics need to have .neon appended so the proper -# flags are applied. -CODEC_SRCS_C = $(filter %.c, $(CODEC_SRCS_UNIQUE)) -LOCAL_NEON_SRCS_C = $(filter %_neon.c, $(CODEC_SRCS_C)) -LOCAL_CODEC_SRCS_C = $(filter-out aom_config.c %_neon.c, $(CODEC_SRCS_C)) - -LOCAL_SRC_FILES += $(foreach file, $(LOCAL_CODEC_SRCS_C), libaom/$(file)) -ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) - LOCAL_SRC_FILES += $(foreach file, $(LOCAL_NEON_SRCS_C), libaom/$(file).neon) -else # If there are neon sources then we are building for arm64 and do not need to specify .neon - LOCAL_SRC_FILES += $(foreach file, $(LOCAL_NEON_SRCS_C), libaom/$(file)) -endif - -# Pull out assembly files, splitting NEON from the rest. This is -# done to specify that the NEON assembly files use NEON assembler flags. -# x86 assembly matches %.asm, arm matches %.asm.s - -# x86: - -CODEC_SRCS_ASM_X86 = $(filter %.asm, $(CODEC_SRCS_UNIQUE)) -LOCAL_SRC_FILES += $(foreach file, $(CODEC_SRCS_ASM_X86), libaom/$(file)) - -# arm: -CODEC_SRCS_ASM_ARM_ALL = $(filter %.asm.s, $(CODEC_SRCS_UNIQUE)) -CODEC_SRCS_ASM_ARM = $(foreach v, \ - $(CODEC_SRCS_ASM_ARM_ALL), \ - $(if $(findstring neon,$(v)),,$(v))) -CODEC_SRCS_ASM_ADS2GAS = $(patsubst %.s, \ - $(ASM_CNV_PATH_LOCAL)/libaom/%.s, \ - $(CODEC_SRCS_ASM_ARM)) -LOCAL_SRC_FILES += $(CODEC_SRCS_ASM_ADS2GAS) - -ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) - CODEC_SRCS_ASM_NEON = $(foreach v, \ - $(CODEC_SRCS_ASM_ARM_ALL),\ - $(if $(findstring neon,$(v)),$(v),)) - CODEC_SRCS_ASM_NEON_ADS2GAS = $(patsubst %.s, \ - $(ASM_CNV_PATH_LOCAL)/libaom/%.s, \ - $(CODEC_SRCS_ASM_NEON)) - LOCAL_SRC_FILES += $(patsubst %.s, \ - %.s.neon, \ - $(CODEC_SRCS_ASM_NEON_ADS2GAS)) -endif - -LOCAL_CFLAGS += \ - -DHAVE_CONFIG_H=aom_config.h \ - -I$(LIBAOM_PATH) \ - -I$(ASM_CNV_PATH) - -LOCAL_MODULE := libaom - -ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes) - LOCAL_STATIC_LIBRARIES := cpufeatures -endif - -# Add a dependency to force generation of the RTCD files. -define rtcd_dep_template -rtcd_dep_template_SRCS := $(addprefix $(LOCAL_PATH)/, $(LOCAL_SRC_FILES)) -rtcd_dep_template_SRCS := $$(rtcd_dep_template_SRCS:.neon=) -ifeq ($(CONFIG_AV1), yes) -$$(rtcd_dep_template_SRCS): av1_rtcd.h -endif -$$(rtcd_dep_template_SRCS): aom_scale_rtcd.h -$$(rtcd_dep_template_SRCS): aom_dsp_rtcd.h - -ifneq ($(findstring $(TARGET_ARCH_ABI),x86 x86_64),) -$$(rtcd_dep_template_SRCS): aom_config.asm -endif -endef - -$(eval $(call rtcd_dep_template)) - -.PHONY: clean -clean: - @echo "Clean: ads2gas files [$(TARGET_ARCH_ABI)]" - @$(RM) $(CODEC_SRCS_ASM_ADS2GAS) $(CODEC_SRCS_ASM_NEON_ADS2GAS) - @$(RM) -r $(ASM_CNV_PATH) - @$(RM) $(CLEAN-OBJS) - -ifeq ($(ENABLE_SHARED),1) - include $(BUILD_SHARED_LIBRARY) -else - include $(BUILD_STATIC_LIBRARY) -endif - -ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes) -$(call import-module,cpufeatures) -endif diff --git a/build/make/Makefile b/build/make/Makefile deleted file mode 100644 index 0b869db0a1..0000000000 --- a/build/make/Makefile +++ /dev/null @@ -1,466 +0,0 @@ -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - - -include config.mk -quiet?=true -ifeq ($(target),) -# If a target wasn't specified, invoke for all enabled targets. -.DEFAULT: - @for t in $(ALL_TARGETS); do \ - $(MAKE) --no-print-directory target=$$t $(MAKECMDGOALS) || exit $$?;\ - done -all: .DEFAULT -clean:: .DEFAULT -exampletest: .DEFAULT -install:: .DEFAULT -test:: .DEFAULT -test-no-data-check:: .DEFAULT -testdata:: .DEFAULT -utiltest: .DEFAULT -exampletest-no-data-check utiltest-no-data-check: .DEFAULT -test_%: .DEFAULT ; - -# Note: md5sum is not installed on OS X, but openssl is. Openssl may not be -# installed on cygwin, so we need to autodetect here. -md5sum := $(firstword $(wildcard \ - $(foreach e,md5sum openssl,\ - $(foreach p,$(subst :, ,$(PATH)),$(p)/$(e)*))\ - )) -md5sum := $(if $(filter %openssl,$(md5sum)),$(md5sum) dgst -md5,$(md5sum)) - -TGT_CC:=$(word 3, $(subst -, ,$(TOOLCHAIN))) -dist: - @for t in $(ALL_TARGETS); do \ - $(MAKE) --no-print-directory target=$$t $(MAKECMDGOALS) || exit $$?;\ - done - # Run configure for the user with the current toolchain. - @if [ -d "$(DIST_DIR)/src" ]; then \ - mkdir -p "$(DIST_DIR)/build"; \ - cd "$(DIST_DIR)/build"; \ - echo "Rerunning configure $(CONFIGURE_ARGS)"; \ - ../src/configure $(CONFIGURE_ARGS); \ - $(if $(filter vs%,$(TGT_CC)),make NO_LAUNCH_DEVENV=1;) \ - fi - @if [ -d "$(DIST_DIR)" ]; then \ - echo " [MD5SUM] $(DIST_DIR)"; \ - cd $(DIST_DIR) && \ - $(md5sum) `find . -name md5sums.txt -prune -o -type f -print` \ - | sed -e 's/MD5(\(.*\))= \([0-9a-f]\{32\}\)/\2 \1/' \ - > md5sums.txt;\ - fi -endif - -# Since we invoke make recursively for multiple targets we need to include the -# .mk file for the correct target, but only when $(target) is non-empty. -ifneq ($(target),) -include $(target)-$(TOOLCHAIN).mk -endif -BUILD_ROOT?=. -VPATH=$(SRC_PATH_BARE) -CFLAGS+=-I$(BUILD_PFX)$(BUILD_ROOT) -I$(SRC_PATH) -CXXFLAGS+=-I$(BUILD_PFX)$(BUILD_ROOT) -I$(SRC_PATH) -ASFLAGS+=-I$(BUILD_PFX)$(BUILD_ROOT)/ -I$(SRC_PATH)/ -DIST_DIR?=dist -HOSTCC?=gcc -TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN))) -TGT_OS:=$(word 2, $(subst -, ,$(TOOLCHAIN))) -TGT_CC:=$(word 3, $(subst -, ,$(TOOLCHAIN))) -quiet:=$(if $(or $(verbose), $(V)),, yes) -qexec=$(if $(quiet),@) - -# Cancel built-in implicit rules -%: %.o -%.asm: -%.a: -%: %.cc - -# -# Common rules" -# -.PHONY: all -all: - -.PHONY: clean -clean:: - rm -f $(OBJS-yes) $(OBJS-yes:.o=.d) $(OBJS-yes:.asm.s.o=.asm.s) - rm -f $(CLEAN-OBJS) - -.PHONY: clean -distclean: clean - if [ -z "$(target)" ]; then \ - rm -f Makefile; \ - rm -f config.log config.mk; \ - rm -f aom_config.[hc] aom_config.asm; \ - else \ - rm -f $(target)-$(TOOLCHAIN).mk; \ - fi - -.PHONY: dist -dist: -.PHONY: exampletest -exampletest: -.PHONY: install -install:: -.PHONY: test -test:: -.PHONY: testdata -testdata:: -.PHONY: utiltest -utiltest: -.PHONY: test-no-data-check exampletest-no-data-check utiltest-no-data-check -test-no-data-check:: -exampletest-no-data-check utiltest-no-data-check: - -# Force to realign stack always on OS/2 -ifeq ($(TOOLCHAIN), x86-os2-gcc) -CFLAGS += -mstackrealign -endif - -$(BUILD_PFX)%_mmx.c.d: CFLAGS += -mmmx -$(BUILD_PFX)%_mmx.c.o: CFLAGS += -mmmx -$(BUILD_PFX)%_sse2.c.d: CFLAGS += -msse2 -$(BUILD_PFX)%_sse2.c.o: CFLAGS += -msse2 -$(BUILD_PFX)%_sse3.c.d: CFLAGS += -msse3 -$(BUILD_PFX)%_sse3.c.o: CFLAGS += -msse3 -$(BUILD_PFX)%_ssse3.c.d: CFLAGS += -mssse3 -$(BUILD_PFX)%_ssse3.c.o: CFLAGS += -mssse3 -$(BUILD_PFX)%_sse4.c.d: CFLAGS += -msse4.1 -$(BUILD_PFX)%_sse4.c.o: CFLAGS += -msse4.1 -$(BUILD_PFX)%_avx.c.d: CFLAGS += -mavx -$(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx -$(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2 -$(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2 -$(BUILD_PFX)%_mmx.cc.d: CXXFLAGS += -mmmx -$(BUILD_PFX)%_mmx.cc.o: CXXFLAGS += -mmmx -$(BUILD_PFX)%_sse2.cc.d: CXXFLAGS += -msse2 -$(BUILD_PFX)%_sse2.cc.o: CXXFLAGS += -msse2 -$(BUILD_PFX)%_sse3.cc.d: CXXFLAGS += -msse3 -$(BUILD_PFX)%_sse3.cc.o: CXXFLAGS += -msse3 -$(BUILD_PFX)%_ssse3.cc.d: CXXFLAGS += -mssse3 -$(BUILD_PFX)%_ssse3.cc.o: CXXFLAGS += -mssse3 -$(BUILD_PFX)%_sse4.cc.d: CXXFLAGS += -msse4.1 -$(BUILD_PFX)%_sse4.cc.o: CXXFLAGS += -msse4.1 -$(BUILD_PFX)%_avx.cc.d: CXXFLAGS += -mavx -$(BUILD_PFX)%_avx.cc.o: CXXFLAGS += -mavx -$(BUILD_PFX)%_avx2.cc.d: CXXFLAGS += -mavx2 -$(BUILD_PFX)%_avx2.cc.o: CXXFLAGS += -mavx2 - -$(BUILD_PFX)%.c.d: %.c - $(if $(quiet),@echo " [DEP] $@") - $(qexec)mkdir -p $(dir $@) - $(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -M $< | $(fmt_deps) > $@ - -$(BUILD_PFX)%.c.o: %.c - $(if $(quiet),@echo " [CC] $@") - $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) - $(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -c -o $@ $< - -$(BUILD_PFX)%.cc.d: %.cc - $(if $(quiet),@echo " [DEP] $@") - $(qexec)mkdir -p $(dir $@) - $(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -M $< | $(fmt_deps) > $@ - -$(BUILD_PFX)%.cc.o: %.cc - $(if $(quiet),@echo " [CXX] $@") - $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) - $(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $< - -$(BUILD_PFX)%.cpp.d: %.cpp - $(if $(quiet),@echo " [DEP] $@") - $(qexec)mkdir -p $(dir $@) - $(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -M $< | $(fmt_deps) > $@ - -$(BUILD_PFX)%.cpp.o: %.cpp - $(if $(quiet),@echo " [CXX] $@") - $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) - $(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $< - -$(BUILD_PFX)%.asm.d: %.asm - $(if $(quiet),@echo " [DEP] $@") - $(qexec)mkdir -p $(dir $@) - $(qexec)$(SRC_PATH_BARE)/build/make/gen_asm_deps.sh \ - --build-pfx=$(BUILD_PFX) --depfile=$@ $(ASFLAGS) $< > $@ - -$(BUILD_PFX)%.asm.o: %.asm - $(if $(quiet),@echo " [AS] $@") - $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) - $(qexec)$(AS) $(ASFLAGS) -o $@ $< - -$(BUILD_PFX)%.s.d: %.s - $(if $(quiet),@echo " [DEP] $@") - $(qexec)mkdir -p $(dir $@) - $(qexec)$(SRC_PATH_BARE)/build/make/gen_asm_deps.sh \ - --build-pfx=$(BUILD_PFX) --depfile=$@ $(ASFLAGS) $< > $@ - -$(BUILD_PFX)%.s.o: %.s - $(if $(quiet),@echo " [AS] $@") - $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) - $(qexec)$(AS) $(ASFLAGS) -o $@ $< - -.PRECIOUS: %.c.S -%.c.S: CFLAGS += -DINLINE_ASM -$(BUILD_PFX)%.c.S: %.c - $(if $(quiet),@echo " [GEN] $@") - $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@)) - $(qexec)$(CC) -S $(CFLAGS) -o $@ $< - -.PRECIOUS: %.asm.s -$(BUILD_PFX)%.asm.s: %.asm - $(if $(quiet),@echo " [ASM CONVERSION] $@") - $(qexec)mkdir -p $(dir $@) - $(qexec)$(ASM_CONVERSION) <$< >$@ - -# If we're in debug mode, pretend we don't have GNU strip, to fall back to -# the copy implementation -HAVE_GNU_STRIP := $(if $(CONFIG_DEBUG),,$(HAVE_GNU_STRIP)) -ifeq ($(HAVE_GNU_STRIP),yes) -# Older binutils strip global symbols not needed for relocation processing -# when given --strip-unneeded. Using nm and awk to identify globals and -# keep them caused command line length issues under mingw and segfaults in -# test_libaom were observed under OS/2: simply use --strip-debug. -%.a: %_g.a - $(if $(quiet),@echo " [STRIP] $@ < $<") - $(qexec)$(STRIP) --strip-debug \ - -o $@ $< -else -%.a: %_g.a - $(if $(quiet),@echo " [CP] $@ < $<") - $(qexec)cp $< $@ -endif - -# -# Utility functions -# -pairmap=$(if $(strip $(2)),\ - $(call $(1),$(word 1,$(2)),$(word 2,$(2)))\ - $(call pairmap,$(1),$(wordlist 3,$(words $(2)),$(2)))\ -) - -enabled=$(filter-out $($(1)-no),$($(1)-yes)) -cond_enabled=$(if $(filter yes,$($(1))), $(call enabled,$(2))) - -find_file1=$(word 1,$(wildcard $(subst //,/,$(addsuffix /$(1),$(2))))) -find_file=$(foreach f,$(1),$(call find_file1,$(strip $(f)),$(strip $(2))) ) -obj_pats=.c=.c.o $(AS_SFX)=$(AS_SFX).o .cc=.cc.o .cpp=.cpp.o -objs=$(addprefix $(BUILD_PFX),$(foreach p,$(obj_pats),$(filter %.o,$(1:$(p))) )) - -install_map_templates=$(eval $(call install_map_template,$(1),$(2))) - -not=$(subst yes,no,$(1)) - -ifeq ($(CONFIG_MSVS),yes) -lib_file_name=$(1).lib -else -lib_file_name=lib$(1).a -endif -# -# Rule Templates -# -define linker_template -$(1): $(filter-out -%,$(2)) -$(1): - $(if $(quiet),@echo " [LD] $$@") - $(qexec)$$(LD) $$(strip $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs)) -endef -define linkerxx_template -$(1): $(filter-out -%,$(2)) -$(1): - $(if $(quiet),@echo " [LD] $$@") - $(qexec)$$(CXX) $$(strip $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs)) -endef -# make-3.80 has a bug with expanding large input strings to the eval function, -# which was triggered in some cases by the following component of -# linker_template: -# $(1): $$(call find_file, $(patsubst -l%,lib%.a,$(filter -l%,$(2))),\ -# $$(patsubst -L%,%,$$(filter -L%,$$(LDFLAGS) $(2)))) -# This may be useful to revisit in the future (it tries to locate libraries -# in a search path and add them as prerequisites - -define install_map_template -$(DIST_DIR)/$(1): $(2) - $(if $(quiet),@echo " [INSTALL] $$@") - $(qexec)mkdir -p $$(dir $$@) - $(qexec)cp -p $$< $$@ -endef - -define archive_template -# Not using a pattern rule here because we don't want to generate empty -# archives when they are listed as a dependency in files not responsible -# for creating them. -$(1): - $(if $(quiet),@echo " [AR] $$@") - $(qexec)$$(AR) $$(ARFLAGS) $$@ $$^ -endef - -define so_template -# Not using a pattern rule here because we don't want to generate empty -# archives when they are listed as a dependency in files not responsible -# for creating them. -# -# This needs further abstraction for dealing with non-GNU linkers. -$(1): - $(if $(quiet),@echo " [LD] $$@") - $(qexec)$$(LD) -shared $$(LDFLAGS) \ - -Wl,--no-undefined -Wl,-soname,$$(SONAME) \ - -Wl,--version-script,$$(EXPORTS_FILE) -o $$@ \ - $$(filter %.o,$$^) $$(extralibs) -endef - -define dl_template -# Not using a pattern rule here because we don't want to generate empty -# archives when they are listed as a dependency in files not responsible -# for creating them. -$(1): - $(if $(quiet),@echo " [LD] $$@") - $(qexec)$$(LD) -dynamiclib $$(LDFLAGS) \ - -exported_symbols_list $$(EXPORTS_FILE) \ - -Wl,-headerpad_max_install_names,-compatibility_version,1.0,-current_version,$$(VERSION_MAJOR) \ - -o $$@ \ - $$(filter %.o,$$^) $$(extralibs) -endef - -define dll_template -# Not using a pattern rule here because we don't want to generate empty -# archives when they are listed as a dependency in files not responsible -# for creating them. -$(1): - $(if $(quiet),@echo " [LD] $$@") - $(qexec)$$(LD) -Zdll $$(LDFLAGS) \ - -o $$@ \ - $$(filter %.o,$$^) $$(extralibs) $$(EXPORTS_FILE) -endef - - -# -# Get current configuration -# -ifneq ($(target),) -include $(SRC_PATH_BARE)/$(target:-$(TOOLCHAIN)=).mk -endif - -skip_deps := $(filter %clean,$(MAKECMDGOALS)) -skip_deps += $(findstring testdata,$(MAKECMDGOALS)) -ifeq ($(strip $(skip_deps)),) - ifeq ($(CONFIG_DEPENDENCY_TRACKING),yes) - # Older versions of make don't like -include directives with no arguments - ifneq ($(filter %.d,$(OBJS-yes:.o=.d)),) - -include $(filter %.d,$(OBJS-yes:.o=.d)) - endif - endif -endif - -# -# Configuration dependent rules -# -$(call pairmap,install_map_templates,$(INSTALL_MAPS)) - -DOCS=$(call cond_enabled,CONFIG_INSTALL_DOCS,DOCS) -.docs: $(DOCS) - @touch $@ - -INSTALL-DOCS=$(call cond_enabled,CONFIG_INSTALL_DOCS,INSTALL-DOCS) -ifeq ($(MAKECMDGOALS),dist) -INSTALL-DOCS+=$(call cond_enabled,CONFIG_INSTALL_DOCS,DIST-DOCS) -endif -.install-docs: .docs $(addprefix $(DIST_DIR)/,$(INSTALL-DOCS)) - @touch $@ - -clean:: - rm -f .docs .install-docs $(DOCS) - -BINS=$(call enabled,BINS) -.bins: $(BINS) - @touch $@ - -INSTALL-BINS=$(call cond_enabled,CONFIG_INSTALL_BINS,INSTALL-BINS) -ifeq ($(MAKECMDGOALS),dist) -INSTALL-BINS+=$(call cond_enabled,CONFIG_INSTALL_BINS,DIST-BINS) -endif -.install-bins: .bins $(addprefix $(DIST_DIR)/,$(INSTALL-BINS)) - @touch $@ - -clean:: - rm -f .bins .install-bins $(BINS) - -LIBS=$(call enabled,LIBS) -.libs: $(LIBS) - @touch $@ -$(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib)))) -$(foreach lib,$(filter %so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib)))) -$(foreach lib,$(filter %$(SO_VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib)))) -$(foreach lib,$(filter %$(SO_VERSION_MAJOR).dll,$(LIBS)),$(eval $(call dll_template,$(lib)))) - -INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS) -ifeq ($(MAKECMDGOALS),dist) -INSTALL-LIBS+=$(call cond_enabled,CONFIG_INSTALL_LIBS,DIST-LIBS) -endif -.install-libs: .libs $(addprefix $(DIST_DIR)/,$(INSTALL-LIBS)) - @touch $@ - -clean:: - rm -f .libs .install-libs $(LIBS) - -ifeq ($(CONFIG_EXTERNAL_BUILD),yes) -PROJECTS=$(call enabled,PROJECTS) -.projects: $(PROJECTS) - @touch $@ - -INSTALL-PROJECTS=$(call cond_enabled,CONFIG_INSTALL_PROJECTS,INSTALL-PROJECTS) -ifeq ($(MAKECMDGOALS),dist) -INSTALL-PROJECTS+=$(call cond_enabled,CONFIG_INSTALL_PROJECTS,DIST-PROJECTS) -endif -.install-projects: .projects $(addprefix $(DIST_DIR)/,$(INSTALL-PROJECTS)) - @touch $@ - -clean:: - rm -f .projects .install-projects $(PROJECTS) -endif - -# If there are any source files to be distributed, then include the build -# system too. -ifneq ($(call enabled,DIST-SRCS),) - DIST-SRCS-yes += configure - DIST-SRCS-yes += build/make/configure.sh - DIST-SRCS-yes += build/make/gen_asm_deps.sh - DIST-SRCS-yes += build/make/Makefile - DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_def.sh - DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_sln.sh - DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_vcxproj.sh - DIST-SRCS-$(CONFIG_MSVS) += build/make/msvs_common.sh - DIST-SRCS-$(CONFIG_RVCT) += build/make/armlink_adapter.sh - DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas.pl - DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas_apple.pl - DIST-SRCS-$(ARCH_ARM) += build/make/ads2armasm_ms.pl - DIST-SRCS-$(ARCH_ARM) += build/make/thumb.pm - DIST-SRCS-yes += $(target:-$(TOOLCHAIN)=).mk -endif -INSTALL-SRCS := $(call cond_enabled,CONFIG_INSTALL_SRCS,INSTALL-SRCS) -ifeq ($(MAKECMDGOALS),dist) -INSTALL-SRCS += $(call cond_enabled,CONFIG_INSTALL_SRCS,DIST-SRCS) -endif -.install-srcs: $(addprefix $(DIST_DIR)/src/,$(INSTALL-SRCS)) - @touch $@ - -clean:: - rm -f .install-srcs - -ifeq ($(CONFIG_EXTERNAL_BUILD),yes) - BUILD_TARGETS += .projects - INSTALL_TARGETS += .install-projects -endif -BUILD_TARGETS += .docs .libs .bins -INSTALL_TARGETS += .install-docs .install-srcs .install-libs .install-bins -all: $(BUILD_TARGETS) -install:: $(INSTALL_TARGETS) -dist: $(INSTALL_TARGETS) -test:: - -.SUFFIXES: # Delete default suffix rules diff --git a/build/make/armlink_adapter.sh b/build/make/armlink_adapter.sh deleted file mode 100755 index 85c6c96c13..0000000000 --- a/build/make/armlink_adapter.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - -verbose=0 -set -- $* -for i; do - if [ "$i" = "-o" ]; then - on_of=1 - elif [ "$i" = "-v" ]; then - verbose=1 - elif [ "$i" = "-g" ]; then - args="${args} --debug" - elif [ "$on_of" = "1" ]; then - outfile=$i - on_of=0 - elif [ -f "$i" ]; then - infiles="$infiles $i" - elif [ "${i#-l}" != "$i" ]; then - libs="$libs ${i#-l}" - elif [ "${i#-L}" != "$i" ]; then - libpaths="${libpaths} ${i#-L}" - else - args="${args} ${i}" - fi - shift -done - -# Absolutize library file names -for f in $libs; do - found=0 - for d in $libpaths; do - [ -f "$d/$f" ] && infiles="$infiles $d/$f" && found=1 && break - [ -f "$d/lib${f}.so" ] && infiles="$infiles $d/lib${f}.so" && found=1 && break - [ -f "$d/lib${f}.a" ] && infiles="$infiles $d/lib${f}.a" && found=1 && break - done - [ $found -eq 0 ] && infiles="$infiles $f" -done -for d in $libpaths; do - [ -n "$libsearchpath" ] && libsearchpath="${libsearchpath}," - libsearchpath="${libsearchpath}$d" -done - -cmd="armlink $args --userlibpath=$libsearchpath --output=$outfile $infiles" -[ $verbose -eq 1 ] && echo $cmd -$cmd diff --git a/build/make/configure.sh b/build/make/configure.sh deleted file mode 100644 index 44c706fcfb..0000000000 --- a/build/make/configure.sh +++ /dev/null @@ -1,1521 +0,0 @@ -#!/bin/sh -## -## configure.sh -## -## This script is sourced by the main configure script and contains -## utility functions and other common bits that aren't strictly libaom -## related. -## -## This build system is based in part on the FFmpeg configure script. -## - - -# -# Logging / Output Functions -# -die_unknown(){ - echo "Unknown option \"$1\"." - echo "See $0 --help for available options." - clean_temp_files - exit 1 -} - -die() { - echo "$@" - echo - echo "Configuration failed. This could reflect a misconfiguration of your" - echo "toolchains, improper options selected, or another problem. If you" - echo "don't see any useful error messages above, the next step is to look" - echo "at the configure error log file ($logfile) to determine what" - echo "configure was trying to do when it died." - clean_temp_files - exit 1 -} - -log(){ - echo "$@" >>$logfile -} - -log_file(){ - log BEGIN $1 - cat -n $1 >>$logfile - log END $1 -} - -log_echo() { - echo "$@" - log "$@" -} - -fwrite () { - outfile=$1 - shift - echo "$@" >> ${outfile} -} - -show_help_pre(){ - for opt in ${CMDLINE_SELECT}; do - opt2=`echo $opt | sed -e 's;_;-;g'` - if enabled $opt; then - eval "toggle_${opt}=\"--disable-${opt2}\"" - else - eval "toggle_${opt}=\"--enable-${opt2} \"" - fi - done - - cat <<EOF -Usage: configure [options] -Options: - -Build options: - --help print this message - --log=yes|no|FILE file configure log is written to [config.log] - --target=TARGET target platform tuple [generic-gnu] - --cpu=CPU optimize for a specific cpu rather than a family - --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS] - --extra-cxxflags=ECXXFLAGS add ECXXFLAGS to CXXFLAGS [$CXXFLAGS] - ${toggle_extra_warnings} emit harmless warnings (always non-fatal) - ${toggle_werror} treat warnings as errors, if possible - (not available with all compilers) - ${toggle_optimizations} turn on/off compiler optimization flags - ${toggle_pic} turn on/off Position Independent Code - ${toggle_ccache} turn on/off compiler cache - ${toggle_debug} enable/disable debug mode - ${toggle_gprof} enable/disable gprof profiling instrumentation - ${toggle_gcov} enable/disable gcov coverage instrumentation - ${toggle_thumb} enable/disable building arm assembly in thumb mode - ${toggle_dependency_tracking} - disable to speed up one-time build - -Install options: - ${toggle_install_docs} control whether docs are installed - ${toggle_install_bins} control whether binaries are installed - ${toggle_install_libs} control whether libraries are installed - ${toggle_install_srcs} control whether sources are installed - - -EOF -} - -show_help_post(){ - cat <<EOF - - -NOTES: - Object files are built at the place where configure is launched. - - All boolean options can be negated. The default value is the opposite - of that shown above. If the option --disable-foo is listed, then - the default value for foo is enabled. - -Supported targets: -EOF - show_targets ${all_platforms} - echo - exit 1 -} - -show_targets() { - while [ -n "$*" ]; do - if [ "${1%%-*}" = "${2%%-*}" ]; then - if [ "${2%%-*}" = "${3%%-*}" ]; then - printf " %-24s %-24s %-24s\n" "$1" "$2" "$3" - shift; shift; shift - else - printf " %-24s %-24s\n" "$1" "$2" - shift; shift - fi - else - printf " %-24s\n" "$1" - shift - fi - done -} - -show_help() { - show_help_pre - show_help_post -} - -# -# List Processing Functions -# -set_all(){ - value=$1 - shift - for var in $*; do - eval $var=$value - done -} - -is_in(){ - value=$1 - shift - for var in $*; do - [ $var = $value ] && return 0 - done - return 1 -} - -add_cflags() { - CFLAGS="${CFLAGS} $@" - CXXFLAGS="${CXXFLAGS} $@" -} - -add_cflags_only() { - CFLAGS="${CFLAGS} $@" -} - -add_cxxflags_only() { - CXXFLAGS="${CXXFLAGS} $@" -} - -add_ldflags() { - LDFLAGS="${LDFLAGS} $@" -} - -add_asflags() { - ASFLAGS="${ASFLAGS} $@" -} - -add_extralibs() { - extralibs="${extralibs} $@" -} - -# -# Boolean Manipulation Functions -# - -enable_feature(){ - set_all yes $* -} - -disable_feature(){ - set_all no $* -} - -enabled(){ - eval test "x\$$1" = "xyes" -} - -disabled(){ - eval test "x\$$1" = "xno" -} - -enable_codec(){ - enabled "${1}" || echo " enabling ${1}" - enable_feature "${1}" - - is_in "${1}" av1 && enable_feature "${1}_encoder" "${1}_decoder" -} - -disable_codec(){ - disabled "${1}" || echo " disabling ${1}" - disable_feature "${1}" - - is_in "${1}" av1 && disable_feature "${1}_encoder" "${1}_decoder" -} - -# Iterates through positional parameters, checks to confirm the parameter has -# not been explicitly (force) disabled, and enables the setting controlled by -# the parameter when the setting is not disabled. -# Note: Does NOT alter RTCD generation options ($RTCD_OPTIONS). -soft_enable() { - for var in $*; do - if ! disabled $var; then - enabled $var || log_echo " enabling $var" - enable_feature $var - fi - done -} - -# Iterates through positional parameters, checks to confirm the parameter has -# not been explicitly (force) enabled, and disables the setting controlled by -# the parameter when the setting is not enabled. -# Note: Does NOT alter RTCD generation options ($RTCD_OPTIONS). -soft_disable() { - for var in $*; do - if ! enabled $var; then - disabled $var || log_echo " disabling $var" - disable_feature $var - fi - done -} - -# -# Text Processing Functions -# -toupper(){ - echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ -} - -tolower(){ - echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz -} - -# -# Temporary File Functions -# -source_path=${0%/*} -enable_feature source_path_used -if [ -z "$source_path" ] || [ "$source_path" = "." ]; then - source_path="`pwd`" - disable_feature source_path_used -fi - -if test ! -z "$TMPDIR" ; then - TMPDIRx="${TMPDIR}" -elif test ! -z "$TEMPDIR" ; then - TMPDIRx="${TEMPDIR}" -else - TMPDIRx="/tmp" -fi -RAND=$(awk 'BEGIN { srand(); printf "%d\n",(rand() * 32768)}') -TMP_H="${TMPDIRx}/aom-conf-$$-${RAND}.h" -TMP_C="${TMPDIRx}/aom-conf-$$-${RAND}.c" -TMP_CC="${TMPDIRx}/aom-conf-$$-${RAND}.cc" -TMP_O="${TMPDIRx}/aom-conf-$$-${RAND}.o" -TMP_X="${TMPDIRx}/aom-conf-$$-${RAND}.x" -TMP_ASM="${TMPDIRx}/aom-conf-$$-${RAND}.asm" - -clean_temp_files() { - rm -f ${TMP_C} ${TMP_CC} ${TMP_H} ${TMP_O} ${TMP_X} ${TMP_ASM} - enabled gcov && rm -f ${TMP_C%.c}.gcno ${TMP_CC%.cc}.gcno -} - -# -# Toolchain Check Functions -# -check_cmd() { - enabled external_build && return - log "$@" - "$@" >>${logfile} 2>&1 -} - -check_cc() { - log check_cc "$@" - cat >${TMP_C} - log_file ${TMP_C} - check_cmd ${CC} ${CFLAGS} "$@" -c -o ${TMP_O} ${TMP_C} -} - -check_cxx() { - log check_cxx "$@" - cat >${TMP_CC} - log_file ${TMP_CC} - check_cmd ${CXX} ${CXXFLAGS} "$@" -c -o ${TMP_O} ${TMP_CC} -} - -check_cpp() { - log check_cpp "$@" - cat > ${TMP_C} - log_file ${TMP_C} - check_cmd ${CC} ${CFLAGS} "$@" -E -o ${TMP_O} ${TMP_C} -} - -check_ld() { - log check_ld "$@" - check_cc $@ \ - && check_cmd ${LD} ${LDFLAGS} "$@" -o ${TMP_X} ${TMP_O} ${extralibs} -} - -check_header(){ - log check_header "$@" - header=$1 - shift - var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'` - disable_feature $var - check_cpp "$@" <<EOF && enable_feature $var -#include "$header" -int x; -EOF -} - -check_cflags() { - log check_cflags "$@" - check_cc -Werror "$@" <<EOF -int x; -EOF -} - -check_cxxflags() { - log check_cxxflags "$@" - - # Catch CFLAGS that trigger CXX warnings - case "$CXX" in - *c++-analyzer|*clang++|*g++*) - check_cxx -Werror "$@" <<EOF -int x; -EOF - ;; - *) - check_cxx -Werror "$@" <<EOF -int x; -EOF - ;; - esac -} - -check_add_cflags() { - check_cxxflags "$@" && add_cxxflags_only "$@" - check_cflags "$@" && add_cflags_only "$@" -} - -check_add_cxxflags() { - check_cxxflags "$@" && add_cxxflags_only "$@" -} - -check_add_asflags() { - log add_asflags "$@" - add_asflags "$@" -} - -check_add_ldflags() { - log add_ldflags "$@" - add_ldflags "$@" -} - -check_asm_align() { - log check_asm_align "$@" - cat >${TMP_ASM} <<EOF -section .rodata -align 16 -EOF - log_file ${TMP_ASM} - check_cmd ${AS} ${ASFLAGS} -o ${TMP_O} ${TMP_ASM} - readelf -WS ${TMP_O} >${TMP_X} - log_file ${TMP_X} - if ! grep -q '\.rodata .* 16$' ${TMP_X}; then - die "${AS} ${ASFLAGS} does not support section alignment (nasm <=2.08?)" - fi -} - -# tests for -m$1 toggling the feature given in $2. If $2 is empty $1 is used. -check_gcc_machine_option() { - opt="$1" - feature="$2" - [ -n "$feature" ] || feature="$opt" - - if enabled gcc && ! disabled "$feature" && ! check_cflags "-m$opt"; then - RTCD_OPTIONS="${RTCD_OPTIONS}--disable-$feature " - else - soft_enable "$feature" - fi -} - -write_common_config_banner() { - print_webm_license config.mk "##" "" - echo '# This file automatically generated by configure. Do not edit!' >> config.mk - echo "TOOLCHAIN := ${toolchain}" >> config.mk - - case ${toolchain} in - *-linux-rvct) - echo "ALT_LIBC := ${alt_libc}" >> config.mk - ;; - esac -} - -write_common_config_targets() { - for t in ${all_targets}; do - if enabled ${t}; then - if enabled child; then - fwrite config.mk "ALL_TARGETS += ${t}-${toolchain}" - else - fwrite config.mk "ALL_TARGETS += ${t}" - fi - fi - true; - done - true -} - -write_common_target_config_mk() { - saved_CC="${CC}" - saved_CXX="${CXX}" - enabled ccache && CC="ccache ${CC}" - enabled ccache && CXX="ccache ${CXX}" - print_webm_license $1 "##" "" - - cat >> $1 << EOF -# This file automatically generated by configure. Do not edit! -SRC_PATH="$source_path" -SRC_PATH_BARE=$source_path -BUILD_PFX=${BUILD_PFX} -TOOLCHAIN=${toolchain} -ASM_CONVERSION=${asm_conversion_cmd:-${source_path}/build/make/ads2gas.pl} -GEN_VCPROJ=${gen_vcproj_cmd} -MSVS_ARCH_DIR=${msvs_arch_dir} - -CC=${CC} -CXX=${CXX} -AR=${AR} -LD=${LD} -AS=${AS} -STRIP=${STRIP} -NM=${NM} - -CFLAGS = ${CFLAGS} -CXXFLAGS = ${CXXFLAGS} -ARFLAGS = crs\$(if \$(quiet),,v) -LDFLAGS = ${LDFLAGS} -ASFLAGS = ${ASFLAGS} -extralibs = ${extralibs} -AS_SFX = ${AS_SFX:-.asm} -EXE_SFX = ${EXE_SFX} -VCPROJ_SFX = ${VCPROJ_SFX} -RTCD_OPTIONS = ${RTCD_OPTIONS} -WX_CXXFLAGS = ${WX_CXXFLAGS} -WX_LDFLAGS = ${WX_LDFLAGS} -EOF - - if enabled rvct; then cat >> $1 << EOF -fmt_deps = sed -e 's;^__image.axf;\${@:.d=.o} \$@;' #hide -EOF - else cat >> $1 << EOF -fmt_deps = sed -e 's;^\([a-zA-Z0-9_]*\)\.o;\${@:.d=.o} \$@;' -EOF - fi - - print_config_mk ARCH "${1}" ${ARCH_LIST} - print_config_mk HAVE "${1}" ${HAVE_LIST} - print_config_mk CONFIG "${1}" ${CONFIG_LIST} - print_config_mk HAVE "${1}" gnu_strip - - enabled msvs && echo "CONFIG_VS_VERSION=${vs_version}" >> "${1}" - - CC="${saved_CC}" - CXX="${saved_CXX}" -} - -write_common_target_config_h() { - print_webm_license ${TMP_H} "/*" " */" - cat >> ${TMP_H} << EOF -/* This file automatically generated by configure. Do not edit! */ -#ifndef AOM_CONFIG_H -#define AOM_CONFIG_H -#define RESTRICT ${RESTRICT} -#define INLINE ${INLINE} -EOF - print_config_h ARCH "${TMP_H}" ${ARCH_LIST} - print_config_h HAVE "${TMP_H}" ${HAVE_LIST} - print_config_h CONFIG "${TMP_H}" ${CONFIG_LIST} - print_config_vars_h "${TMP_H}" ${VAR_LIST} - echo "#endif /* AOM_CONFIG_H */" >> ${TMP_H} - mkdir -p `dirname "$1"` - cmp "$1" ${TMP_H} >/dev/null 2>&1 || mv ${TMP_H} "$1" -} - -process_common_cmdline() { - for opt in "$@"; do - optval="${opt#*=}" - case "$opt" in - --child) - enable_feature child - ;; - --log*) - logging="$optval" - if ! disabled logging ; then - enabled logging || logfile="$logging" - else - logfile=/dev/null - fi - ;; - --target=*) - toolchain="${toolchain:-${optval}}" - ;; - --force-target=*) - toolchain="${toolchain:-${optval}}" - enable_feature force_toolchain - ;; - --cpu=*) - tune_cpu="$optval" - ;; - --extra-cflags=*) - extra_cflags="${optval}" - ;; - --extra-cxxflags=*) - extra_cxxflags="${optval}" - ;; - --enable-?*|--disable-?*) - eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'` - if is_in ${option} ${ARCH_EXT_LIST}; then - [ $action = "disable" ] && RTCD_OPTIONS="${RTCD_OPTIONS}--disable-${option} " - elif [ $action = "disable" ] && ! disabled $option ; then - is_in ${option} ${CMDLINE_SELECT} || die_unknown $opt - log_echo " disabling $option" - elif [ $action = "enable" ] && ! enabled $option ; then - is_in ${option} ${CMDLINE_SELECT} || die_unknown $opt - log_echo " enabling $option" - fi - ${action}_feature $option - ;; - --require-?*) - eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'` - if is_in ${option} ${ARCH_EXT_LIST}; then - RTCD_OPTIONS="${RTCD_OPTIONS}${opt} " - else - die_unknown $opt - fi - ;; - --force-enable-?*|--force-disable-?*) - eval `echo "$opt" | sed 's/--force-/action=/;s/-/ option=/;s/-/_/g'` - ${action}_feature $option - ;; - --libc=*) - [ -d "${optval}" ] || die "Not a directory: ${optval}" - disable_feature builtin_libc - alt_libc="${optval}" - ;; - --as=*) - [ "${optval}" = yasm ] || [ "${optval}" = nasm ] \ - || [ "${optval}" = auto ] \ - || die "Must be yasm, nasm or auto: ${optval}" - alt_as="${optval}" - ;; - --size-limit=*) - w="${optval%%x*}" - h="${optval##*x}" - VAR_LIST="DECODE_WIDTH_LIMIT ${w} DECODE_HEIGHT_LIMIT ${h}" - [ ${w} -gt 0 ] && [ ${h} -gt 0 ] || die "Invalid size-limit: too small." - [ ${w} -lt 65536 ] && [ ${h} -lt 65536 ] \ - || die "Invalid size-limit: too big." - enable_feature size_limit - ;; - --prefix=*) - prefix="${optval}" - ;; - --libdir=*) - libdir="${optval}" - ;; - --sdk-path=*) - [ -d "${optval}" ] || die "Not a directory: ${optval}" - sdk_path="${optval}" - ;; - --libc|--as|--prefix|--libdir|--sdk-path) - die "Option ${opt} requires argument" - ;; - --help|-h) - show_help - ;; - *) - die_unknown $opt - ;; - esac - done -} - -process_cmdline() { - for opt do - optval="${opt#*=}" - case "$opt" in - *) - process_common_cmdline $opt - ;; - esac - done -} - -post_process_common_cmdline() { - prefix="${prefix:-/usr/local}" - prefix="${prefix%/}" - libdir="${libdir:-${prefix}/lib}" - libdir="${libdir%/}" - if [ "${libdir#${prefix}}" = "${libdir}" ]; then - die "Libdir ${libdir} must be a subdirectory of ${prefix}" - fi -} - -post_process_cmdline() { - true; -} - -setup_gnu_toolchain() { - CC=${CC:-${CROSS}gcc} - CXX=${CXX:-${CROSS}g++} - AR=${AR:-${CROSS}ar} - LD=${LD:-${CROSS}${link_with_cc:-ld}} - AS=${AS:-${CROSS}as} - STRIP=${STRIP:-${CROSS}strip} - NM=${NM:-${CROSS}nm} - AS_SFX=.s - EXE_SFX= -} - -# Reliably find the newest available Darwin SDKs. (Older versions of -# xcrun don't support --show-sdk-path.) -show_darwin_sdk_path() { - xcrun --sdk $1 --show-sdk-path 2>/dev/null || - xcodebuild -sdk $1 -version Path 2>/dev/null -} - -# Print the major version number of the Darwin SDK specified by $1. -show_darwin_sdk_major_version() { - xcrun --sdk $1 --show-sdk-version 2>/dev/null | cut -d. -f1 -} - -# Print the Xcode version. -show_xcode_version() { - xcodebuild -version | head -n1 | cut -d' ' -f2 -} - -# Fails when Xcode version is less than 6.3. -check_xcode_minimum_version() { - xcode_major=$(show_xcode_version | cut -f1 -d.) - xcode_minor=$(show_xcode_version | cut -f2 -d.) - xcode_min_major=6 - xcode_min_minor=3 - if [ ${xcode_major} -lt ${xcode_min_major} ]; then - return 1 - fi - if [ ${xcode_major} -eq ${xcode_min_major} ] \ - && [ ${xcode_minor} -lt ${xcode_min_minor} ]; then - return 1 - fi -} - -process_common_toolchain() { - case "$toolchain" in - *-vs*) ;; - *) add_cflags_only -std=c99 ;; - esac - - if [ -z "$toolchain" ]; then - gcctarget="${CHOST:-$(gcc -dumpmachine 2> /dev/null)}" - - # detect tgt_isa - case "$gcctarget" in - aarch64*) - tgt_isa=arm64 - ;; - armv7*-hardfloat* | armv7*-gnueabihf | arm-*-gnueabihf) - tgt_isa=armv7 - float_abi=hard - ;; - armv7*) - tgt_isa=armv7 - float_abi=softfp - ;; - *x86_64*|*amd64*) - tgt_isa=x86_64 - ;; - *i[3456]86*) - tgt_isa=x86 - ;; - *sparc*) - tgt_isa=sparc - ;; - esac - - # detect tgt_os - case "$gcctarget" in - *darwin10*) - tgt_isa=x86_64 - tgt_os=darwin10 - ;; - *darwin11*) - tgt_isa=x86_64 - tgt_os=darwin11 - ;; - *darwin12*) - tgt_isa=x86_64 - tgt_os=darwin12 - ;; - *darwin13*) - tgt_isa=x86_64 - tgt_os=darwin13 - ;; - *darwin14*) - tgt_isa=x86_64 - tgt_os=darwin14 - ;; - *darwin15*) - tgt_isa=x86_64 - tgt_os=darwin15 - ;; - *darwin16*) - tgt_isa=x86_64 - tgt_os=darwin16 - ;; - x86_64*mingw32*) - tgt_os=win64 - ;; - *mingw32*|*cygwin*) - [ -z "$tgt_isa" ] && tgt_isa=x86 - tgt_os=win32 - ;; - *linux*|*bsd*) - tgt_os=linux - ;; - *solaris2.10) - tgt_os=solaris - ;; - *os2*) - tgt_os=os2 - ;; - esac - - if [ -n "$tgt_isa" ] && [ -n "$tgt_os" ]; then - toolchain=${tgt_isa}-${tgt_os}-gcc - fi - fi - - toolchain=${toolchain:-generic-gnu} - - is_in ${toolchain} ${all_platforms} || enabled force_toolchain \ - || die "Unrecognized toolchain '${toolchain}'" - - enabled child || log_echo "Configuring for target '${toolchain}'" - - # - # Set up toolchain variables - # - tgt_isa=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $1}') - tgt_os=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $2}') - tgt_cc=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $3}') - - # Mark the specific ISA requested as enabled - soft_enable ${tgt_isa} - enable_feature ${tgt_os} - enable_feature ${tgt_cc} - - # Enable the architecture family - case ${tgt_isa} in - arm*) - enable_feature arm - ;; - mips*) - enable_feature mips - ;; - esac - - # PIC is probably what we want when building shared libs - enabled shared && soft_enable pic - - # Minimum iOS version for all target platforms (darwin and iphonesimulator). - # Shared library framework builds are only possible on iOS 8 and later. - if enabled shared; then - IOS_VERSION_OPTIONS="--enable-shared" - IOS_VERSION_MIN="8.0" - else - IOS_VERSION_OPTIONS="" - IOS_VERSION_MIN="6.0" - fi - - # Handle darwin variants. Newer SDKs allow targeting older - # platforms, so use the newest one available. - case ${toolchain} in - arm*-darwin*) - add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}" - iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)" - if [ -d "${iphoneos_sdk_dir}" ]; then - add_cflags "-isysroot ${iphoneos_sdk_dir}" - add_ldflags "-isysroot ${iphoneos_sdk_dir}" - fi - ;; - x86*-darwin*) - osx_sdk_dir="$(show_darwin_sdk_path macosx)" - if [ -d "${osx_sdk_dir}" ]; then - add_cflags "-isysroot ${osx_sdk_dir}" - add_ldflags "-isysroot ${osx_sdk_dir}" - fi - ;; - esac - - case ${toolchain} in - *-darwin8-*) - add_cflags "-mmacosx-version-min=10.4" - add_ldflags "-mmacosx-version-min=10.4" - ;; - *-darwin9-*) - add_cflags "-mmacosx-version-min=10.5" - add_ldflags "-mmacosx-version-min=10.5" - ;; - *-darwin10-*) - add_cflags "-mmacosx-version-min=10.6" - add_ldflags "-mmacosx-version-min=10.6" - ;; - *-darwin11-*) - add_cflags "-mmacosx-version-min=10.7" - add_ldflags "-mmacosx-version-min=10.7" - ;; - *-darwin12-*) - add_cflags "-mmacosx-version-min=10.8" - add_ldflags "-mmacosx-version-min=10.8" - ;; - *-darwin13-*) - add_cflags "-mmacosx-version-min=10.9" - add_ldflags "-mmacosx-version-min=10.9" - ;; - *-darwin14-*) - add_cflags "-mmacosx-version-min=10.10" - add_ldflags "-mmacosx-version-min=10.10" - ;; - *-darwin15-*) - add_cflags "-mmacosx-version-min=10.11" - add_ldflags "-mmacosx-version-min=10.11" - ;; - *-darwin16-*) - add_cflags "-mmacosx-version-min=10.12" - add_ldflags "-mmacosx-version-min=10.12" - ;; - *-iphonesimulator-*) - add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}" - add_ldflags "-miphoneos-version-min=${IOS_VERSION_MIN}" - iossim_sdk_dir="$(show_darwin_sdk_path iphonesimulator)" - if [ -d "${iossim_sdk_dir}" ]; then - add_cflags "-isysroot ${iossim_sdk_dir}" - add_ldflags "-isysroot ${iossim_sdk_dir}" - fi - ;; - esac - - # Handle Solaris variants. Solaris 10 needs -lposix4 - case ${toolchain} in - sparc-solaris-*) - add_extralibs -lposix4 - ;; - *-solaris-*) - add_extralibs -lposix4 - ;; - esac - - # Process ARM architecture variants - case ${toolchain} in - arm*) - # on arm, isa versions are supersets - case ${tgt_isa} in - arm64|armv8) - soft_enable neon - ;; - armv7|armv7s) - soft_enable neon - # Only enable neon_asm when neon is also enabled. - enabled neon && soft_enable neon_asm - # If someone tries to force it through, die. - if disabled neon && enabled neon_asm; then - die "Disabling neon while keeping neon-asm is not supported" - fi - esac - - asm_conversion_cmd="cat" - - case ${tgt_cc} in - gcc) - link_with_cc=gcc - setup_gnu_toolchain - arch_int=${tgt_isa##armv} - arch_int=${arch_int%%te} - check_add_asflags --defsym ARCHITECTURE=${arch_int} - tune_cflags="-mtune=" - if [ ${tgt_isa} = "armv7" ] || [ ${tgt_isa} = "armv7s" ]; then - if [ -z "${float_abi}" ]; then - check_cpp <<EOF && float_abi=hard || float_abi=softfp -#ifndef __ARM_PCS_VFP -#error "not hardfp" -#endif -EOF - fi - check_add_cflags -march=armv7-a -mfloat-abi=${float_abi} - check_add_asflags -march=armv7-a -mfloat-abi=${float_abi} - - if enabled neon || enabled neon_asm; then - check_add_cflags -mfpu=neon #-ftree-vectorize - check_add_asflags -mfpu=neon - fi - elif [ ${tgt_isa} = "arm64" ] || [ ${tgt_isa} = "armv8" ]; then - check_add_cflags -march=armv8-a - check_add_asflags -march=armv8-a - else - check_add_cflags -march=${tgt_isa} - check_add_asflags -march=${tgt_isa} - fi - - enabled debug && add_asflags -g - asm_conversion_cmd="${source_path}/build/make/ads2gas.pl" - if enabled thumb; then - asm_conversion_cmd="$asm_conversion_cmd -thumb" - check_add_cflags -mthumb - check_add_asflags -mthumb -mimplicit-it=always - fi - ;; - vs*) - asm_conversion_cmd="${source_path}/build/make/ads2armasm_ms.pl" - AS_SFX=.s - msvs_arch_dir=arm-msvs - disable_feature multithread - disable_feature unit_tests - vs_version=${tgt_cc##vs} - # MSVC 2013 doesn't allow doing plain .exe projects for ARM, - # only "AppContainerApplication" which requires an AppxManifest. - # Therefore disable the examples, just build the library. - disable_feature examples - ;; - rvct) - CC=armcc - AR=armar - AS=armasm - LD="${source_path}/build/make/armlink_adapter.sh" - STRIP=arm-none-linux-gnueabi-strip - NM=arm-none-linux-gnueabi-nm - tune_cflags="--cpu=" - tune_asflags="--cpu=" - if [ -z "${tune_cpu}" ]; then - if [ ${tgt_isa} = "armv7" ]; then - if enabled neon || enabled neon_asm - then - check_add_cflags --fpu=softvfp+vfpv3 - check_add_asflags --fpu=softvfp+vfpv3 - fi - check_add_cflags --cpu=Cortex-A8 - check_add_asflags --cpu=Cortex-A8 - else - check_add_cflags --cpu=${tgt_isa##armv} - check_add_asflags --cpu=${tgt_isa##armv} - fi - fi - arch_int=${tgt_isa##armv} - arch_int=${arch_int%%te} - check_add_asflags --pd "\"ARCHITECTURE SETA ${arch_int}\"" - enabled debug && add_asflags -g - add_cflags --gnu - add_cflags --enum_is_int - add_cflags --wchar32 - ;; - esac - - case ${tgt_os} in - none*) - disable_feature multithread - disable_feature os_support - ;; - - android*) - if [ -z "${sdk_path}" ]; then - die "Must specify --sdk-path for Android builds." - fi - - SDK_PATH=${sdk_path} - COMPILER_LOCATION=`find "${SDK_PATH}" \ - -name "arm-linux-androideabi-gcc*" -print -quit` - TOOLCHAIN_PATH=${COMPILER_LOCATION%/*}/arm-linux-androideabi- - CC=${TOOLCHAIN_PATH}gcc - CXX=${TOOLCHAIN_PATH}g++ - AR=${TOOLCHAIN_PATH}ar - LD=${TOOLCHAIN_PATH}gcc - AS=${TOOLCHAIN_PATH}as - STRIP=${TOOLCHAIN_PATH}strip - NM=${TOOLCHAIN_PATH}nm - - if [ -z "${alt_libc}" ]; then - alt_libc=`find "${SDK_PATH}" -name arch-arm -print | \ - awk '{n = split($0,a,"/"); \ - split(a[n-1],b,"-"); \ - print $0 " " b[2]}' | \ - sort -g -k 2 | \ - awk '{ print $1 }' | tail -1` - fi - - if [ -d "${alt_libc}" ]; then - add_cflags "--sysroot=${alt_libc}" - add_ldflags "--sysroot=${alt_libc}" - fi - - # linker flag that routes around a CPU bug in some - # Cortex-A8 implementations (NDK Dev Guide) - add_ldflags "-Wl,--fix-cortex-a8" - - enable_feature pic - soft_enable realtime_only - if [ ${tgt_isa} = "armv7" ]; then - soft_enable runtime_cpu_detect - fi - if enabled runtime_cpu_detect; then - add_cflags "-I${SDK_PATH}/sources/android/cpufeatures" - fi - ;; - - darwin*) - XCRUN_FIND="xcrun --sdk iphoneos --find" - CXX="$(${XCRUN_FIND} clang++)" - CC="$(${XCRUN_FIND} clang)" - AR="$(${XCRUN_FIND} ar)" - AS="$(${XCRUN_FIND} as)" - STRIP="$(${XCRUN_FIND} strip)" - NM="$(${XCRUN_FIND} nm)" - RANLIB="$(${XCRUN_FIND} ranlib)" - AS_SFX=.s - LD="${CXX:-$(${XCRUN_FIND} ld)}" - - # ASFLAGS is written here instead of using check_add_asflags - # because we need to overwrite all of ASFLAGS and purge the - # options that were put in above - ASFLAGS="-arch ${tgt_isa} -g" - - add_cflags -arch ${tgt_isa} - add_ldflags -arch ${tgt_isa} - - alt_libc="$(show_darwin_sdk_path iphoneos)" - if [ -d "${alt_libc}" ]; then - add_cflags -isysroot ${alt_libc} - fi - - if [ "${LD}" = "${CXX}" ]; then - add_ldflags -miphoneos-version-min="${IOS_VERSION_MIN}" - else - add_ldflags -ios_version_min "${IOS_VERSION_MIN}" - fi - - for d in lib usr/lib usr/lib/system; do - try_dir="${alt_libc}/${d}" - [ -d "${try_dir}" ] && add_ldflags -L"${try_dir}" - done - - case ${tgt_isa} in - armv7|armv7s|armv8|arm64) - if enabled neon && ! check_xcode_minimum_version; then - soft_disable neon - log_echo " neon disabled: upgrade Xcode (need v6.3+)." - if enabled neon_asm; then - soft_disable neon_asm - log_echo " neon_asm disabled: upgrade Xcode (need v6.3+)." - fi - fi - ;; - esac - - asm_conversion_cmd="${source_path}/build/make/ads2gas_apple.pl" - - if [ "$(show_darwin_sdk_major_version iphoneos)" -gt 8 ]; then - check_add_cflags -fembed-bitcode - check_add_asflags -fembed-bitcode - check_add_ldflags -fembed-bitcode - fi - ;; - - linux*) - enable_feature linux - if enabled rvct; then - # Check if we have CodeSourcery GCC in PATH. Needed for - # libraries - which arm-none-linux-gnueabi-gcc 2>&- || \ - die "Couldn't find CodeSourcery GCC from PATH" - - # Use armcc as a linker to enable translation of - # some gcc specific options such as -lm and -lpthread. - LD="armcc --translate_gcc" - - # create configuration file (uses path to CodeSourcery GCC) - armcc --arm_linux_configure --arm_linux_config_file=arm_linux.cfg - - add_cflags --arm_linux_paths --arm_linux_config_file=arm_linux.cfg - add_asflags --no_hide_all --apcs=/interwork - add_ldflags --arm_linux_paths --arm_linux_config_file=arm_linux.cfg - enabled pic && add_cflags --apcs=/fpic - enabled pic && add_asflags --apcs=/fpic - enabled shared && add_cflags --shared - fi - ;; - esac - ;; - mips*) - link_with_cc=gcc - setup_gnu_toolchain - tune_cflags="-mtune=" - if enabled dspr2; then - check_add_cflags -mips32r2 -mdspr2 - fi - - if enabled runtime_cpu_detect; then - disable_feature runtime_cpu_detect - fi - - if [ -n "${tune_cpu}" ]; then - case ${tune_cpu} in - p5600) - check_add_cflags -mips32r5 -mload-store-pairs - check_add_cflags -msched-weight -mhard-float -mfp64 - check_add_asflags -mips32r5 -mhard-float -mfp64 - check_add_ldflags -mfp64 - ;; - i6400|p6600) - check_add_cflags -mips64r6 -mabi=64 -msched-weight - check_add_cflags -mload-store-pairs -mhard-float -mfp64 - check_add_asflags -mips64r6 -mabi=64 -mhard-float -mfp64 - check_add_ldflags -mips64r6 -mabi=64 -mfp64 - ;; - esac - - if enabled msa; then - add_cflags -mmsa - add_asflags -mmsa - add_ldflags -mmsa - fi - fi - - check_add_cflags -march=${tgt_isa} - check_add_asflags -march=${tgt_isa} - check_add_asflags -KPIC - ;; - x86*) - case ${tgt_os} in - win*) - enabled gcc && add_cflags -fno-common - ;; - solaris*) - CC=${CC:-${CROSS}gcc} - CXX=${CXX:-${CROSS}g++} - LD=${LD:-${CROSS}gcc} - CROSS=${CROSS-g} - ;; - os2) - disable_feature pic - AS=${AS:-nasm} - add_ldflags -Zhigh-mem - ;; - esac - - AS="${alt_as:-${AS:-auto}}" - case ${tgt_cc} in - icc*) - CC=${CC:-icc} - LD=${LD:-icc} - setup_gnu_toolchain - add_cflags -use-msasm # remove -use-msasm too? - # add -no-intel-extensions to suppress warning #10237 - # refer to http://software.intel.com/en-us/forums/topic/280199 - add_ldflags -i-static -no-intel-extensions - enabled x86_64 && add_cflags -ipo -static -O3 -no-prec-div - enabled x86_64 && AR=xiar - case ${tune_cpu} in - atom*) - tune_cflags="-x" - tune_cpu="SSE3_ATOM" - ;; - *) - tune_cflags="-march=" - ;; - esac - ;; - gcc*) - link_with_cc=gcc - tune_cflags="-march=" - setup_gnu_toolchain - #for 32 bit x86 builds, -O3 did not turn on this flag - enabled optimizations && disabled gprof && check_add_cflags -fomit-frame-pointer - ;; - vs*) - # When building with Microsoft Visual Studio the assembler is - # invoked directly. Checking at configure time is unnecessary. - # Skip the check by setting AS arbitrarily - AS=msvs - msvs_arch_dir=x86-msvs - vc_version=${tgt_cc##vs} - ;; - esac - - bits=32 - enabled x86_64 && bits=64 - check_cpp <<EOF && bits=x32 -#if !defined(__ILP32__) || !defined(__x86_64__) -#error "not x32" -#endif -EOF - case ${tgt_cc} in - gcc*) - add_cflags -m${bits} - add_ldflags -m${bits} - ;; - esac - - soft_enable runtime_cpu_detect - # We can't use 'check_cflags' until the compiler is configured and CC is - # populated. - for ext in ${ARCH_EXT_LIST_X86}; do - # disable higher order extensions to simplify asm dependencies - if [ "$disable_exts" = "yes" ]; then - if ! disabled $ext; then - RTCD_OPTIONS="${RTCD_OPTIONS}--disable-${ext} " - disable_feature $ext - fi - elif disabled $ext; then - disable_exts="yes" - else - # use the shortened version for the flag: sse4_1 -> sse4 - check_gcc_machine_option ${ext%_*} $ext - fi - done - - if enabled external_build; then - log_echo " skipping assembler detection" - else - case "${AS}" in - auto|"") - which nasm >/dev/null 2>&1 && AS=nasm - which yasm >/dev/null 2>&1 && AS=yasm - if [ "${AS}" = nasm ] ; then - # Apple ships version 0.98 of nasm through at least Xcode 6. Revisit - # this check if they start shipping a compatible version. - apple=`nasm -v | grep "Apple"` - [ -n "${apple}" ] \ - && echo "Unsupported version of nasm: ${apple}" \ - && AS="" - fi - [ "${AS}" = auto ] || [ -z "${AS}" ] \ - && die "Neither yasm nor nasm have been found." \ - "See the prerequisites section in the README for more info." - ;; - esac - log_echo " using $AS" - fi - AS_SFX=.asm - case ${tgt_os} in - win32) - add_asflags -f win32 - enabled debug && add_asflags -g cv8 - EXE_SFX=.exe - ;; - win64) - add_asflags -f win64 - enabled debug && add_asflags -g cv8 - EXE_SFX=.exe - ;; - linux*|solaris*|android*) - add_asflags -f elf${bits} - enabled debug && [ "${AS}" = yasm ] && add_asflags -g dwarf2 - enabled debug && [ "${AS}" = nasm ] && add_asflags -g - [ "${AS##*/}" = nasm ] && check_asm_align - ;; - darwin*) - add_asflags -f macho${bits} - enabled x86 && darwin_arch="-arch i386" || darwin_arch="-arch x86_64" - add_cflags ${darwin_arch} - add_ldflags ${darwin_arch} - # -mdynamic-no-pic is still a bit of voodoo -- it was required at - # one time, but does not seem to be now, and it breaks some of the - # code that still relies on inline assembly. - # enabled icc && ! enabled pic && add_cflags -fno-pic -mdynamic-no-pic - enabled icc && ! enabled pic && add_cflags -fno-pic - ;; - iphonesimulator) - add_asflags -f macho${bits} - enabled x86 && sim_arch="-arch i386" || sim_arch="-arch x86_64" - add_cflags ${sim_arch} - add_ldflags ${sim_arch} - - if [ "$(show_darwin_sdk_major_version iphonesimulator)" -gt 8 ]; then - # yasm v1.3.0 doesn't know what -fembed-bitcode means, so turning it - # on is pointless (unless building a C-only lib). Warn the user, but - # do nothing here. - log "Warning: Bitcode embed disabled for simulator targets." - fi - ;; - os2) - add_asflags -f aout - enabled debug && add_asflags -g - EXE_SFX=.exe - ;; - *) - log "Warning: Unknown os $tgt_os while setting up $AS flags" - ;; - esac - ;; - *-gcc|generic-gnu) - link_with_cc=gcc - enable_feature gcc - setup_gnu_toolchain - ;; - esac - - # Try to enable CPU specific tuning - if [ -n "${tune_cpu}" ]; then - if [ -n "${tune_cflags}" ]; then - check_add_cflags ${tune_cflags}${tune_cpu} || \ - die "Requested CPU '${tune_cpu}' not supported by compiler" - fi - if [ -n "${tune_asflags}" ]; then - check_add_asflags ${tune_asflags}${tune_cpu} || \ - die "Requested CPU '${tune_cpu}' not supported by assembler" - fi - if [ -z "${tune_cflags}${tune_asflags}" ]; then - log_echo "Warning: CPU tuning not supported by this toolchain" - fi - fi - - if enabled debug; then - check_add_cflags -g && check_add_ldflags -g - else - check_add_cflags -DNDEBUG - fi - - enabled gprof && check_add_cflags -pg && check_add_ldflags -pg - enabled gcov && - check_add_cflags -fprofile-arcs -ftest-coverage && - check_add_ldflags -fprofile-arcs -ftest-coverage - - if enabled optimizations; then - if enabled rvct; then - enabled small && check_add_cflags -Ospace || check_add_cflags -Otime - else - enabled small && check_add_cflags -O2 || check_add_cflags -O3 - fi - fi - - # Position Independent Code (PIC) support, for building relocatable - # shared objects - enabled gcc && enabled pic && check_add_cflags -fPIC - - # Work around longjmp interception on glibc >= 2.11, to improve binary - # compatibility. See http://code.google.com/p/webm/issues/detail?id=166 - enabled linux && check_add_cflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 - - # Check for strip utility variant - ${STRIP} -V 2>/dev/null | grep GNU >/dev/null && enable_feature gnu_strip - - # Try to determine target endianness - check_cc <<EOF -unsigned int e = 'O'<<24 | '2'<<16 | 'B'<<8 | 'E'; -EOF - [ -f "${TMP_O}" ] && od -A n -t x1 "${TMP_O}" | tr -d '\n' | - grep '4f *32 *42 *45' >/dev/null 2>&1 && enable_feature big_endian - - # Try to find which inline keywords are supported - check_cc <<EOF && INLINE="inline" -static inline function() {} -EOF - - # Almost every platform uses pthreads. - if enabled multithread; then - case ${toolchain} in - *-win*-vs*) - ;; - *-android-gcc) - ;; - *) - check_header pthread.h && add_extralibs -lpthread - ;; - esac - fi - - # only for MIPS platforms - case ${toolchain} in - mips*) - if enabled big_endian; then - if enabled dspr2; then - echo "dspr2 optimizations are available only for little endian platforms" - disable_feature dspr2 - fi - if enabled msa; then - echo "msa optimizations are available only for little endian platforms" - disable_feature msa - fi - fi - ;; - esac - - # glibc needs these - if enabled linux || [ "$toolchain" = "generic-gnu" ]; then - add_cflags -D_LARGEFILE_SOURCE - add_cflags -D_FILE_OFFSET_BITS=64 - fi -} - -process_toolchain() { - process_common_toolchain -} - -print_config_mk() { - saved_prefix="${prefix}" - prefix=$1 - makefile=$2 - shift 2 - for cfg; do - if enabled $cfg; then - upname="`toupper $cfg`" - echo "${prefix}_${upname}=yes" >> $makefile - fi - done - prefix="${saved_prefix}" -} - -print_config_h() { - saved_prefix="${prefix}" - prefix=$1 - header=$2 - shift 2 - for cfg; do - upname="`toupper $cfg`" - if enabled $cfg; then - echo "#define ${prefix}_${upname} 1" >> $header - else - echo "#define ${prefix}_${upname} 0" >> $header - fi - done - prefix="${saved_prefix}" -} - -print_config_vars_h() { - header=$1 - shift - while [ $# -gt 0 ]; do - upname="`toupper $1`" - echo "#define ${upname} $2" >> $header - shift 2 - done -} - -print_webm_license() { - saved_prefix="${prefix}" - destination=$1 - prefix="$2" - suffix="$3" - shift 3 - cat <<EOF > ${destination} -${prefix} Copyright (c) 2016, Alliance for Open Media. All rights reserved.${suffix} -${prefix} ${suffix} -${prefix} This source code is subject to the terms of the BSD 2 Clause License and${suffix} -${prefix} the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License${suffix} -${prefix} was not distributed with this source code in the LICENSE file, you can${suffix} -${prefix} obtain it at www.aomedia.org/license/software. If the Alliance for Open${suffix} -${prefix} Media Patent License 1.0 was not distributed with this source code in the${suffix} -${prefix} PATENTS file, you can obtain it at www.aomedia.org/license/patent.${suffix} -EOF - prefix="${saved_prefix}" -} - -process_targets() { - true; -} - -process_detect() { - true; -} - -enable_feature logging -logfile="config.log" -self=$0 -process() { - cmdline_args="$@" - process_cmdline "$@" - if enabled child; then - echo "# ${self} $@" >> ${logfile} - else - echo "# ${self} $@" > ${logfile} - fi - post_process_common_cmdline - post_process_cmdline - process_toolchain - process_detect - process_targets - - OOT_INSTALLS="${OOT_INSTALLS}" - if enabled source_path_used; then - # Prepare the PWD for building. - for f in ${OOT_INSTALLS}; do - install -D "${source_path}/$f" "$f" - done - fi - cp "${source_path}/build/make/Makefile" . - - clean_temp_files - true -} diff --git a/build/make/gen_asm_deps.sh b/build/make/gen_asm_deps.sh deleted file mode 100755 index c867cc2bf5..0000000000 --- a/build/make/gen_asm_deps.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -## -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - - -self=$0 -show_help() { - echo "usage: $self [options] <srcfile>" - echo - echo "Generate Makefile dependency information from assembly code source" - echo - exit 1 -} -die_unknown(){ - echo "Unknown option \"$1\"." - echo "See $0 --help for available options." - exit 1 -} -for opt do - optval="${opt#*=}" - case "$opt" in - --build-pfx=*) pfx="${optval}" - ;; - --depfile=*) out="${optval}" - ;; - -I*) raw_inc_paths="${raw_inc_paths} ${opt}" - inc_path="${inc_path} ${opt#-I}" - ;; - -h|--help) show_help - ;; - *) [ -f "$opt" ] && srcfile="$opt" - ;; - esac -done - -[ -n "$srcfile" ] || show_help -sfx=${sfx:-asm} -includes=$(LC_ALL=C egrep -i "include +\"?[a-z0-9_/]+\.${sfx}" $srcfile | - perl -p -e "s;.*?([a-z0-9_/]+.${sfx}).*;\1;") -#" restore editor state -for inc in ${includes}; do - found_inc_path= - for idir in ${inc_path}; do - [ -f "${idir}/${inc}" ] && found_inc_path="${idir}" && break - done - if [ -f `dirname $srcfile`/$inc ]; then - # Handle include files in the same directory as the source - $self --build-pfx=$pfx --depfile=$out ${raw_inc_paths} `dirname $srcfile`/$inc - elif [ -n "${found_inc_path}" ]; then - # Handle include files on the include path - $self --build-pfx=$pfx --depfile=$out ${raw_inc_paths} "${found_inc_path}/$inc" - else - # Handle generated includes in the build root (which may not exist yet) - echo ${out} ${out%d}o: "${pfx}${inc}" - fi -done -echo ${out} ${out%d}o: $srcfile diff --git a/build/make/gen_msvs_def.sh b/build/make/gen_msvs_def.sh deleted file mode 100755 index dbb2674ac5..0000000000 --- a/build/make/gen_msvs_def.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - -self=$0 -self_basename=${self##*/} -EOL=$'\n' - -show_help() { - cat <<EOF -Usage: ${self_basename} [options] file1 [file2 ...] - -This script generates a MSVC module definition file containing a list of symbols -to export from a DLL. Source files are technically bash scripts (and thus may -use #comment syntax) but in general, take the form of a list of symbols: - - <kind> symbol1 [symbol2, symbol3, ...] - -where <kind> is either 'text' or 'data' - - -Options: - --help Print this message - --out=filename Write output to a file [stdout] - --name=project_name Name of the library (required) -EOF - exit 1 -} - -die() { - echo "${self_basename}: $@" - exit 1 -} - -die_unknown(){ - echo "Unknown option \"$1\"." - echo "See ${self_basename} --help for available options." - exit 1 -} - -text() { - for sym in "$@"; do - echo " $sym" >> ${outfile} - done -} - -data() { - for sym in "$@"; do - printf " %-40s DATA\n" "$sym" >> ${outfile} - done -} - -# Process command line -for opt in "$@"; do - optval="${opt#*=}" - case "$opt" in - --help|-h) show_help - ;; - --out=*) outfile="$optval" - ;; - --name=*) name="${optval}" - ;; - -*) die_unknown $opt - ;; - *) file_list[${#file_list[@]}]="$opt" - esac -done -outfile=${outfile:-/dev/stdout} -[ -n "$name" ] || die "Library name (--name) must be specified!" - -echo "LIBRARY ${name}" > ${outfile} -echo "EXPORTS" >> ${outfile} -for f in "${file_list[@]}"; do - . $f -done diff --git a/build/make/gen_msvs_sln.sh b/build/make/gen_msvs_sln.sh deleted file mode 100755 index 268a817062..0000000000 --- a/build/make/gen_msvs_sln.sh +++ /dev/null @@ -1,257 +0,0 @@ -#!/bin/bash -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - - -self=$0 -self_basename=${self##*/} -EOL=$'\n' -EOLDOS=$'\r' - -show_help() { - cat <<EOF -Usage: ${self_basename} [options] file1 [file2 ...] - -This script generates a Visual Studio solution file from a list of project -files. - -Options: - --help Print this message - --out=outfile Redirect output to a file - --ver=version Version (12,14,15) of visual studio to generate for - --target=isa-os-cc Target specifier -EOF - exit 1 -} - -die() { - echo "${self_basename}: $@" >&2 - [ -f "${outfile}" ] && rm -f ${outfile}{,.mk} - exit 1 -} - -die_unknown(){ - echo "Unknown option \"$1\"." >&2 - echo "See ${self_basename} --help for available options." >&2 - [ -f "${outfile}" ] && rm -f ${outfile}{,.mk} - exit 1 -} - -indent1=$'\t' -indent="" -indent_push() { - indent="${indent}${indent1}" -} -indent_pop() { - indent="${indent%${indent1}}" -} - -parse_project() { - local file=$1 - local name=`grep RootNamespace "$file" | sed 's,.*<.*>\(.*\)</.*>.*,\1,'` - local guid=`grep ProjectGuid "$file" | sed 's,.*<.*>\(.*\)</.*>.*,\1,'` - - # save the project GUID to a varaible, normalizing to the basename of the - # vcxproj file without the extension - local var - var=${file##*/} - var=${var%%.${sfx}} - eval "${var}_file=\"$1\"" - eval "${var}_name=$name" - eval "${var}_guid=$guid" - - cur_config_list=`grep -B1 'Label="Configuration"' $file | - grep Condition | cut -d\' -f4` - new_config_list=$(for i in $config_list $cur_config_list; do - echo $i - done | sort | uniq) - if [ "$config_list" != "" ] && [ "$config_list" != "$new_config_list" ]; then - mixed_platforms=1 - fi - config_list="$new_config_list" - eval "${var}_config_list=\"$cur_config_list\"" - proj_list="${proj_list} ${var}" -} - -process_project() { - eval "local file=\${$1_file}" - eval "local name=\${$1_name}" - eval "local guid=\${$1_guid}" - - # save the project GUID to a varaible, normalizing to the basename of the - # vcproj file without the extension - local var - var=${file##*/} - var=${var%%.${sfx}} - eval "${var}_guid=$guid" - - echo "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"$name\", \"$file\", \"$guid\"" - echo "EndProject" -} - -process_global() { - echo "Global" - indent_push - - # - # Solution Configuration Platforms - # - echo "${indent}GlobalSection(SolutionConfigurationPlatforms) = preSolution" - indent_push - IFS_bak=${IFS} - IFS=$'\r'$'\n' - if [ "$mixed_platforms" != "" ]; then - config_list=" -Release|Mixed Platforms -Debug|Mixed Platforms" - fi - for config in ${config_list}; do - echo "${indent}$config = $config" - done - IFS=${IFS_bak} - indent_pop - echo "${indent}EndGlobalSection" - - # - # Project Configuration Platforms - # - echo "${indent}GlobalSection(ProjectConfigurationPlatforms) = postSolution" - indent_push - for proj in ${proj_list}; do - eval "local proj_guid=\${${proj}_guid}" - eval "local proj_config_list=\${${proj}_config_list}" - IFS=$'\r'$'\n' - for config in ${proj_config_list}; do - if [ "$mixed_platforms" != "" ]; then - local c=${config%%|*} - echo "${indent}${proj_guid}.${c}|Mixed Platforms.ActiveCfg = ${config}" - echo "${indent}${proj_guid}.${c}|Mixed Platforms.Build.0 = ${config}" - else - echo "${indent}${proj_guid}.${config}.ActiveCfg = ${config}" - echo "${indent}${proj_guid}.${config}.Build.0 = ${config}" - fi - - done - IFS=${IFS_bak} - done - indent_pop - echo "${indent}EndGlobalSection" - - # - # Solution Properties - # - echo "${indent}GlobalSection(SolutionProperties) = preSolution" - indent_push - echo "${indent}HideSolutionNode = FALSE" - indent_pop - echo "${indent}EndGlobalSection" - - indent_pop - echo "EndGlobal" -} - -process_makefile() { - IFS_bak=${IFS} - IFS=$'\r'$'\n' - local TAB=$'\t' - cat <<EOF -MSBUILD_TOOL := msbuild.exe -found_devenv := \$(shell which \$(MSBUILD_TOOL) >/dev/null 2>&1 && echo yes) -.nodevenv.once: -${TAB}@echo " * \$(MSBUILD_TOOL) not found in path." -${TAB}@echo " * " -${TAB}@echo " * You will have to build all configurations manually using the" -${TAB}@echo " * Visual Studio IDE. To allow make to build them automatically," -${TAB}@echo " * add the Common7/IDE directory of your Visual Studio" -${TAB}@echo " * installation to your path, eg:" -${TAB}@echo " * C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE" -${TAB}@echo " * " -${TAB}@touch \$@ -CLEAN-OBJS += \$(if \$(found_devenv),,.nodevenv.once) - -EOF - - for sln_config in ${config_list}; do - local config=${sln_config%%|*} - local platform=${sln_config##*|} - local nows_sln_config=`echo $sln_config | sed -e 's/[^a-zA-Z0-9]/_/g'` - cat <<EOF -BUILD_TARGETS += \$(if \$(NO_LAUNCH_DEVENV),,$nows_sln_config) -clean:: -${TAB}rm -rf "$platform"/"$config" -.PHONY: $nows_sln_config -ifneq (\$(found_devenv),) -$nows_sln_config: $outfile -${TAB}\$(MSBUILD_TOOL) $outfile -m -t:Build \\ -${TAB}${TAB}-p:Configuration="$config" -p:Platform="$platform" -else -$nows_sln_config: $outfile .nodevenv.once -${TAB}@echo " * Skipping build of $sln_config (\$(MSBUILD_TOOL) not in path)." -${TAB}@echo " * " -endif - -EOF - done - IFS=${IFS_bak} -} - -# Process command line -outfile=/dev/stdout -for opt in "$@"; do - optval="${opt#*=}" - case "$opt" in - --help|-h) show_help - ;; - --out=*) outfile="${optval}"; mkoutfile="${optval}".mk - ;; - --dep=*) eval "${optval%%:*}_deps=\"\${${optval%%:*}_deps} ${optval##*:}\"" - ;; - --ver=*) vs_ver="$optval" - case $optval in - 12|14|15) - ;; - *) die Unrecognized Visual Studio Version in $opt - ;; - esac - ;; - --target=*) target="${optval}" - ;; - -*) die_unknown $opt - ;; - *) file_list[${#file_list[@]}]="$opt" - esac -done -outfile=${outfile:-/dev/stdout} -mkoutfile=${mkoutfile:-/dev/stdout} -case "${vs_ver:-12}" in - 12) sln_vers="12.00" - sln_vers_str="Visual Studio 2013" - ;; - 14) sln_vers="12.00" - sln_vers_str="Visual Studio 2015" - ;; - 15) sln_vers="12.00" - sln_vers_str="Visual Studio 2017" - ;; -esac -sfx=vcxproj - -for f in "${file_list[@]}"; do - parse_project $f -done -cat >${outfile} <<EOF -Microsoft Visual Studio Solution File, Format Version $sln_vers${EOLDOS} -# $sln_vers_str${EOLDOS} -EOF -for proj in ${proj_list}; do - process_project $proj >>${outfile} -done -process_global >>${outfile} -process_makefile >${mkoutfile} diff --git a/build/make/gen_msvs_vcxproj.sh b/build/make/gen_msvs_vcxproj.sh deleted file mode 100755 index a119b07aa2..0000000000 --- a/build/make/gen_msvs_vcxproj.sh +++ /dev/null @@ -1,477 +0,0 @@ -#!/bin/bash -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - -self=$0 -self_basename=${self##*/} -self_dirname=$(dirname "$0") - -. "$self_dirname/msvs_common.sh"|| exit 127 - -show_help() { - cat <<EOF -Usage: ${self_basename} --name=projname [options] file1 [file2 ...] - -This script generates a Visual Studio project file from a list of source -code files. - -Options: - --help Print this message - --exe Generate a project for building an Application - --lib Generate a project for creating a static library - --dll Generate a project for creating a dll - --static-crt Use the static C runtime (/MT) - --enable-werror Treat warnings as errors (/WX) - --target=isa-os-cc Target specifier (required) - --out=filename Write output to a file [stdout] - --name=project_name Name of the project (required) - --proj-guid=GUID GUID to use for the project - --module-def=filename File containing export definitions (for DLLs) - --ver=version Version (12,14,15) of visual studio to generate for - --src-path-bare=dir Path to root of source tree - -Ipath/to/include Additional include directories - -DFLAG[=value] Preprocessor macros to define - -Lpath/to/lib Additional library search paths - -llibname Library to link against -EOF - exit 1 -} - -tag_content() { - local tag=$1 - local content=$2 - shift - shift - if [ $# -ne 0 ]; then - echo "${indent}<${tag}" - indent_push - tag_attributes "$@" - echo "${indent}>${content}</${tag}>" - indent_pop - else - echo "${indent}<${tag}>${content}</${tag}>" - fi -} - -generate_filter() { - local name=$1 - local pats=$2 - local file_list_sz - local i - local f - local saveIFS="$IFS" - local pack - echo "generating filter '$name' from ${#file_list[@]} files" >&2 - IFS=* - - file_list_sz=${#file_list[@]} - for i in ${!file_list[@]}; do - f=${file_list[i]} - for pat in ${pats//;/$IFS}; do - if [ "${f##*.}" == "$pat" ]; then - unset file_list[i] - - objf=$(echo ${f%.*}.obj \ - | sed -e "s,$src_path_bare,," \ - -e 's/^[\./]\+//g' -e 's,[:/ ],_,g') - - if ([ "$pat" == "asm" ] || [ "$pat" == "s" ]) && $asm_use_custom_step; then - # Avoid object file name collisions, i.e. aom_config.c and - # aom_config.asm produce the same object file without - # this additional suffix. - objf=${objf%.obj}_asm.obj - open_tag CustomBuild \ - Include="$f" - for plat in "${platforms[@]}"; do - for cfg in Debug Release; do - tag_content Message "Assembling %(Filename)%(Extension)" \ - Condition="'\$(Configuration)|\$(Platform)'=='$cfg|$plat'" - tag_content Command "$(eval echo \$asm_${cfg}_cmdline) -o \$(IntDir)$objf" \ - Condition="'\$(Configuration)|\$(Platform)'=='$cfg|$plat'" - tag_content Outputs "\$(IntDir)$objf" \ - Condition="'\$(Configuration)|\$(Platform)'=='$cfg|$plat'" - done - done - close_tag CustomBuild - elif [ "$pat" == "c" ] || \ - [ "$pat" == "cc" ] || [ "$pat" == "cpp" ]; then - open_tag ClCompile \ - Include="$f" - # Separate file names with Condition? - tag_content ObjectFileName "\$(IntDir)$objf" - # Check for AVX and turn it on to avoid warnings. - if [[ $f =~ avx.?\.c$ ]]; then - tag_content AdditionalOptions "/arch:AVX" - fi - close_tag ClCompile - elif [ "$pat" == "h" ] ; then - tag ClInclude \ - Include="$f" - elif [ "$pat" == "vcxproj" ] ; then - open_tag ProjectReference \ - Include="$f" - depguid=`grep ProjectGuid "$f" | sed 's,.*<.*>\(.*\)</.*>.*,\1,'` - tag_content Project "$depguid" - tag_content ReferenceOutputAssembly false - close_tag ProjectReference - else - tag None \ - Include="$f" - fi - - break - fi - done - done - - IFS="$saveIFS" -} - -# Process command line -unset target -for opt in "$@"; do - optval="${opt#*=}" - case "$opt" in - --help|-h) show_help - ;; - --target=*) target="${optval}" - ;; - --out=*) outfile="$optval" - ;; - --name=*) name="${optval}" - ;; - --proj-guid=*) guid="${optval}" - ;; - --module-def=*) module_def="${optval}" - ;; - --exe) proj_kind="exe" - ;; - --dll) proj_kind="dll" - ;; - --lib) proj_kind="lib" - ;; - --src-path-bare=*) - src_path_bare=$(fix_path "$optval") - src_path_bare=${src_path_bare%/} - ;; - --static-crt) use_static_runtime=true - ;; - --enable-werror) werror=true - ;; - --ver=*) - vs_ver="$optval" - case "$optval" in - 12|14|15) - ;; - *) die Unrecognized Visual Studio Version in $opt - ;; - esac - ;; - -I*) - opt=${opt##-I} - opt=$(fix_path "$opt") - opt="${opt%/}" - incs="${incs}${incs:+;}"${opt}"" - yasmincs="${yasmincs} -I"${opt}"" - ;; - -D*) defines="${defines}${defines:+;}${opt##-D}" - ;; - -L*) # fudge . to $(OutDir) - if [ "${opt##-L}" == "." ]; then - libdirs="${libdirs}${libdirs:+;}"\$(OutDir)"" - else - # Also try directories for this platform/configuration - opt=${opt##-L} - opt=$(fix_path "$opt") - libdirs="${libdirs}${libdirs:+;}"${opt}"" - libdirs="${libdirs}${libdirs:+;}"${opt}/\$(PlatformName)/\$(Configuration)"" - libdirs="${libdirs}${libdirs:+;}"${opt}/\$(PlatformName)"" - fi - ;; - -l*) libs="${libs}${libs:+ }${opt##-l}.lib" - ;; - -*) die_unknown $opt - ;; - *) - # The paths in file_list are fixed outside of the loop. - file_list[${#file_list[@]}]="$opt" - case "$opt" in - *.asm|*.s) uses_asm=true - ;; - esac - ;; - esac -done - -# Make one call to fix_path for file_list to improve performance. -fix_file_list file_list - -outfile=${outfile:-/dev/stdout} -guid=${guid:-`generate_uuid`} -asm_use_custom_step=false -uses_asm=${uses_asm:-false} -case "${vs_ver:-12}" in - 12|14|15) - asm_use_custom_step=$uses_asm - ;; -esac - -[ -n "$name" ] || die "Project name (--name) must be specified!" -[ -n "$target" ] || die "Target (--target) must be specified!" - -if ${use_static_runtime:-false}; then - release_runtime=MultiThreaded - debug_runtime=MultiThreadedDebug - lib_sfx=mt -else - release_runtime=MultiThreadedDLL - debug_runtime=MultiThreadedDebugDLL - lib_sfx=md -fi - -# Calculate debug lib names: If a lib ends in ${lib_sfx}.lib, then rename -# it to ${lib_sfx}d.lib. This precludes linking to release libs from a -# debug exe, so this may need to be refactored later. -for lib in ${libs}; do - if [ "$lib" != "${lib%${lib_sfx}.lib}" ]; then - lib=${lib%.lib}d.lib - fi - debug_libs="${debug_libs}${debug_libs:+ }${lib}" -done -debug_libs=${debug_libs// /;} -libs=${libs// /;} - - -# List of all platforms supported for this target -case "$target" in - x86_64*) - platforms[0]="x64" - asm_Debug_cmdline="yasm -Xvc -g cv8 -f win64 ${yasmincs} "%(FullPath)"" - asm_Release_cmdline="yasm -Xvc -f win64 ${yasmincs} "%(FullPath)"" - ;; - x86*) - platforms[0]="Win32" - asm_Debug_cmdline="yasm -Xvc -g cv8 -f win32 ${yasmincs} "%(FullPath)"" - asm_Release_cmdline="yasm -Xvc -f win32 ${yasmincs} "%(FullPath)"" - ;; - arm*) - platforms[0]="ARM" - asm_Debug_cmdline="armasm -nologo -oldit "%(FullPath)"" - asm_Release_cmdline="armasm -nologo -oldit "%(FullPath)"" - ;; - *) die "Unsupported target $target!" - ;; -esac - -generate_vcxproj() { - echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" - open_tag Project \ - DefaultTargets="Build" \ - ToolsVersion="4.0" \ - xmlns="http://schemas.microsoft.com/developer/msbuild/2003" \ - - open_tag ItemGroup \ - Label="ProjectConfigurations" - for plat in "${platforms[@]}"; do - for config in Debug Release; do - open_tag ProjectConfiguration \ - Include="$config|$plat" - tag_content Configuration $config - tag_content Platform $plat - close_tag ProjectConfiguration - done - done - close_tag ItemGroup - - open_tag PropertyGroup \ - Label="Globals" - tag_content ProjectGuid "{${guid}}" - tag_content RootNamespace ${name} - tag_content Keyword ManagedCProj - if [ "${platforms[0]}" = "ARM" ]; then - tag_content AppContainerApplication true - # The application type can be one of "Windows Store", - # "Windows Phone" or "Windows Phone Silverlight". The - # actual value doesn't matter from the libaom point of view, - # since a static library built for one works on the others. - # The PlatformToolset field needs to be set in sync with this; - # for Windows Store and Windows Phone Silverlight it should be - # v120 while it should be v120_wp81 if the type is Windows Phone. - tag_content ApplicationType "Windows Store" - tag_content ApplicationTypeRevision 8.1 - fi - close_tag PropertyGroup - - tag Import \ - Project="\$(VCTargetsPath)\\Microsoft.Cpp.Default.props" - - for plat in "${platforms[@]}"; do - for config in Release Debug; do - open_tag PropertyGroup \ - Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'" \ - Label="Configuration" - if [ "$proj_kind" = "exe" ]; then - tag_content ConfigurationType Application - elif [ "$proj_kind" = "dll" ]; then - tag_content ConfigurationType DynamicLibrary - else - tag_content ConfigurationType StaticLibrary - fi - if [ "$vs_ver" = "12" ]; then - # Setting a PlatformToolset indicating windows phone isn't - # enough to build code for arm with MSVC 2013, one strictly - # has to enable AppContainerApplication as well. - tag_content PlatformToolset v120 - fi - if [ "$vs_ver" = "14" ]; then - tag_content PlatformToolset v140 - fi - if [ "$vs_ver" = "15" ]; then - tag_content PlatformToolset v141 - fi - tag_content CharacterSet Unicode - if [ "$config" = "Release" ]; then - tag_content WholeProgramOptimization true - fi - close_tag PropertyGroup - done - done - - tag Import \ - Project="\$(VCTargetsPath)\\Microsoft.Cpp.props" - - open_tag ImportGroup \ - Label="PropertySheets" - tag Import \ - Project="\$(UserRootDir)\\Microsoft.Cpp.\$(Platform).user.props" \ - Condition="exists('\$(UserRootDir)\\Microsoft.Cpp.\$(Platform).user.props')" \ - Label="LocalAppDataPlatform" - close_tag ImportGroup - - tag PropertyGroup \ - Label="UserMacros" - - for plat in "${platforms[@]}"; do - plat_no_ws=`echo $plat | sed 's/[^A-Za-z0-9_]/_/g'` - for config in Debug Release; do - open_tag PropertyGroup \ - Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'" - tag_content OutDir "\$(SolutionDir)$plat_no_ws\\\$(Configuration)\\" - tag_content IntDir "$plat_no_ws\\\$(Configuration)\\${name}\\" - if [ "$proj_kind" == "lib" ]; then - if [ "$config" == "Debug" ]; then - config_suffix=d - else - config_suffix="" - fi - tag_content TargetName "${name}${lib_sfx}${config_suffix}" - fi - close_tag PropertyGroup - done - done - - for plat in "${platforms[@]}"; do - for config in Debug Release; do - open_tag ItemDefinitionGroup \ - Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'" - if [ "$name" == "aom" ]; then - hostplat=$plat - if [ "$hostplat" == "ARM" ]; then - hostplat=Win32 - fi - fi - open_tag ClCompile - if [ "$config" = "Debug" ]; then - opt=Disabled - runtime=$debug_runtime - curlibs=$debug_libs - debug=_DEBUG - else - opt=MaxSpeed - runtime=$release_runtime - curlibs=$libs - tag_content FavorSizeOrSpeed Speed - debug=NDEBUG - fi - extradefines=";$defines" - tag_content Optimization $opt - tag_content AdditionalIncludeDirectories "$incs;%(AdditionalIncludeDirectories)" - tag_content PreprocessorDefinitions "WIN32;$debug;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE$extradefines;%(PreprocessorDefinitions)" - tag_content RuntimeLibrary $runtime - tag_content WarningLevel Level3 - if ${werror:-false}; then - tag_content TreatWarningAsError true - fi - # We need to override the defaults for these settings - # if AppContainerApplication is set. - tag_content CompileAsWinRT false - tag_content PrecompiledHeader NotUsing - tag_content SDLCheck false - close_tag ClCompile - case "$proj_kind" in - exe) - open_tag Link - tag_content GenerateDebugInformation true - # Console is the default normally, but if - # AppContainerApplication is set, we need to override it. - tag_content SubSystem Console - close_tag Link - ;; - dll) - open_tag Link - tag_content GenerateDebugInformation true - tag_content ModuleDefinitionFile $module_def - close_tag Link - ;; - lib) - ;; - esac - close_tag ItemDefinitionGroup - done - - done - - open_tag ItemGroup - generate_filter "Source Files" "c;cc;cpp;def;odl;idl;hpj;bat;asm;asmx;s" - close_tag ItemGroup - open_tag ItemGroup - generate_filter "Header Files" "h;hm;inl;inc;xsd" - close_tag ItemGroup - open_tag ItemGroup - generate_filter "Build Files" "mk" - close_tag ItemGroup - open_tag ItemGroup - generate_filter "References" "vcxproj" - close_tag ItemGroup - - tag Import \ - Project="\$(VCTargetsPath)\\Microsoft.Cpp.targets" - - open_tag ImportGroup \ - Label="ExtensionTargets" - close_tag ImportGroup - - close_tag Project - - # This must be done from within the {} subshell - echo "Ignored files list (${#file_list[@]} items) is:" >&2 - for f in "${file_list[@]}"; do - echo " $f" >&2 - done -} - -# This regexp doesn't catch most of the strings in the vcxproj format, -# since they're like <tag>path</tag> instead of <tag attr="path" /> -# as previously. It still seems to work ok despite this. -generate_vcxproj | - sed -e '/"/s;\([^ "]\)/;\1\\;g' | - sed -e '/xmlns/s;\\;/;g' > ${outfile} - -exit diff --git a/build/make/iosbuild.sh b/build/make/iosbuild.sh index ca8214b622..75f0b1b086 100755 --- a/build/make/iosbuild.sh +++ b/build/make/iosbuild.sh @@ -56,6 +56,7 @@ build_target() { mkdir "${target}" cd "${target}" + # TODO(tomfinegan@google.com): switch to cmake. eval "${LIBAOM_SOURCE_DIR}/configure" --target="${target}" \ ${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS} ${target_specific_flags} \ ${devnull} diff --git a/build/make/msvs_common.sh b/build/make/msvs_common.sh deleted file mode 100644 index 2df27df8de..0000000000 --- a/build/make/msvs_common.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/bash -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - -if [ "$(uname -o 2>/dev/null)" = "Cygwin" ] \ - && cygpath --help >/dev/null 2>&1; then - FIXPATH='cygpath -m' -else - FIXPATH='echo_path' -fi - -die() { - echo "${self_basename}: $@" >&2 - exit 1 -} - -die_unknown(){ - echo "Unknown option \"$1\"." >&2 - echo "See ${self_basename} --help for available options." >&2 - exit 1 -} - -echo_path() { - for path; do - echo "$path" - done -} - -# Output one, possibly changed based on the system, path per line. -fix_path() { - $FIXPATH "$@" -} - -# Corrects the paths in file_list in one pass for efficiency. -# $1 is the name of the array to be modified. -fix_file_list() { - declare -n array_ref=$1 - files=$(fix_path "${array_ref[@]}") - local IFS=$'\n' - array_ref=($files) -} - -generate_uuid() { - local hex="0123456789ABCDEF" - local i - local uuid="" - local j - #93995380-89BD-4b04-88EB-625FBE52EBFB - for ((i=0; i<32; i++)); do - (( j = $RANDOM % 16 )) - uuid="${uuid}${hex:$j:1}" - done - echo "${uuid:0:8}-${uuid:8:4}-${uuid:12:4}-${uuid:16:4}-${uuid:20:12}" -} - -indent1=" " -indent="" -indent_push() { - indent="${indent}${indent1}" -} -indent_pop() { - indent="${indent%${indent1}}" -} - -tag_attributes() { - for opt in "$@"; do - optval="${opt#*=}" - [ -n "${optval}" ] || - die "Missing attribute value in '$opt' while generating $tag tag" - echo "${indent}${opt%%=*}=\"${optval}\"" - done -} - -open_tag() { - local tag=$1 - shift - if [ $# -ne 0 ]; then - echo "${indent}<${tag}" - indent_push - tag_attributes "$@" - echo "${indent}>" - else - echo "${indent}<${tag}>" - indent_push - fi -} - -close_tag() { - local tag=$1 - indent_pop - echo "${indent}</${tag}>" -} - -tag() { - local tag=$1 - shift - if [ $# -ne 0 ]; then - echo "${indent}<${tag}" - indent_push - tag_attributes "$@" - indent_pop - echo "${indent}/>" - else - echo "${indent}<${tag}/>" - fi -} - diff --git a/build/make/version.sh b/build/make/version.sh deleted file mode 100755 index 0dfd2359e2..0000000000 --- a/build/make/version.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - - - -for opt in "$@"; do - optval="${opt#*=}" - case "$opt" in - --bare) bare=true ;; - *) break ;; - esac - shift -done -source_path=${1:-.} -out_file=${2} -id=${3:-VERSION_STRING} - -git_version_id="" -if [ -e "${source_path}/.git" ]; then - # Source Path is a git working copy. Check for local modifications. - # Note that git submodules may have a file as .git, not a directory. - export GIT_DIR="${source_path}/.git" - git_version_id=$(git describe --match=v[0-9]* 2>/dev/null) -fi - -changelog_version="" -for p in "${source_path}" "${source_path}/.."; do - if [ -z "$git_version_id" -a -f "${p}/CHANGELOG" ]; then - changelog_version=$(grep -m 1 " v[0-9]" "${p}/CHANGELOG" \ - | awk '{print $2}') - changelog_version="${changelog_version}" - break - fi -done -version_str="${changelog_version}${git_version_id}" -bare_version=${version_str#v} -major_version=${bare_version%%.*} -bare_version=${bare_version#*.} -minor_version=${bare_version%%.*} -bare_version=${bare_version#*.} -patch_version=${bare_version%%-*} -bare_version=${bare_version#${patch_version}} -extra_version=${bare_version##-} - -#since they'll be used as integers below make sure they are or force to 0 -for v in major_version minor_version patch_version; do - if eval echo \$$v |grep -E -q '[^[:digit:]]'; then - eval $v=0 - fi -done - -if [ ${bare} ]; then - echo "${changelog_version}${git_version_id}" > $$.tmp -else - cat<<EOF>$$.tmp -// This file is generated. Do not edit. -#define VERSION_MAJOR $major_version -#define VERSION_MINOR $minor_version -#define VERSION_PATCH $patch_version -#define VERSION_EXTRA "$extra_version" -#define VERSION_PACKED ((VERSION_MAJOR<<16)|(VERSION_MINOR<<8)|(VERSION_PATCH)) -#define ${id}_NOSP "${version_str}" -#define ${id} " ${version_str}" -EOF -fi -if [ -n "$out_file" ]; then -diff $$.tmp ${out_file} >/dev/null 2>&1 || cat $$.tmp > ${out_file} -else -cat $$.tmp -fi -rm $$.tmp diff --git a/configure b/configure deleted file mode 100755 index 458d1b4736..0000000000 --- a/configure +++ /dev/null @@ -1,912 +0,0 @@ -#!/bin/sh -## -## configure -## -## This script is the front-end to the build system. It provides a similar -## interface to standard configure scripts with some extra bits for dealing -## with toolchains that differ from the standard POSIX interface and -## for extracting subsets of the source tree. In theory, reusable parts -## of this script were intended to live in build/make/configure.sh, -## but in practice, the line is pretty blurry. -## -## This build system is based in part on the FFmpeg configure script. -## - -#source_path="`dirname \"$0\"`" -source_path=${0%/*} -. "${source_path}/build/make/configure.sh" - -show_help(){ - show_help_pre - cat << EOF -Advanced options: - ${toggle_libs} libraries - ${toggle_examples} examples - ${toggle_analyzer} analyzer - ${toggle_docs} documentation - ${toggle_unit_tests} unit tests - ${toggle_tools} tools - ${toggle_decode_perf_tests} build decoder perf tests with unit tests - ${toggle_encode_perf_tests} build encoder perf tests with unit tests - --cpu=CPU tune for the specified CPU (ARM: cortex-a8, X86: sse3) - --libc=PATH path to alternate libc - --size-limit=WxH max size to allow in the decoder - --as={yasm|nasm|auto} use specified assembler [auto, yasm preferred] - --sdk-path=PATH path to root of sdk (android builds only) - ${toggle_codec_srcs} in/exclude codec library source code - ${toggle_debug_libs} in/exclude debug version of libraries - ${toggle_static_msvcrt} use static MSVCRT (VS builds only) - ${toggle_lowbitdepth} enable 8-bit optimized pixel pipeline - ${toggle_av1} AV1 codec support - ${toggle_internal_stats} output of encoder internal stats for debug, if supported (encoders) - ${toggle_postproc} postprocessing - ${toggle_multithread} multithreaded encoding and decoding - ${toggle_spatial_resampling} spatial sampling (scaling) support - ${toggle_realtime_only} enable this option while building for real-time encoding - ${toggle_coefficient_range_checking} - enable decoder to check if intermediate - transform coefficients are in valid range - ${toggle_runtime_cpu_detect} runtime cpu detection - ${toggle_shared} shared library support - ${toggle_static} static library support - ${toggle_small} favor smaller size over speed - ${toggle_postproc_visualizer} macro block / block level visualizers - ${toggle_webm_io} enable input from and output to WebM container - ${toggle_libyuv} enable libyuv - ${toggle_accounting} enable bit accounting - ${toggle_inspection} enable bitstream inspection - -Codecs: - Codecs can be selectively enabled or disabled individually, or by family: - --disable-<codec> - is equivalent to: - --disable-<codec>-encoder - --disable-<codec>-decoder - - Codecs available in this distribution: -EOF -#restore editor state ' - - family=""; - last_family=""; - c=""; - str=""; - for c in ${CODECS}; do - family=${c%_*} - if [ "${family}" != "${last_family}" ]; then - [ -z "${str}" ] || echo "${str}" - str="$(printf ' %10s:' ${family})" - fi - str="${str} $(printf '%10s' ${c#*_})" - last_family=${family} - done - echo "${str}" - show_help_post -} - -## -## BEGIN APPLICATION SPECIFIC CONFIGURATION -## - -# all_platforms is a list of all supported target platforms. Maintain -# alphabetically by architecture, generic-gnu last. -all_platforms="${all_platforms} arm64-darwin-gcc" -all_platforms="${all_platforms} arm64-linux-gcc" -all_platforms="${all_platforms} armv7-android-gcc" #neon Cortex-A8 -all_platforms="${all_platforms} armv7-darwin-gcc" #neon Cortex-A8 -all_platforms="${all_platforms} armv7-linux-rvct" #neon Cortex-A8 -all_platforms="${all_platforms} armv7-linux-gcc" #neon Cortex-A8 -all_platforms="${all_platforms} armv7-none-rvct" #neon Cortex-A8 -all_platforms="${all_platforms} armv7-win32-vs12" -all_platforms="${all_platforms} armv7-win32-vs14" -all_platforms="${all_platforms} armv7-win32-vs15" -all_platforms="${all_platforms} armv7s-darwin-gcc" -all_platforms="${all_platforms} armv8-linux-gcc" -all_platforms="${all_platforms} mips32-linux-gcc" -all_platforms="${all_platforms} mips64-linux-gcc" -all_platforms="${all_platforms} sparc-solaris-gcc" -all_platforms="${all_platforms} x86-android-gcc" -all_platforms="${all_platforms} x86-darwin8-gcc" -all_platforms="${all_platforms} x86-darwin8-icc" -all_platforms="${all_platforms} x86-darwin9-gcc" -all_platforms="${all_platforms} x86-darwin9-icc" -all_platforms="${all_platforms} x86-darwin10-gcc" -all_platforms="${all_platforms} x86-darwin11-gcc" -all_platforms="${all_platforms} x86-darwin12-gcc" -all_platforms="${all_platforms} x86-darwin13-gcc" -all_platforms="${all_platforms} x86-darwin14-gcc" -all_platforms="${all_platforms} x86-darwin15-gcc" -all_platforms="${all_platforms} x86-darwin16-gcc" -all_platforms="${all_platforms} x86-iphonesimulator-gcc" -all_platforms="${all_platforms} x86-linux-gcc" -all_platforms="${all_platforms} x86-linux-icc" -all_platforms="${all_platforms} x86-os2-gcc" -all_platforms="${all_platforms} x86-solaris-gcc" -all_platforms="${all_platforms} x86-win32-gcc" -all_platforms="${all_platforms} x86-win32-vs12" -all_platforms="${all_platforms} x86-win32-vs14" -all_platforms="${all_platforms} x86-win32-vs15" -all_platforms="${all_platforms} x86_64-android-gcc" -all_platforms="${all_platforms} x86_64-darwin9-gcc" -all_platforms="${all_platforms} x86_64-darwin10-gcc" -all_platforms="${all_platforms} x86_64-darwin11-gcc" -all_platforms="${all_platforms} x86_64-darwin12-gcc" -all_platforms="${all_platforms} x86_64-darwin13-gcc" -all_platforms="${all_platforms} x86_64-darwin14-gcc" -all_platforms="${all_platforms} x86_64-darwin15-gcc" -all_platforms="${all_platforms} x86_64-darwin16-gcc" -all_platforms="${all_platforms} x86_64-iphonesimulator-gcc" -all_platforms="${all_platforms} x86_64-linux-gcc" -all_platforms="${all_platforms} x86_64-linux-icc" -all_platforms="${all_platforms} x86_64-solaris-gcc" -all_platforms="${all_platforms} x86_64-win64-gcc" -all_platforms="${all_platforms} x86_64-win64-vs12" -all_platforms="${all_platforms} x86_64-win64-vs14" -all_platforms="${all_platforms} x86_64-win64-vs15" -all_platforms="${all_platforms} generic-gnu" - -# all_targets is a list of all targets that can be configured -# note that these should be in dependency order for now. -all_targets="libs examples docs tools" - -# all targets available are enabled, by default. -for t in ${all_targets}; do - [ -f "${source_path}/${t}.mk" ] && enable_feature ${t} -done - -if ! diff --version >/dev/null; then - die "diff missing: Try installing diffutils via your package manager." -fi - -if ! perl --version >/dev/null; then - die "Perl is required to build" -fi - - -if [ "`cd \"${source_path}\" && pwd`" != "`pwd`" ]; then - # test to see if source_path already configured - if [ -f "${source_path}/aom_config.h" ]; then - die "source directory already configured; run 'make distclean' there first" - fi -fi - -# check installed doxygen version -doxy_version=$(doxygen --version 2>/dev/null) -doxy_major=${doxy_version%%.*} -if [ ${doxy_major:-0} -ge 1 ]; then - doxy_version=${doxy_version#*.} - doxy_minor=${doxy_version%%.*} - doxy_patch=${doxy_version##*.} - - [ $doxy_major -gt 1 ] && enable_feature doxygen - [ $doxy_minor -gt 5 ] && enable_feature doxygen - [ $doxy_minor -eq 5 ] && [ $doxy_patch -ge 3 ] && enable_feature doxygen -fi - -# disable codecs when their source directory does not exist -[ -d "${source_path}/av1" ] || disable_codec av1 - -# install everything except the sources, by default. sources will have -# to be enabled when doing dist builds, since that's no longer a common -# case. -enabled doxygen && enable_feature install_docs -enable_feature install_bins -enable_feature install_libs - -enable_feature static -enable_feature optimizations -enable_feature dependency_tracking -enable_feature spatial_resampling -enable_feature multithread -enable_feature os_support -enable_feature pic - -CODECS=" - av1_encoder - av1_decoder -" -CODEC_FAMILIES=" - av1 -" - -ARCH_LIST=" - arm - mips - x86 - x86_64 -" -ARCH_EXT_LIST_X86=" - mmx - sse - sse2 - sse3 - ssse3 - sse4_1 - avx - avx2 -" -ARCH_EXT_LIST=" - neon - neon_asm - - mips32 - dspr2 - msa - mips64 - - ${ARCH_EXT_LIST_X86} -" -HAVE_LIST=" - ${ARCH_EXT_LIST} - aom_ports - fexcept - pthread_h - unistd_h - wxwidgets -" -EXPERIMENT_LIST=" - fp_mb_stats - rect_tx_ext - rect_tx_ext_intra - short_filter - dual_filter - tx64x64 - ext_intra - filter_intra - intra_edge - ext_intra_mod - ext_intra_mod2 - intrabc - new_quant - loop_restoration - striped_loop_restoration - ext_partition - ext_partition_types - ext_tile - inter_stats_only - kf_ctx - cfl - dct_only - daala_tx - daala_tx4 - daala_tx8 - daala_tx16 - daala_tx32 - daala_tx64 - daala_tx_dst8 - daala_tx_dst32 - frame_size - ext_delta_q - parallel_deblocking - deblock_13tap - loopfiltering_across_tiles - loopfiltering_across_tiles_ext - tempmv_signaling - rd_debug - reference_buffer - entropy_stats - dependent_horztiles - dependent_horztilegroups - dist_8x8 - palette_throughput - lv_map - txk_sel - mv_compress - segment_globalmv - aom_qm - ext_qm - ext_comp_refs - bgsprite - simplify_tx_mode - loopfilter_level - no_frame_context_signaling - max_tile - hash_me - colorspace_headers - cicp - mfmv - frame_marker - jnt_comp - frame_sign_bias - ext_skip - obu - amvr - opt_ref_mv - tmv - ext_warped_motion - horzonly_frame_superres - eob_first - eighth_pel_mv_only - fwd_kf - mono_video - spatial_segmentation - segment_pred_last - obu_no_ivf - tile_info_first -" -CONFIG_LIST=" - dependency_tracking - external_build - install_docs - install_bins - install_libs - install_srcs - debug - gprof - gcov - rvct - gcc - msvs - pic - big_endian - - codec_srcs - debug_libs - - runtime_cpu_detect - postproc - multithread - internal_stats - ${CODECS} - ${CODEC_FAMILIES} - static_msvcrt - spatial_resampling - realtime_only - shared - static - small - postproc_visualizer - os_support - unit_tests - webm_io - libyuv - accounting - inspection - decode_perf_tests - encode_perf_tests - bitstream_debug - mismatch_debug - symbolrate - coefficient_range_checking - lowbitdepth - experimental - size_limit - ${EXPERIMENT_LIST} - analyzer -" -CMDLINE_SELECT=" - dependency_tracking - external_build - extra_warnings - werror - install_docs - install_bins - install_libs - install_srcs - debug - gprof - gcov - pic - optimizations - ccache - runtime_cpu_detect - thumb - - libs - examples - analyzer - docs - tools - libc - as - size_limit - codec_srcs - debug_libs - - postproc - multithread - internal_stats - ${CODECS} - ${CODEC_FAMILIES} - static_msvcrt - spatial_resampling - realtime_only - shared - static - small - postproc_visualizer - unit_tests - webm_io - libyuv - accounting - inspection - decode_perf_tests - encode_perf_tests - coefficient_range_checking - bitstream_debug - mismatch_debug - symbolrate - lowbitdepth - experimental - colorspace_headers - cicp -" - -process_cmdline() { - for opt do - optval="${opt#*=}" - case "$opt" in - --disable-codecs) - for c in ${CODEC_FAMILIES}; do disable_codec $c; done - ;; - --enable-?*|--disable-?*) - eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'` - if is_in ${option} ${EXPERIMENT_LIST}; then - if enabled experimental; then - ${action}_feature $option - else - log_echo "Ignoring $opt -- not in experimental mode." - fi - elif is_in ${option} "${CODECS} ${CODEC_FAMILIES}"; then - ${action}_codec ${option} - else - process_common_cmdline $opt - fi - ;; - *) process_common_cmdline "$opt" - ;; - esac - done -} - -post_process_cmdline() { - c="" - - # Enable all detected codecs, if they haven't been disabled - for c in ${CODECS}; do soft_enable $c; done - - # Enable the codec family if any component of that family is enabled - for c in ${CODECS}; do - enabled $c && enable_feature ${c%_*} - done - - # Set the {en,de}coders variable if any algorithm in that class is enabled - for c in ${CODECS}; do - enabled ${c} && enable_feature ${c##*_}s - done - - # Adopted - soft_enable ext_intra - soft_enable intra_edge - soft_enable mv_compress - soft_enable dual_filter - soft_enable aom_qm - soft_enable dist_8x8 - soft_enable loop_restoration - soft_enable ext_partition - soft_enable ext_partition_types - soft_enable lv_map - soft_enable mfmv - - # Provisional adopted - soft_enable reference_buffer - soft_enable loopfiltering_across_tiles - soft_enable loopfiltering_across_tiles_ext - soft_enable palette_throughput - soft_enable tempmv_signaling - soft_enable ext_comp_refs - soft_enable ext_delta_q - soft_enable parallel_deblocking - soft_enable obu - soft_enable loopfilter_level - soft_enable cfl - soft_enable deblock_13tap - soft_enable max_tile - soft_enable frame_marker - soft_enable kf_ctx - soft_enable striped_loop_restoration - soft_enable ext_intra_mod - soft_enable frame_size - soft_enable segment_globalmv - soft_enable short_filter - soft_enable simplify_tx_mode - soft_enable tx64x64 - soft_enable rect_tx_ext - soft_enable rect_tx_ext_intra - soft_enable filter_intra - soft_enable ext_skip - soft_enable frame_sign_bias - soft_enable ext_warped_motion - soft_enable horzonly_frame_superres - - # Enable low-bitdepth pixel pipeline by default - soft_enable lowbitdepth - - # Enable using 8x8 TMV to realize the decoder speedup. - soft_enable tmv - - # Fix up experiment dependencies - enabled eob_first && enable_feature lv_map - enabled txk_sel && soft_enable lv_map - enabled ext_intra_mod && enable_feature intra_edge - enabled intra_edge && enable_feature ext_intra - enabled mfmv && enable_feature frame_marker - enabled jnt_comp && enable_feature frame_marker - enabled frame_sign_bias && enable_feature frame_marker - enabled ext_skip && enable_feature frame_marker - enabled loopfilter_level && enable_feature parallel_deblocking - enabled loopfilter_level && enable_feature ext_delta_q - enabled striped_loop_restoration && enable_feature loop_restoration - enabled loopfiltering_across_tiles_ext && enable_feature loopfiltering_across_tiles - - if enabled daala_tx; then - soft_enable daala_tx_dst32 - enable_feature daala_tx4 - enable_feature daala_tx8 - enable_feature daala_tx16 - enable_feature daala_tx32 - enable_feature daala_tx64 - else - disable_feature daala_tx4 - disable_feature daala_tx8 - disable_feature daala_tx16 - disable_feature daala_tx32 - disable_feature daala_tx64 - fi - if enabled daala_tx64 && ! enabled tx64x64; then - log_echo "daala_tx64 requires tx64x64, so disabling daala_tx64" - disable_feature daala_tx64 - fi - if enabled daala_tx_dst8 && ! enabled daala_tx8; then - log_echo "daala_tx_dst8 requires daala_tx8, so disabling daala_tx_dst8" - disable_feature daala_tx_dst8 - fi - if enabled daala_tx_dst32 && ! enabled daala_tx32; then - log_echo "daala_tx_dst32 requires daala_tx32, so disabling daala_tx_dst32" - disable_feature daala_tx_dst32 - fi - if enabled daala_tx4 || enabled daala_tx8 || enabled daala_tx16 || - enabled daala_tx32 || enabled daala_tx64; then - disable_feature txmg - enable_feature lowbitdepth - fi - if enabled ext_partition_types; then - if enabled fp_mb_stats; then - log_echo "ext_partition_types not compatible with fp_mb_stats;" - log_echo "disabling fp_mb_stats" - disable_feature fp_mb_stats - fi - fi - # Enable accounting and inspection when building the analyzer - if enabled analyzer; then - soft_enable accounting - soft_enable inspection - fi - # Enable hash_me if amvr is enabled - if enabled amvr && enabled av1_encoder; then - log_echo "encoder side amvr requires hash_me" - enable_feature hash_me - fi -} - -process_targets() { - enabled child || write_common_config_banner - write_common_target_config_h ${BUILD_PFX}aom_config.h - write_common_config_targets - - # Calculate the default distribution name, based on the enabled features - cf="" - DIST_DIR=aom - for cf in $CODEC_FAMILIES; do - if enabled ${cf}_encoder && enabled ${cf}_decoder; then - DIST_DIR="${DIST_DIR}-${cf}" - elif enabled ${cf}_encoder; then - DIST_DIR="${DIST_DIR}-${cf}cx" - elif enabled ${cf}_decoder; then - DIST_DIR="${DIST_DIR}-${cf}dx" - fi - done - enabled debug_libs && DIST_DIR="${DIST_DIR}-debug" - enabled codec_srcs && DIST_DIR="${DIST_DIR}-src" - ! enabled postproc && DIST_DIR="${DIST_DIR}-nopost" - ! enabled multithread && DIST_DIR="${DIST_DIR}-nomt" - ! enabled install_docs && DIST_DIR="${DIST_DIR}-nodocs" - DIST_DIR="${DIST_DIR}-${tgt_isa}-${tgt_os}" - case "${tgt_os}" in - win*) enabled static_msvcrt && DIST_DIR="${DIST_DIR}mt" || DIST_DIR="${DIST_DIR}md" - DIST_DIR="${DIST_DIR}-${tgt_cc}" - ;; - esac - if [ -f "${source_path}/build/make/version.sh" ]; then - ver=`"$source_path/build/make/version.sh" --bare "$source_path"` - DIST_DIR="${DIST_DIR}-${ver}" - VERSION_STRING=${ver} - ver=${ver%%-*} - VERSION_PATCH=${ver##*.} - ver=${ver%.*} - VERSION_MINOR=${ver##*.} - ver=${ver#v} - VERSION_MAJOR=${ver%.*} - fi - enabled child || cat <<EOF >> config.mk - -PREFIX=${prefix} -ifeq (\$(MAKECMDGOALS),dist) -DIST_DIR?=${DIST_DIR} -else -DIST_DIR?=\$(DESTDIR)${prefix} -endif -LIBSUBDIR=${libdir##${prefix}/} - -VERSION_STRING=${VERSION_STRING} - -VERSION_MAJOR=${VERSION_MAJOR} -VERSION_MINOR=${VERSION_MINOR} -VERSION_PATCH=${VERSION_PATCH} - -CONFIGURE_ARGS=${CONFIGURE_ARGS} -EOF - enabled child || echo "CONFIGURE_ARGS?=${CONFIGURE_ARGS}" >> config.mk - - # - # Write makefiles for all enabled targets - # - for tgt in libs examples docs tools solution; do - tgt_fn="$tgt-$toolchain.mk" - - if enabled $tgt; then - echo "Creating makefiles for ${toolchain} ${tgt}" - write_common_target_config_mk $tgt_fn ${BUILD_PFX}aom_config.h - #write_${tgt}_config - fi - done - -} - -process_detect() { - if enabled shared; then - # Can only build shared libs on a subset of platforms. Doing this check - # here rather than at option parse time because the target auto-detect - # magic happens after the command line has been parsed. - case "${tgt_os}" in - linux|os2|darwin*|iphonesimulator*) - # Supported platforms - ;; - *) - if enabled gnu; then - echo "--enable-shared is only supported on ELF; assuming this is OK" - else - die "--enable-shared only supported on ELF, OS/2, and Darwin for now" - fi - ;; - esac - fi - if [ -z "$CC" ] || enabled external_build; then - echo "Bypassing toolchain for environment detection." - enable_feature external_build - check_header() { - log fake_check_header "$@" - header=$1 - shift - var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'` - disable_feature $var - # Headers common to all environments - case $header in - stdio.h) - true; - ;; - *) - result=false - for d in "$@"; do - [ -f "${d##-I}/$header" ] && result=true && break - done - ${result:-true} - esac && enable_feature $var - - # Specialize windows and POSIX environments. - case $toolchain in - *-win*-*) - # Don't check for any headers in Windows builds. - false - ;; - *) - case $header in - pthread.h) true;; - unistd.h) true;; - *) false;; - esac && enable_feature $var - esac - enabled $var - } - check_ld() { - true - } - fi - check_header stdio.h || die "Unable to invoke compiler: ${CC} ${CFLAGS}" - check_ld <<EOF || die "Toolchain is unable to link executables" -int main(void) {return 0;} -EOF - # check system headers - check_header pthread.h - check_header unistd.h # for sysconf(3) and friends. - - check_header aom/aom_integer.h -I${source_path} && enable_feature aom_ports - - check_ld <<EOF && enable_feature fexcept -#define _GNU_SOURCE -#include <fenv.h> -int main(void) { (void)feenableexcept(FE_DIVBYZERO | FE_INVALID); return 0; } -EOF -} - -process_toolchain() { - process_common_toolchain - - # Enable some useful compiler flags - if enabled gcc; then - enabled werror && check_add_cflags -Werror - check_add_cflags -Wall - check_add_cflags -Wdisabled-optimization - check_add_cflags -Wfloat-conversion - check_add_cflags -Wpointer-arith - check_add_cflags -Wtype-limits - check_add_cflags -Wvla - check_add_cflags -Wimplicit-function-declaration - check_add_cflags -Wuninitialized - check_add_cflags -Wunused - check_add_cflags -Wsign-compare - check_add_cflags -Wstring-conversion - check_add_cflags -Wlogical-op - check_add_cflags -Wstack-usage=320000 - # Enabling the following warning (in combination with -Wunused above) - # for C++ generates errors in third_party code including googletest and - # libyuv. So enable it only for C code. - check_cflags "-Wextra" && add_cflags_only "-Wextra" - # Enabling the following warning for C++ generates some useless warnings - # about some function parameters shadowing class member function names. - # So, only enable this warning for C code. - check_cflags "-Wshadow" && add_cflags_only "-Wshadow" - if enabled mips || [ -z "${INLINE}" ]; then - enabled extra_warnings || check_add_cflags -Wno-unused-function - fi - # gtest makes heavy use of undefined pre-processor symbols - check_cflags "-Wundef" && add_cflags_only "-Wundef" - # Avoid this warning for third_party C++ sources. Some reorganization - # would be needed to apply this only to test/*.cc. - check_cflags -Wshorten-64-to-32 && add_cflags_only -Wshorten-64-to-32 - fi - - if enabled icc; then - enabled werror && check_add_cflags -Werror - check_add_cflags -Wall - check_add_cflags -Wpointer-arith - - # ICC has a number of floating point optimizations that we disable - # in favor of deterministic output WRT to other compilers - add_cflags -fp-model precise - fi - - if enabled analyzer; then - soft_enable wxwidgets - if ! wx-config --version > /dev/null; then - die "Couldn't find wx-config" - fi - - add_cxxflags_only $(wx-config --cppflags) - add_extralibs $(wx-config --libs) - fi - - # Enable extra, harmless warnings. These might provide additional insight - # to what the compiler is doing and why, but in general, but they shouldn't - # be treated as fatal, even if we're treating warnings as errors. - GCC_EXTRA_WARNINGS=" - -Wdisabled-optimization - -Winline - " - enabled gcc && EXTRA_WARNINGS="${GCC_EXTRA_WARNINGS}" - RVCT_EXTRA_WARNINGS=" - --remarks - " - enabled rvct && EXTRA_WARNINGS="${RVCT_EXTRA_WARNINGS}" - if enabled extra_warnings; then - for w in ${EXTRA_WARNINGS}; do - check_add_cflags ${w} - enabled gcc && enabled werror && check_add_cflags -Wno-error=${w} - done - fi - - # ccache only really works on gcc toolchains - enabled gcc || soft_disable ccache - - # Enable the postbuild target if building for visual studio. - case "$tgt_cc" in - vs*) enable_feature msvs - enable_feature solution - vs_version=${tgt_cc##vs} - VCPROJ_SFX=vcxproj - gen_vcproj_cmd=${source_path}/build/make/gen_msvs_vcxproj.sh - enabled werror && gen_vcproj_cmd="${gen_vcproj_cmd} --enable-werror" - all_targets="${all_targets} solution" - INLINE="__inline" - ;; - esac - - # Other toolchain specific defaults - case $toolchain in x86*) soft_enable postproc;; esac - - if enabled postproc_visualizer; then - enabled postproc || die "postproc_visualizer requires postproc to be enabled" - fi - - # Enable unit tests by default if we have a working C++ compiler. - case "$toolchain" in - *-vs*) - soft_enable unit_tests - soft_enable webm_io - soft_enable libyuv - ;; - *-android-*) - soft_enable webm_io - soft_enable libyuv - # GTestLog must be modified to use Android logging utilities. - ;; - *-darwin-*) - # iOS/ARM builds do not work with gtest. This does not match - # x86 targets. - ;; - *-iphonesimulator-*) - soft_enable webm_io - soft_enable libyuv - ;; - *-win*) - # Some mingw toolchains don't have pthread available by default. - # Treat these more like visual studio where threading in gtest - # would be disabled for the same reason. - check_cxx "$@" <<EOF && soft_enable unit_tests -int z; -EOF - check_cxx "$@" <<EOF && soft_enable webm_io -int z; -EOF - check_cxx "$@" <<EOF && soft_enable libyuv -int z; -EOF - ;; - *) - enabled pthread_h && check_cxx "$@" <<EOF && soft_enable unit_tests -int z; -EOF - check_cxx "$@" <<EOF && soft_enable webm_io -int z; -EOF - check_cxx "$@" <<EOF && soft_enable libyuv -int z; -EOF - ;; - esac - # libwebm needs to be linked with C++ standard library - enabled webm_io && LD=${CXX} - - # append any user defined extra cflags - if [ -n "${extra_cflags}" ] ; then - check_add_cflags ${extra_cflags} || \ - die "Requested extra CFLAGS '${extra_cflags}' not supported by compiler" - fi - if [ -n "${extra_cxxflags}" ]; then - check_add_cxxflags ${extra_cxxflags} || \ - die "Requested extra CXXFLAGS '${extra_cxxflags}' not supported by compiler" - fi -} - - -## -## END APPLICATION SPECIFIC CONFIGURATION -## -CONFIGURE_ARGS="$@" -process "$@" -print_webm_license ${BUILD_PFX}aom_config.c "/*" " */" -cat <<EOF >> ${BUILD_PFX}aom_config.c -#include "aom/aom_codec.h" -static const char* const cfg = "$CONFIGURE_ARGS"; -const char *aom_codec_build_config(void) {return cfg;} -EOF diff --git a/docs.mk b/docs.mk deleted file mode 100644 index 0dfc65b75f..0000000000 --- a/docs.mk +++ /dev/null @@ -1,50 +0,0 @@ -## -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - - - -INSTALL_MAPS += docs/% docs/% -INSTALL_MAPS += src/% % -INSTALL_MAPS += % % - -# Static documentation authored in doxygen -CODEC_DOX := mainpage.dox \ - keywords.dox \ - usage.dox \ - usage_cx.dox \ - usage_dx.dox \ - -# Other doxy files sourced in Markdown -TXT_DOX = $(call enabled,TXT_DOX) - -EXAMPLE_PATH += $(SRC_PATH_BARE) #for CHANGELOG, README, etc -EXAMPLE_PATH += $(SRC_PATH_BARE)/examples - -doxyfile: $(if $(findstring examples, $(ALL_TARGETS)),examples.doxy) -doxyfile: libs.doxy_template libs.doxy - @echo " [CREATE] $@" - @cat $^ > $@ - @echo "STRIP_FROM_PATH += $(SRC_PATH_BARE) $(BUILD_ROOT)" >> $@ - @echo "INPUT += $(addprefix $(SRC_PATH_BARE)/,$(CODEC_DOX))" >> $@; - @echo "INPUT += $(TXT_DOX)" >> $@; - @echo "EXAMPLE_PATH += $(EXAMPLE_PATH)" >> $@ - -CLEAN-OBJS += doxyfile $(wildcard docs/html/*) -docs/html/index.html: doxyfile $(CODEC_DOX) $(TXT_DOX) - @echo " [DOXYGEN] $<" - @doxygen $< -DOCS-yes += docs/html/index.html - -DIST-DOCS-yes = $(wildcard docs/html/*) -DIST-DOCS-$(CONFIG_CODEC_SRCS) += $(addprefix src/,$(CODEC_DOX)) -DIST-DOCS-$(CONFIG_CODEC_SRCS) += src/libs.doxy_template -DIST-DOCS-yes += CHANGELOG -DIST-DOCS-yes += README diff --git a/examples.mk b/examples.mk deleted file mode 100644 index dd59880b6e..0000000000 --- a/examples.mk +++ /dev/null @@ -1,406 +0,0 @@ -## -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - - -LIBYUV_SRCS += third_party/libyuv/include/libyuv/basic_types.h \ - third_party/libyuv/include/libyuv/convert.h \ - third_party/libyuv/include/libyuv/convert_argb.h \ - third_party/libyuv/include/libyuv/convert_from.h \ - third_party/libyuv/include/libyuv/cpu_id.h \ - third_party/libyuv/include/libyuv/planar_functions.h \ - third_party/libyuv/include/libyuv/rotate.h \ - third_party/libyuv/include/libyuv/row.h \ - third_party/libyuv/include/libyuv/scale.h \ - third_party/libyuv/include/libyuv/scale_row.h \ - third_party/libyuv/source/cpu_id.cc \ - third_party/libyuv/source/planar_functions.cc \ - third_party/libyuv/source/row_any.cc \ - third_party/libyuv/source/row_common.cc \ - third_party/libyuv/source/row_gcc.cc \ - third_party/libyuv/source/row_mips.cc \ - third_party/libyuv/source/row_neon.cc \ - third_party/libyuv/source/row_neon64.cc \ - third_party/libyuv/source/row_win.cc \ - third_party/libyuv/source/scale.cc \ - third_party/libyuv/source/scale_any.cc \ - third_party/libyuv/source/scale_common.cc \ - third_party/libyuv/source/scale_gcc.cc \ - third_party/libyuv/source/scale_mips.cc \ - third_party/libyuv/source/scale_neon.cc \ - third_party/libyuv/source/scale_neon64.cc \ - third_party/libyuv/source/scale_win.cc \ - -LIBWEBM_COMMON_SRCS += third_party/libwebm/common/hdr_util.cc \ - third_party/libwebm/common/hdr_util.h \ - third_party/libwebm/common/webmids.h - -LIBWEBM_MUXER_SRCS += third_party/libwebm/mkvmuxer/mkvmuxer.cc \ - third_party/libwebm/mkvmuxer/mkvmuxerutil.cc \ - third_party/libwebm/mkvmuxer/mkvwriter.cc \ - third_party/libwebm/mkvmuxer/mkvmuxer.h \ - third_party/libwebm/mkvmuxer/mkvmuxertypes.h \ - third_party/libwebm/mkvmuxer/mkvmuxerutil.h \ - third_party/libwebm/mkvparser/mkvparser.h \ - third_party/libwebm/mkvmuxer/mkvwriter.h - -LIBWEBM_PARSER_SRCS = third_party/libwebm/mkvparser/mkvparser.cc \ - third_party/libwebm/mkvparser/mkvreader.cc \ - third_party/libwebm/mkvparser/mkvparser.h \ - third_party/libwebm/mkvparser/mkvreader.h - -# Add compile flags and include path for libwebm sources. -ifeq ($(CONFIG_WEBM_IO),yes) - CXXFLAGS += -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS - INC_PATH-yes += $(SRC_PATH_BARE)/third_party/libwebm -endif - -# List of examples to build. UTILS are tools meant for distribution -# while EXAMPLES demonstrate specific portions of the API. -UTILS-$(CONFIG_AV1_DECODER) += aomdec.c -aomdec.SRCS += md5_utils.c md5_utils.h -aomdec.SRCS += aom_ports/mem_ops.h -aomdec.SRCS += aom_ports/mem_ops_aligned.h -aomdec.SRCS += aom_ports/msvc.h -aomdec.SRCS += aom_ports/aom_timer.h -aomdec.SRCS += aom/aom_integer.h -aomdec.SRCS += args.c args.h -aomdec.SRCS += ivfdec.c ivfdec.h -aomdec.SRCS += tools_common.c tools_common.h -aomdec.SRCS += y4menc.c y4menc.h -ifeq ($(CONFIG_LIBYUV),yes) - aomdec.SRCS += $(LIBYUV_SRCS) -endif -ifeq ($(CONFIG_WEBM_IO),yes) - aomdec.SRCS += $(LIBWEBM_COMMON_SRCS) - aomdec.SRCS += $(LIBWEBM_MUXER_SRCS) - aomdec.SRCS += $(LIBWEBM_PARSER_SRCS) - aomdec.SRCS += webmdec.cc webmdec.h -endif -ifeq ($(CONFIG_OBU_NO_IVF),yes) - aomdec.SRCS += obudec.c obudec.h -endif -aomdec.GUID = BA5FE66F-38DD-E034-F542-B1578C5FB950 -aomdec.DESCRIPTION = Full featured decoder -UTILS-$(CONFIG_AV1_ENCODER) += aomenc.c -aomenc.SRCS += args.c args.h y4minput.c y4minput.h aomenc.h -aomenc.SRCS += ivfdec.c ivfdec.h -aomenc.SRCS += ivfenc.c ivfenc.h -aomenc.SRCS += rate_hist.c rate_hist.h -aomenc.SRCS += tools_common.c tools_common.h -aomenc.SRCS += examples/encoder_util.h examples/encoder_util.c -aomenc.SRCS += warnings.c warnings.h -aomenc.SRCS += aom_ports/mem_ops.h -aomenc.SRCS += aom_ports/mem_ops_aligned.h -aomenc.SRCS += aom_ports/msvc.h -aomenc.SRCS += aom_ports/aom_timer.h -aomenc.SRCS += aomstats.c aomstats.h -ifeq ($(CONFIG_LIBYUV),yes) - aomenc.SRCS += $(LIBYUV_SRCS) -endif -ifeq ($(CONFIG_WEBM_IO),yes) - aomenc.SRCS += $(LIBWEBM_COMMON_SRCS) - aomenc.SRCS += $(LIBWEBM_MUXER_SRCS) - aomenc.SRCS += $(LIBWEBM_PARSER_SRCS) - aomenc.SRCS += webmenc.cc webmenc.h -endif -aomenc.GUID = 548DEC74-7A15-4B2B-AFC3-AA102E7C25C1 -aomenc.DESCRIPTION = Full featured encoder - -ifeq ($(CONFIG_ANALYZER),yes) - EXAMPLES-$(CONFIG_AV1_DECODER) += analyzer.cc - analyzer.GUID = 83827a8c-e3c3-4b19-8832-0cfc206c4496 - analyzer.SRCS += ivfdec.h ivfdec.c - analyzer.SRCS += av1/decoder/inspection.h - analyzer.SRCS += av1/decoder/inspection.c - analyzer.SRCS += video_reader.h video_reader.c - analyzer.SRCS += tools_common.h tools_common.c - analyzer.DESCRIPTION = Bitstream analyzer -endif - -ifeq ($(CONFIG_INSPECTION),yes) -EXAMPLES-$(CONFIG_AV1_DECODER) += inspect.c -inspect.GUID = FA46A420-3356-441F-B0FD-60AA1345C181 -inspect.SRCS += ivfdec.h ivfdec.c -inspect.SRCS += args.c args.h -inspect.SRCS += tools_common.h tools_common.c -inspect.SRCS += video_common.h -inspect.SRCS += video_reader.h video_reader.c -inspect.SRCS += aom_ports/mem_ops.h -inspect.SRCS += aom_ports/mem_ops_aligned.h -inspect.SRCS += aom_ports/msvc.h -inspect.DESCRIPTION = Dump inspection data -endif - -EXAMPLES-$(CONFIG_AV1_DECODER) += simple_decoder.c -simple_decoder.GUID = D3BBF1E9-2427-450D-BBFF-B2843C1D44CC -simple_decoder.SRCS += ivfdec.h ivfdec.c -simple_decoder.SRCS += tools_common.h tools_common.c -simple_decoder.SRCS += video_common.h -simple_decoder.SRCS += video_reader.h video_reader.c -simple_decoder.SRCS += aom_ports/mem_ops.h -simple_decoder.SRCS += aom_ports/mem_ops_aligned.h -simple_decoder.SRCS += aom_ports/msvc.h -simple_decoder.DESCRIPTION = Simplified decoder loop -EXAMPLES-$(CONFIG_AV1_DECODER) += decode_to_md5.c -decode_to_md5.SRCS += md5_utils.h md5_utils.c -decode_to_md5.SRCS += ivfdec.h ivfdec.c -decode_to_md5.SRCS += tools_common.h tools_common.c -decode_to_md5.SRCS += video_common.h -decode_to_md5.SRCS += video_reader.h video_reader.c -decode_to_md5.SRCS += aom_ports/mem_ops.h -decode_to_md5.SRCS += aom_ports/mem_ops_aligned.h -decode_to_md5.SRCS += aom_ports/msvc.h -decode_to_md5.GUID = 59120B9B-2735-4BFE-B022-146CA340FE42 -decode_to_md5.DESCRIPTION = Frame by frame MD5 checksum -EXAMPLES-$(CONFIG_AV1_ENCODER) += simple_encoder.c -simple_encoder.SRCS += ivfenc.h ivfenc.c -simple_encoder.SRCS += tools_common.h tools_common.c -simple_encoder.SRCS += video_common.h -simple_encoder.SRCS += video_writer.h video_writer.c -simple_encoder.SRCS += aom_ports/msvc.h -simple_encoder.GUID = 4607D299-8A71-4D2C-9B1D-071899B6FBFD -simple_encoder.DESCRIPTION = Simplified encoder loop -EXAMPLES-$(CONFIG_AV1_ENCODER) += lossless_encoder.c -lossless_encoder.SRCS += ivfenc.h ivfenc.c -lossless_encoder.SRCS += tools_common.h tools_common.c -lossless_encoder.SRCS += video_common.h -lossless_encoder.SRCS += video_writer.h video_writer.c -lossless_encoder.SRCS += aom_ports/msvc.h -lossless_encoder.GUID = B63C7C88-5348-46DC-A5A6-CC151EF93366 -lossless_encoder.DESCRIPTION = Simplified lossless encoder -EXAMPLES-$(CONFIG_AV1_ENCODER) += twopass_encoder.c -twopass_encoder.SRCS += ivfenc.h ivfenc.c -twopass_encoder.SRCS += tools_common.h tools_common.c -twopass_encoder.SRCS += video_common.h -twopass_encoder.SRCS += video_writer.h video_writer.c -twopass_encoder.SRCS += aom_ports/msvc.h -twopass_encoder.GUID = 73494FA6-4AF9-4763-8FBB-265C92402FD8 -twopass_encoder.DESCRIPTION = Two-pass encoder loop -EXAMPLES-$(CONFIG_AV1_DECODER) += decode_with_drops.c -decode_with_drops.SRCS += ivfdec.h ivfdec.c -decode_with_drops.SRCS += tools_common.h tools_common.c -decode_with_drops.SRCS += video_common.h -decode_with_drops.SRCS += video_reader.h video_reader.c -decode_with_drops.SRCS += aom_ports/mem_ops.h -decode_with_drops.SRCS += aom_ports/mem_ops_aligned.h -decode_with_drops.SRCS += aom_ports/msvc.h -decode_with_drops.GUID = CE5C53C4-8DDA-438A-86ED-0DDD3CDB8D26 -decode_with_drops.DESCRIPTION = Drops frames while decoding -EXAMPLES-$(CONFIG_AV1_ENCODER) += set_maps.c -set_maps.SRCS += ivfenc.h ivfenc.c -set_maps.SRCS += tools_common.h tools_common.c -set_maps.SRCS += video_common.h -set_maps.SRCS += video_writer.h video_writer.c -set_maps.SRCS += aom_ports/msvc.h -set_maps.GUID = ECB2D24D-98B8-4015-A465-A4AF3DCC145F -set_maps.DESCRIPTION = Set active and ROI maps -ifeq ($(CONFIG_EXT_TILE),yes) -EXAMPLES-$(CONFIG_AV1_ENCODER) += lightfield_encoder.c -lightfield_encoder.SRCS += ivfenc.h ivfenc.c -lightfield_encoder.SRCS += tools_common.h tools_common.c -lightfield_encoder.SRCS += video_common.h -lightfield_encoder.SRCS += video_writer.h video_writer.c -lightfield_encoder.SRCS += aom_ports/msvc.h -lightfield_encoder.GUID = 73494FA6-4AF9-4763-8FBB-265C92402FD8 -lightfield_encoder.DESCRIPTION = Lightfield encoder loop -EXAMPLES-$(CONFIG_AV1_DECODER) += lightfield_decoder.c -lightfield_decoder.SRCS += ivfdec.h ivfdec.c -lightfield_decoder.SRCS += tools_common.h tools_common.c -lightfield_decoder.SRCS += video_common.h -lightfield_decoder.SRCS += video_reader.h video_reader.c -lightfield_decoder.SRCS += aom_ports/mem_ops.h -lightfield_decoder.SRCS += aom_ports/mem_ops_aligned.h -lightfield_decoder.SRCS += aom_ports/msvc.h -lightfield_decoder.GUID = D3BBF1E9-2427-450D-BBFF-B2843C1D44CC -lightfield_decoder.DESCRIPTION = lightfield decoder loop -endif -ifeq ($(CONFIG_AV1_ENCODER),yes) -ifeq ($(CONFIG_AV1_DECODER),yes) -EXAMPLES-$(CONFIG_AV1_ENCODER) += aom_cx_set_ref.c -aom_cx_set_ref.SRCS += ivfenc.h ivfenc.c -aom_cx_set_ref.SRCS += tools_common.h tools_common.c -aom_cx_set_ref.SRCS += examples/encoder_util.h -aom_cx_set_ref.SRCS += examples/encoder_util.c -aom_cx_set_ref.SRCS += video_common.h -aom_cx_set_ref.SRCS += video_writer.h video_writer.c -aom_cx_set_ref.SRCS += aom_ports/msvc.h -aom_cx_set_ref.GUID = C5E31F7F-96F6-48BD-BD3E-10EBF6E8057A -aom_cx_set_ref.DESCRIPTION = AV1 set encoder reference frame -endif -endif - -# Handle extra library flags depending on codec configuration - -# We should not link to math library (libm) on RVCT -# when building for bare-metal targets -ifeq ($(CONFIG_OS_SUPPORT), yes) -CODEC_EXTRA_LIBS-$(CONFIG_AV1) += m -else - ifeq ($(CONFIG_GCC), yes) - CODEC_EXTRA_LIBS-$(CONFIG_AV1) += m - endif -endif -# -# End of specified files. The rest of the build rules should happen -# automagically from here. -# - - -# Examples need different flags based on whether we're building -# from an installed tree or a version controlled tree. Determine -# the proper paths. -ifeq ($(HAVE_ALT_TREE_LAYOUT),yes) - LIB_PATH-yes := $(SRC_PATH_BARE)/../lib - INC_PATH-yes := $(SRC_PATH_BARE)/../include -else - LIB_PATH-yes += $(if $(BUILD_PFX),$(BUILD_PFX),.) - INC_PATH-$(CONFIG_AV1_DECODER) += $(SRC_PATH_BARE)/av1 - INC_PATH-$(CONFIG_AV1_ENCODER) += $(SRC_PATH_BARE)/av1 -endif -INC_PATH-$(CONFIG_LIBYUV) += $(SRC_PATH_BARE)/third_party/libyuv/include -LIB_PATH := $(call enabled,LIB_PATH) -INC_PATH := $(call enabled,INC_PATH) -INTERNAL_CFLAGS = $(addprefix -I,$(INC_PATH)) -INTERNAL_LDFLAGS += $(addprefix -L,$(LIB_PATH)) - - -# Expand list of selected examples to build (as specified above) -UTILS = $(call enabled,UTILS) -EXAMPLES = $(addprefix examples/,$(call enabled,EXAMPLES)) -ALL_EXAMPLES = $(UTILS) $(EXAMPLES) -UTIL_SRCS = $(foreach ex,$(UTILS),$($(ex:.c=).SRCS) $($(ex:.cc=).SRCS)) -ALL_SRCS = $(foreach ex, $(ALL_EXAMPLES), \ - $($(notdir $(ex:.c=)).SRCS) \ - $($(notdir $(ex:.cc=)).SRCS)) -CODEC_EXTRA_LIBS=$(sort $(call enabled,CODEC_EXTRA_LIBS)) - - -# Expand all example sources into a variable containing all sources -# for that example (not just them main one specified in UTILS/EXAMPLES) -# and add this file to the list (for MSVS workspace generation) -EXAMPLES_C = $(filter-out %.cc, $(ALL_EXAMPLES)) -$(foreach ex,$(EXAMPLES_C), \ - $(eval $(notdir $(ex:.c=)).SRCS += $(ex) examples.mk)) -EXAMPLES_CXX = $(filter-out %.c, $(ALL_EXAMPLES)) -$(foreach ex,$(EXAMPLES_CXX), \ - $(eval $(notdir $(ex:.cc=)).SRCS += $(ex) examples.mk)) - -# Create build/install dependencies for all examples. The common case -# is handled here. The MSVS case is handled below. -NOT_MSVS = $(if $(CONFIG_MSVS),,yes) -DIST-BINS-$(NOT_MSVS) += $(addprefix bin/,$(EXAMPLES_C:.c=$(EXE_SFX))) -DIST-BINS-$(NOT_MSVS) += $(addprefix bin/,$(EXAMPLES_CXX:.cc=$(EXE_SFX))) -INSTALL-BINS-$(NOT_MSVS) += $(addprefix bin/,$(UTILS:.c=$(EXE_SFX))) -DIST-SRCS-yes += $(ALL_SRCS) -INSTALL-SRCS-yes += $(UTIL_SRCS) -OBJS-$(NOT_MSVS) += $(call objs,$(ALL_SRCS)) -BINS-$(NOT_MSVS) += $(addprefix $(BUILD_PFX), \ - $(EXAMPLES_C:.c=$(EXE_SFX))) -BINS-$(NOT_MSVS) += $(addprefix $(BUILD_PFX), \ - $(EXAMPLES_CXX:.cc=$(EXE_SFX))) - -# Instantiate linker template for all examples. -CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),aom_g,aom) -ifneq ($(filter darwin%,$(TGT_OS)),) -SHARED_LIB_SUF=.dylib -else -ifneq ($(filter os2%,$(TGT_OS)),) -SHARED_LIB_SUF=_dll.a -else -SHARED_LIB_SUF=.so -endif -endif -CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a) -$(foreach bin,$(BINS-yes),\ - $(eval $(bin):$(LIB_PATH)/lib$(CODEC_LIB)$(CODEC_LIB_SUF))\ - $(eval $(call linker_template,$(bin),\ - $(call objs,$($(notdir $(bin:$(EXE_SFX)=)).SRCS)) \ - -l$(CODEC_LIB) $(addprefix -l,$(CODEC_EXTRA_LIBS))\ - ))) - -# The following pairs define a mapping of locations in the distribution -# tree to locations in the source/build trees. -INSTALL_MAPS += src/%.c %.c -INSTALL_MAPS += src/% $(SRC_PATH_BARE)/% -INSTALL_MAPS += bin/% % -INSTALL_MAPS += % % - - -# Set up additional MSVS environment -ifeq ($(CONFIG_MSVS),yes) -CODEC_LIB=$(if $(CONFIG_SHARED),aom,$(if $(CONFIG_STATIC_MSVCRT),aommt,aommd)) -# This variable uses deferred expansion intentionally, since the results of -# $(wildcard) may change during the course of the Make. -VS_PLATFORMS = $(foreach d,$(wildcard */Release/$(CODEC_LIB).lib),$(word 1,$(subst /, ,$(d)))) -INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),bin/$(p)/% $(p)/Release/%) -endif - -# Build Visual Studio Projects. We use a template here to instantiate -# explicit rules rather than using an implicit rule because we want to -# leverage make's VPATH searching rather than specifying the paths on -# each file in ALL_EXAMPLES. This has the unfortunate side effect that -# touching the source files trigger a rebuild of the project files -# even though there is no real dependency there (the dependency is on -# the makefiles). We may want to revisit this. -define vcproj_template -$(1): $($(1:.$(VCPROJ_SFX)=).SRCS) aom.$(VCPROJ_SFX) - $(if $(quiet),@echo " [vcproj] $$@") - $(qexec)$$(GEN_VCPROJ)\ - --exe\ - --target=$$(TOOLCHAIN)\ - --name=$$(@:.$(VCPROJ_SFX)=)\ - --ver=$$(CONFIG_VS_VERSION)\ - --proj-guid=$$($$(@:.$(VCPROJ_SFX)=).GUID)\ - --src-path-bare="$(SRC_PATH_BARE)" \ - $$(if $$(CONFIG_STATIC_MSVCRT),--static-crt) \ - --out=$$@ $$(INTERNAL_CFLAGS) $$(CFLAGS) \ - $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -l$$(CODEC_LIB) $$^ -endef -ALL_EXAMPLES_BASENAME := $(notdir $(ALL_EXAMPLES)) -PROJECTS-$(CONFIG_MSVS) += $(ALL_EXAMPLES_BASENAME:.c=.$(VCPROJ_SFX)) -INSTALL-BINS-$(CONFIG_MSVS) += $(foreach p,$(VS_PLATFORMS),\ - $(addprefix bin/$(p)/,$(ALL_EXAMPLES_BASENAME:.c=.exe))) -$(foreach proj,$(call enabled,PROJECTS),\ - $(eval $(call vcproj_template,$(proj)))) - -# -# Documentation Rules -# -%.dox: %.c - @echo " [DOXY] $@" - @mkdir -p $(dir $@) - @echo "/*!\page example_$(@F:.dox=) $(@F:.dox=)" > $@ - @echo " \includelineno $(<F)" >> $@ - @echo "*/" >> $@ - -samples.dox: examples.mk - @echo " [DOXY] $@" - @echo "/*!\page samples Sample Code" > $@ - @echo " This SDK includes a number of sample applications."\ - "Each sample documents a feature of the SDK in both prose"\ - "and the associated C code."\ - "The following samples are included: ">>$@ - @$(foreach ex,$(sort $(notdir $(EXAMPLES:.c=))),\ - echo " - \subpage example_$(ex) $($(ex).DESCRIPTION)" >> $@;) - @echo >> $@ - @echo " In addition, the SDK contains a number of utilities."\ - "Since these utilities are built upon the concepts described"\ - "in the sample code listed above, they are not documented in"\ - "pieces like the samples are. Their source is included here"\ - "for reference. The following utilities are included:" >> $@ - @$(foreach ex,$(sort $(UTILS:.c=)),\ - echo " - \subpage example_$(ex) $($(ex).DESCRIPTION)" >> $@;) - @echo "*/" >> $@ - -CLEAN-OBJS += examples.doxy samples.dox $(ALL_EXAMPLES:.c=.dox) -DOCS-yes += examples.doxy samples.dox -examples.doxy: samples.dox $(ALL_EXAMPLES:.c=.dox) - @echo "INPUT += $^" > $@ diff --git a/examples/analyzer.cc b/examples/analyzer.cc index ae08019644..1c50325954 100644 --- a/examples/analyzer.cc +++ b/examples/analyzer.cc @@ -701,8 +701,8 @@ bool Analyzer::OnCmdLineParsed(wxCmdLineParser &parser) { // NOLINT bool bit_accounting = parser.Found(_("a")); if (bit_accounting && !CONFIG_ACCOUNTING) { fprintf(stderr, - "Bit accounting support not found. " - "Recompile with:\n./configure --enable-accounting\n"); + "Bit accounting support not found. " + "Recompile with:\n./cmake -DCONFIG_ACCOUNTING=1\n"); return false; } frame = new AnalyzerFrame(parser.Found(_("a"))); diff --git a/libs.mk b/libs.mk deleted file mode 100644 index 840f250013..0000000000 --- a/libs.mk +++ /dev/null @@ -1,582 +0,0 @@ -## -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - - -# ARM assembly files are written in RVCT-style. We use some make magic to -# filter those files to allow GCC compilation -ifeq ($(ARCH_ARM),yes) - ASM:=$(if $(filter yes,$(CONFIG_GCC)$(CONFIG_MSVS)),.asm.s,.asm) -else - ASM:=.asm -endif - -# -# Rule to generate runtime cpu detection files -# -define rtcd_h_template -$$(BUILD_PFX)$(1).h: $$(SRC_PATH_BARE)/$(2) - @echo " [CREATE] $$@" - $$(qexec)$$(SRC_PATH_BARE)/build/make/rtcd.pl --arch=$$(TGT_ISA) \ - --sym=$(1) \ - --config=$$(CONFIG_DIR)$$(target)-$$(TOOLCHAIN).mk \ - $$(RTCD_OPTIONS) $$^ > $$@ -CLEAN-OBJS += $$(BUILD_PFX)$(1).h -RTCD += $$(BUILD_PFX)$(1).h -endef - -CODEC_SRCS-yes += CHANGELOG -CODEC_SRCS-yes += libs.mk - -include $(SRC_PATH_BARE)/aom/aom_codec.mk -CODEC_SRCS-yes += $(addprefix aom/,$(call enabled,API_SRCS)) -CODEC_DOC_SRCS += $(addprefix aom/,$(call enabled,API_DOC_SRCS)) - -include $(SRC_PATH_BARE)/aom_mem/aom_mem.mk -CODEC_SRCS-yes += $(addprefix aom_mem/,$(call enabled,MEM_SRCS)) - -include $(SRC_PATH_BARE)/aom_scale/aom_scale.mk -CODEC_SRCS-yes += $(addprefix aom_scale/,$(call enabled,SCALE_SRCS)) - -include $(SRC_PATH_BARE)/aom_ports/aom_ports.mk -CODEC_SRCS-yes += $(addprefix aom_ports/,$(call enabled,PORTS_SRCS)) - -include $(SRC_PATH_BARE)/aom_dsp/aom_dsp.mk -CODEC_SRCS-yes += $(addprefix aom_dsp/,$(call enabled,DSP_SRCS)) - -include $(SRC_PATH_BARE)/aom_util/aom_util.mk -CODEC_SRCS-yes += $(addprefix aom_util/,$(call enabled,UTIL_SRCS)) - -# AV1 make file -ifeq ($(CONFIG_AV1),yes) - AV1_PREFIX=av1/ - include $(SRC_PATH_BARE)/$(AV1_PREFIX)av1_common.mk -endif - -ifeq ($(CONFIG_AV1_ENCODER),yes) - AV1_PREFIX=av1/ - include $(SRC_PATH_BARE)/$(AV1_PREFIX)av1_cx.mk - CODEC_SRCS-yes += $(addprefix $(AV1_PREFIX),$(call enabled,AV1_CX_SRCS)) - CODEC_EXPORTS-yes += $(addprefix $(AV1_PREFIX),$(AV1_CX_EXPORTS)) - CODEC_SRCS-yes += $(AV1_PREFIX)av1_cx.mk aom/aom.h aom/aomcx.h - INSTALL-LIBS-yes += include/aom/aom.h include/aom/aomcx.h - INSTALL_MAPS += include/aom/% $(SRC_PATH_BARE)/$(AV1_PREFIX)/% - CODEC_DOC_SRCS += aom/aom.h aom/aomcx.h - CODEC_DOC_SECTIONS += av1 av1_encoder encoder -endif - -ifeq ($(CONFIG_AV1_DECODER),yes) - AV1_PREFIX=av1/ - include $(SRC_PATH_BARE)/$(AV1_PREFIX)av1_dx.mk - CODEC_SRCS-yes += $(addprefix $(AV1_PREFIX),$(call enabled,AV1_DX_SRCS)) - CODEC_EXPORTS-yes += $(addprefix $(AV1_PREFIX),$(AV1_DX_EXPORTS)) - CODEC_SRCS-yes += $(AV1_PREFIX)av1_dx.mk aom/aom.h aom/aomdx.h - INSTALL-LIBS-yes += include/aom/aom.h include/aom/aomdx.h - INSTALL_MAPS += include/aom/% $(SRC_PATH_BARE)/$(AV1_PREFIX)/% - CODEC_DOC_SRCS += aom/aom.h aom/aomdx.h - CODEC_DOC_SECTIONS += av1 av1_decoder decoder -endif - -AV1_PREFIX=av1/ -$(BUILD_PFX)$(AV1_PREFIX)%.c.o: CFLAGS += -Wextra - -ifeq ($(CONFIG_MSVS),yes) -CODEC_LIB=$(if $(CONFIG_STATIC_MSVCRT),aommt,aommd) -GTEST_LIB=$(if $(CONFIG_STATIC_MSVCRT),gtestmt,gtestmd) -# This variable uses deferred expansion intentionally, since the results of -# $(wildcard) may change during the course of the Make. -VS_PLATFORMS = $(foreach d,$(wildcard */Release/$(CODEC_LIB).lib),$(word 1,$(subst /, ,$(d)))) -endif - -# The following pairs define a mapping of locations in the distribution -# tree to locations in the source/build trees. -INSTALL_MAPS += include/aom/% $(SRC_PATH_BARE)/aom/% -INSTALL_MAPS += include/aom/% $(SRC_PATH_BARE)/aom_ports/% -INSTALL_MAPS += $(LIBSUBDIR)/% % -INSTALL_MAPS += src/% $(SRC_PATH_BARE)/% -ifeq ($(CONFIG_MSVS),yes) -INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/% $(p)/Release/%) -INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/% $(p)/Debug/%) -endif - -CODEC_SRCS-yes += build/make/version.sh -CODEC_SRCS-yes += build/make/rtcd.pl -CODEC_SRCS-yes += aom_ports/emmintrin_compat.h -CODEC_SRCS-yes += aom_ports/mem_ops.h -CODEC_SRCS-yes += aom_ports/mem_ops_aligned.h -CODEC_SRCS-yes += aom_ports/aom_once.h -CODEC_SRCS-yes += $(BUILD_PFX)aom_config.c -INSTALL-SRCS-no += $(BUILD_PFX)aom_config.c -ifeq ($(ARCH_X86)$(ARCH_X86_64),yes) -INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += third_party/x86inc/x86inc.asm -endif -CODEC_EXPORTS-yes += aom/exports_com -CODEC_EXPORTS-$(CONFIG_AV1_ENCODER) += aom/exports_enc -CODEC_EXPORTS-$(CONFIG_AV1_DECODER) += aom/exports_dec - -INSTALL-LIBS-yes += include/aom/aom_codec.h -INSTALL-LIBS-yes += include/aom/aom_frame_buffer.h -INSTALL-LIBS-yes += include/aom/aom_image.h -INSTALL-LIBS-yes += include/aom/aom_integer.h -INSTALL-LIBS-$(CONFIG_AV1_DECODER) += include/aom/aom_decoder.h -INSTALL-LIBS-$(CONFIG_AV1_ENCODER) += include/aom/aom_encoder.h -ifeq ($(CONFIG_EXTERNAL_BUILD),yes) -ifeq ($(CONFIG_MSVS),yes) -INSTALL-LIBS-yes += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/$(CODEC_LIB).lib) -INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/$(CODEC_LIB)d.lib) -INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/aom.dll) -INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/aom.exp) -endif -else -INSTALL-LIBS-$(CONFIG_STATIC) += $(LIBSUBDIR)/libaom.a -INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(LIBSUBDIR)/libaom_g.a -endif - -CODEC_SRCS=$(call enabled,CODEC_SRCS) -INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(CODEC_SRCS) -INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(call enabled,CODEC_EXPORTS) - - -# Generate a list of all enabled sources, in particular for exporting to gyp -# based build systems. -libaom_srcs.txt: - @echo " [CREATE] $@" - @echo $(CODEC_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@ -CLEAN-OBJS += libaom_srcs.txt - -# Assembly files that are included, but don't define symbols themselves. -# Filtered out to avoid Visual Studio build warnings. -ASM_INCLUDES := \ - third_party/x86inc/x86inc.asm \ - aom_config.asm \ - aom_ports/x86_abi_support.asm \ - -ifeq ($(CONFIG_EXTERNAL_BUILD),yes) -ifeq ($(CONFIG_MSVS),yes) - -aom.def: $(call enabled,CODEC_EXPORTS) - @echo " [CREATE] $@" - $(qexec)$(SRC_PATH_BARE)/build/make/gen_msvs_def.sh\ - --name=aom\ - --out=$@ $^ -CLEAN-OBJS += aom.def - -aom.$(VCPROJ_SFX): $(CODEC_SRCS) aom.def - @echo " [CREATE] $@" - $(qexec)$(GEN_VCPROJ) \ - $(if $(CONFIG_SHARED),--dll,--lib) \ - --target=$(TOOLCHAIN) \ - $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ - --name=aom \ - --proj-guid=DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74 \ - --module-def=aom.def \ - --ver=$(CONFIG_VS_VERSION) \ - --src-path-bare="$(SRC_PATH_BARE)" \ - --out=$@ $(CFLAGS) \ - $(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) \ - --src-path-bare="$(SRC_PATH_BARE)" \ - -PROJECTS-yes += aom.$(VCPROJ_SFX) - -aom.$(VCPROJ_SFX): aom_config.asm -aom.$(VCPROJ_SFX): $(RTCD) - -endif -else -LIBAOM_OBJS=$(call objs, $(filter-out $(ASM_INCLUDES), $(CODEC_SRCS))) -OBJS-yes += $(LIBAOM_OBJS) -LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libaom.a $(BUILD_PFX)libaom_g.a -$(BUILD_PFX)libaom_g.a: $(LIBAOM_OBJS) - -SO_VERSION_MAJOR := 0 -SO_VERSION_MINOR := 0 -SO_VERSION_PATCH := 0 -ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS)) -LIBAOM_SO := libaom.$(SO_VERSION_MAJOR).dylib -SHARED_LIB_SUF := .dylib -EXPORT_FILE := libaom.syms -LIBAOM_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ - libaom.dylib ) -else -ifeq ($(filter iphonesimulator%,$(TGT_OS)),$(TGT_OS)) -LIBAOM_SO := libaom.$(SO_VERSION_MAJOR).dylib -SHARED_LIB_SUF := .dylib -EXPORT_FILE := libaom.syms -LIBAOM_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, libaom.dylib) -else -ifeq ($(filter os2%,$(TGT_OS)),$(TGT_OS)) -LIBAOM_SO := libaom$(SO_VERSION_MAJOR).dll -SHARED_LIB_SUF := _dll.a -EXPORT_FILE := libaom.def -LIBAOM_SO_SYMLINKS := -LIBAOM_SO_IMPLIB := libaom_dll.a -else -LIBAOM_SO := libaom.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH) -SHARED_LIB_SUF := .so -EXPORT_FILE := libaom.ver -LIBAOM_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ - libaom.so libaom.so.$(SO_VERSION_MAJOR) \ - libaom.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR)) -endif -endif -endif - -LIBS-$(CONFIG_SHARED) += $(BUILD_PFX)$(LIBAOM_SO)\ - $(notdir $(LIBAOM_SO_SYMLINKS)) \ - $(if $(LIBAOM_SO_IMPLIB), $(BUILD_PFX)$(LIBAOM_SO_IMPLIB)) -$(BUILD_PFX)$(LIBAOM_SO): $(LIBAOM_OBJS) $(EXPORT_FILE) -$(BUILD_PFX)$(LIBAOM_SO): extralibs += -lm -$(BUILD_PFX)$(LIBAOM_SO): SONAME = libaom.so.$(SO_VERSION_MAJOR) -$(BUILD_PFX)$(LIBAOM_SO): EXPORTS_FILE = $(EXPORT_FILE) - -libaom.ver: $(call enabled,CODEC_EXPORTS) - @echo " [CREATE] $@" - $(qexec)echo "{ global:" > $@ - $(qexec)for f in $?; do awk '{print $$2";"}' < $$f >>$@; done - $(qexec)echo "local: *; };" >> $@ -CLEAN-OBJS += libaom.ver - -libaom.syms: $(call enabled,CODEC_EXPORTS) - @echo " [CREATE] $@" - $(qexec)awk '{print "_"$$2}' $^ >$@ -CLEAN-OBJS += libaom.syms - -libaom.def: $(call enabled,CODEC_EXPORTS) - @echo " [CREATE] $@" - $(qexec)echo LIBRARY $(LIBAOM_SO:.dll=) INITINSTANCE TERMINSTANCE > $@ - $(qexec)echo "DATA MULTIPLE NONSHARED" >> $@ - $(qexec)echo "EXPORTS" >> $@ - $(qexec)awk '{print "_"$$2}' $^ >>$@ -CLEAN-OBJS += libaom.def - -libaom_dll.a: $(LIBAOM_SO) - @echo " [IMPLIB] $@" - $(qexec)emximp -o $@ $< -CLEAN-OBJS += libaom_dll.a - -define libaom_symlink_template -$(1): $(2) - @echo " [LN] $(2) $$@" - $(qexec)mkdir -p $$(dir $$@) - $(qexec)ln -sf $(2) $$@ -endef - -$(eval $(call libaom_symlink_template,\ - $(addprefix $(BUILD_PFX),$(notdir $(LIBAOM_SO_SYMLINKS))),\ - $(BUILD_PFX)$(LIBAOM_SO))) -$(eval $(call libaom_symlink_template,\ - $(addprefix $(DIST_DIR)/,$(LIBAOM_SO_SYMLINKS)),\ - $(LIBAOM_SO))) - - -INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBAOM_SO_SYMLINKS) -INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBAOM_SO) -INSTALL-LIBS-$(CONFIG_SHARED) += $(if $(LIBAOM_SO_IMPLIB),$(LIBSUBDIR)/$(LIBAOM_SO_IMPLIB)) - - -LIBS-yes += aom.pc -aom.pc: config.mk libs.mk - @echo " [CREATE] $@" - $(qexec)echo '# pkg-config file from libaom $(VERSION_STRING)' > $@ - $(qexec)echo 'prefix=$(PREFIX)' >> $@ - $(qexec)echo 'exec_prefix=$${prefix}' >> $@ - $(qexec)echo 'libdir=$${prefix}/$(LIBSUBDIR)' >> $@ - $(qexec)echo 'includedir=$${prefix}/include' >> $@ - $(qexec)echo '' >> $@ - $(qexec)echo 'Name: aom' >> $@ - $(qexec)echo 'Description: WebM Project AVx codec implementation' >> $@ - $(qexec)echo 'Version: $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)' >> $@ - $(qexec)echo 'Requires:' >> $@ - $(qexec)echo 'Conflicts:' >> $@ - $(qexec)echo 'Libs: -L$${libdir} -laom -lm' >> $@ -ifeq ($(HAVE_PTHREAD_H),yes) - $(qexec)echo 'Libs.private: -lm -lpthread' >> $@ -else - $(qexec)echo 'Libs.private: -lm' >> $@ -endif - $(qexec)echo 'Cflags: -I$${includedir}' >> $@ -INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/aom.pc -INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc -CLEAN-OBJS += aom.pc -endif - -# -# Rule to make assembler configuration file from C configuration file -# -ifeq ($(ARCH_X86)$(ARCH_X86_64),yes) -# YASM -$(BUILD_PFX)aom_config.asm: $(BUILD_PFX)aom_config.h - @echo " [CREATE] $@" - @egrep "#define [A-Z0-9_]+ [01]" $< \ - | awk '{print $$2 " equ " $$3}' > $@ -else -ADS2GAS=$(if $(filter yes,$(CONFIG_GCC)),| $(ASM_CONVERSION)) -$(BUILD_PFX)aom_config.asm: $(BUILD_PFX)aom_config.h - @echo " [CREATE] $@" - @egrep "#define [A-Z0-9_]+ [01]" $< \ - | awk '{print $$2 " EQU " $$3}' $(ADS2GAS) > $@ - @echo " END" $(ADS2GAS) >> $@ -CLEAN-OBJS += $(BUILD_PFX)aom_config.asm -endif - -# -# Add assembler dependencies for configuration. -# -$(filter %.s.o,$(OBJS-yes)): $(BUILD_PFX)aom_config.asm -$(filter %$(ASM).o,$(OBJS-yes)): $(BUILD_PFX)aom_config.asm - - -$(shell $(SRC_PATH_BARE)/build/make/version.sh "$(SRC_PATH_BARE)" $(BUILD_PFX)aom_version.h) -CLEAN-OBJS += $(BUILD_PFX)aom_version.h - -# -# Add include path for libwebm sources. -# -ifeq ($(CONFIG_WEBM_IO),yes) - CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/libwebm -endif - -## -## libaom test directives -## -ifeq ($(CONFIG_UNIT_TESTS),yes) -LIBAOM_TEST_DATA_PATH ?= . - -include $(SRC_PATH_BARE)/test/test.mk -LIBAOM_TEST_SRCS=$(addprefix test/,$(call enabled,LIBAOM_TEST_SRCS)) -LIBAOM_TEST_BIN=./test_libaom$(EXE_SFX) -LIBAOM_TEST_DATA=$(addprefix $(LIBAOM_TEST_DATA_PATH)/,\ - $(call enabled,LIBAOM_TEST_DATA)) -libaom_test_data_url=https://storage.googleapis.com/downloads.webmproject.org/test_data/libvpx/$(1) - -TEST_INTRA_PRED_SPEED_BIN=./test_intra_pred_speed$(EXE_SFX) -TEST_INTRA_PRED_SPEED_SRCS=$(addprefix test/,$(call enabled,TEST_INTRA_PRED_SPEED_SRCS)) -TEST_INTRA_PRED_SPEED_OBJS := $(sort $(call objs,$(TEST_INTRA_PRED_SPEED_SRCS))) - -libaom_test_srcs.txt: - @echo " [CREATE] $@" - @echo $(LIBAOM_TEST_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@ -CLEAN-OBJS += libaom_test_srcs.txt - -$(LIBAOM_TEST_DATA): $(SRC_PATH_BARE)/test/test-data.sha1 - @echo " [DOWNLOAD] $@" - $(qexec)trap 'rm -f $@' INT TERM &&\ - curl -L -o $@ $(call libaom_test_data_url,$(@F)) - -testdata:: $(LIBAOM_TEST_DATA) - $(qexec)[ -x "$$(which sha1sum)" ] && sha1sum=sha1sum;\ - [ -x "$$(which shasum)" ] && sha1sum=shasum;\ - [ -x "$$(which sha1)" ] && sha1sum=sha1;\ - if [ -n "$${sha1sum}" ]; then\ - set -e;\ - echo "Checking test data:";\ - for f in $(call enabled,LIBAOM_TEST_DATA); do\ - grep $$f $(SRC_PATH_BARE)/test/test-data.sha1 |\ - (cd $(LIBAOM_TEST_DATA_PATH); $${sha1sum} -c);\ - done; \ - else\ - echo "Skipping test data integrity check, sha1sum not found.";\ - fi - -ifeq ($(CONFIG_EXTERNAL_BUILD),yes) -ifeq ($(CONFIG_MSVS),yes) -gtest.$(VCPROJ_SFX): $(SRC_PATH_BARE)/third_party/googletest/src/googletest/src/gtest-all.cc - @echo " [CREATE] $@" - $(qexec)$(GEN_VCPROJ) \ - --lib \ - --target=$(TOOLCHAIN) \ - $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ - --name=gtest \ - --proj-guid=EC00E1EC-AF68-4D92-A255-181690D1C9B1 \ - --ver=$(CONFIG_VS_VERSION) \ - --src-path-bare="$(SRC_PATH_BARE)" \ - -D_VARIADIC_MAX=10 \ - --out=gtest.$(VCPROJ_SFX) \ - $(SRC_PATH_BARE)/third_party/googletest/src/googletest/src/gtest-all.cc \ - -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/googletest/include" \ - -I"$(SRC_PATH_BARE)/third_party/googletest/src/googletest" - -PROJECTS-$(CONFIG_MSVS) += gtest.$(VCPROJ_SFX) - -test_libaom.$(VCPROJ_SFX): $(LIBAOM_TEST_SRCS) aom.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX) - @echo " [CREATE] $@" - $(qexec)$(GEN_VCPROJ) \ - --exe \ - --target=$(TOOLCHAIN) \ - --name=test_libaom \ - -D_VARIADIC_MAX=10 \ - --proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \ - --ver=$(CONFIG_VS_VERSION) \ - --src-path-bare="$(SRC_PATH_BARE)" \ - $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ - --out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \ - -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/googletest/include" \ - $(if $(CONFIG_WEBM_IO),-I"$(SRC_PATH_BARE)/third_party/libwebm") \ - -L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^ - -PROJECTS-$(CONFIG_MSVS) += test_libaom.$(VCPROJ_SFX) - -LIBAOM_TEST_BIN := $(addprefix $(TGT_OS:win64=x64)/Release/,$(notdir $(LIBAOM_TEST_BIN))) - -ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),) -PROJECTS-$(CONFIG_MSVS) += test_intra_pred_speed.$(VCPROJ_SFX) -test_intra_pred_speed.$(VCPROJ_SFX): $(TEST_INTRA_PRED_SPEED_SRCS) aom.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX) - @echo " [CREATE] $@" - $(qexec)$(GEN_VCPROJ) \ - --exe \ - --target=$(TOOLCHAIN) \ - --name=test_intra_pred_speed \ - -D_VARIADIC_MAX=10 \ - --proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \ - --ver=$(CONFIG_VS_VERSION) \ - --src-path-bare="$(SRC_PATH_BARE)" \ - $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ - --out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \ - -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/googletest/include" \ - -L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^ -endif # TEST_INTRA_PRED_SPEED -endif -else - -include $(SRC_PATH_BARE)/third_party/googletest/gtest.mk -GTEST_SRCS := $(addprefix third_party/,$(call enabled,GTEST_SRCS)) -GTEST_OBJS=$(call objs,$(GTEST_SRCS)) -ifeq ($(filter win%,$(TGT_OS)),$(TGT_OS)) -# Disabling pthreads globally will cause issues on darwin and possibly elsewhere -$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -DGTEST_HAS_PTHREAD=0 -endif -GTEST_INCLUDES := -I$(SRC_PATH_BARE)/third_party/googletest/src/googletest -GTEST_INCLUDES += -I$(SRC_PATH_BARE)/third_party/googletest/src/googletest/include -$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES) -OBJS-yes += $(GTEST_OBJS) -LIBS-yes += $(BUILD_PFX)libgtest.a $(BUILD_PFX)libgtest_g.a -$(BUILD_PFX)libgtest_g.a: $(GTEST_OBJS) - -LIBAOM_TEST_OBJS=$(sort $(call objs,$(LIBAOM_TEST_SRCS))) -$(LIBAOM_TEST_OBJS) $(LIBAOM_TEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES) -OBJS-yes += $(LIBAOM_TEST_OBJS) -BINS-yes += $(LIBAOM_TEST_BIN) - -CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),aom_g,aom) -CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a) -TEST_LIBS := lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a -$(LIBAOM_TEST_BIN): $(TEST_LIBS) -$(eval $(call linkerxx_template,$(LIBAOM_TEST_BIN), \ - $(LIBAOM_TEST_OBJS) \ - -L. -laom -lgtest $(extralibs) -lm)) - -ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),) -$(TEST_INTRA_PRED_SPEED_OBJS) $(TEST_INTRA_PRED_SPEED_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES) -OBJS-yes += $(TEST_INTRA_PRED_SPEED_OBJS) -BINS-yes += $(TEST_INTRA_PRED_SPEED_BIN) - -$(TEST_INTRA_PRED_SPEED_BIN): $(TEST_LIBS) -$(eval $(call linkerxx_template,$(TEST_INTRA_PRED_SPEED_BIN), \ - $(TEST_INTRA_PRED_SPEED_OBJS) \ - -L. -laom -lgtest $(extralibs) -lm)) -endif # TEST_INTRA_PRED_SPEED - -endif # CONFIG_UNIT_TESTS - -# Install test sources only if codec source is included -INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(patsubst $(SRC_PATH_BARE)/%,%,\ - $(shell find $(SRC_PATH_BARE)/third_party/googletest -type f)) -INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(LIBAOM_TEST_SRCS) -INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(TEST_INTRA_PRED_SPEED_SRCS) - -define test_shard_template -test:: test_shard.$(1) -test-no-data-check:: test_shard_ndc.$(1) -test_shard.$(1) test_shard_ndc.$(1): $(LIBAOM_TEST_BIN) - @set -e; \ - export GTEST_SHARD_INDEX=$(1); \ - export GTEST_TOTAL_SHARDS=$(2); \ - $(LIBAOM_TEST_BIN) -test_shard.$(1): testdata -.PHONY: test_shard.$(1) -endef - -NUM_SHARDS := 10 -SHARDS := 0 1 2 3 4 5 6 7 8 9 -$(foreach s,$(SHARDS),$(eval $(call test_shard_template,$(s),$(NUM_SHARDS)))) - -endif - -## -## documentation directives -## -CLEAN-OBJS += libs.doxy -DOCS-yes += libs.doxy -libs.doxy: $(CODEC_DOC_SRCS) - @echo " [CREATE] $@" - @rm -f $@ - @echo "INPUT += $^" >> $@ - @echo "INCLUDE_PATH += ." >> $@; - @echo "ENABLED_SECTIONS += $(sort $(CODEC_DOC_SECTIONS))" >> $@ - -## Generate rtcd.h for all objects -ifeq ($(CONFIG_DEPENDENCY_TRACKING),yes) -$(OBJS-yes:.o=.d): $(RTCD) -else -$(OBJS-yes): $(RTCD) -endif - -## Update the global src list -SRCS += $(CODEC_SRCS) $(LIBAOM_TEST_SRCS) $(GTEST_SRCS) - -## -## aomdec/aomenc tests. -## -ifeq ($(CONFIG_UNIT_TESTS),yes) -TEST_BIN_PATH = . -ifeq ($(CONFIG_MSVS),yes) -# MSVC will build both Debug and Release configurations of tools in a -# sub directory named for the current target. Assume the user wants to -# run the Release tools, and assign TEST_BIN_PATH accordingly. -# TODO(tomfinegan): Is this adequate for ARM? -# TODO(tomfinegan): Support running the debug versions of tools? -TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH)) -endif -utiltest utiltest-no-data-check: - $(qexec)$(SRC_PATH_BARE)/test/aomdec.sh \ - --test-data-path $(LIBAOM_TEST_DATA_PATH) \ - --bin-path $(TEST_BIN_PATH) - $(qexec)$(SRC_PATH_BARE)/test/aomenc.sh \ - --test-data-path $(LIBAOM_TEST_DATA_PATH) \ - --bin-path $(TEST_BIN_PATH) -utiltest: testdata -else -utiltest utiltest-no-data-check: - @echo Unit tests must be enabled to make the utiltest target. -endif - -## -## Example tests. -## -ifeq ($(CONFIG_UNIT_TESTS),yes) -# All non-MSVC targets output example targets in a sub dir named examples. -EXAMPLES_BIN_PATH = examples -ifeq ($(CONFIG_MSVS),yes) -# MSVC will build both Debug and Release configurations of the examples in a -# sub directory named for the current target. Assume the user wants to -# run the Release tools, and assign EXAMPLES_BIN_PATH accordingly. -# TODO(tomfinegan): Is this adequate for ARM? -# TODO(tomfinegan): Support running the debug versions of tools? -EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release -endif -exampletest exampletest-no-data-check: examples - $(qexec)$(SRC_PATH_BARE)/test/examples.sh \ - --test-data-path $(LIBAOM_TEST_DATA_PATH) \ - --bin-path $(EXAMPLES_BIN_PATH) -exampletest: testdata -else -exampletest exampletest-no-data-check: - @echo Unit tests must be enabled to make the exampletest target. -endif diff --git a/mainpage.dox b/mainpage.dox index 9a82f43603..03a299ae1a 100644 --- a/mainpage.dox +++ b/mainpage.dox @@ -22,7 +22,7 @@ \section main_startpoints Starting Points - Consult the \ref changelog for a complete list of improvements in this release. - - The \ref readme contains instructions on recompiling the sample applications. + - \ref readme contains instructions on compiling the sample applications. - Read the \ref usage "usage" for a narrative on codec usage. - Read the \ref samples "sample code" for examples of how to interact with the codec. @@ -45,8 +45,8 @@ \verbinclude CHANGELOG */ -/*!\page readme README - \verbinclude README +/*!\page readme README.md + \include README.md */ /*!\defgroup codecs Supported Codecs */ diff --git a/solution.mk b/solution.mk deleted file mode 100644 index caa8bc17bf..0000000000 --- a/solution.mk +++ /dev/null @@ -1,33 +0,0 @@ -## -## Copyright (c) 2016, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - - -# libaom reverse dependencies (targets that depend on libaom) -AOM_NONDEPS=$(addsuffix .$(VCPROJ_SFX),aom gtest) -AOM_RDEPS=$(foreach vcp,\ - $(filter-out $(AOM_NONDEPS),$^), --dep=$(vcp:.$(VCPROJ_SFX)=):aom) - -aom.sln: $(wildcard *.$(VCPROJ_SFX)) - @echo " [CREATE] $@" - $(SRC_PATH_BARE)/build/make/gen_msvs_sln.sh \ - $(if $(filter aom.$(VCPROJ_SFX),$^),$(AOM_RDEPS)) \ - --dep=test_libaom:gtest \ - --ver=$(CONFIG_VS_VERSION)\ - --out=$@ $^ -aom.sln.mk: aom.sln - @true - -PROJECTS-yes += aom.sln aom.sln.mk --include aom.sln.mk - -# Always install this file, as it is an unconditional post-build rule. -INSTALL_MAPS += src/% $(SRC_PATH_BARE)/% -INSTALL-SRCS-yes += $(target).mk diff --git a/test/android/Android.mk b/test/android/Android.mk deleted file mode 100644 index 74f9d7cbaf..0000000000 --- a/test/android/Android.mk +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (c) 2016, Alliance for Open Media. All rights reserved -# -# This source code is subject to the terms of the BSD 2 Clause License and -# the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -# was not distributed with this source code in the LICENSE file, you can -# obtain it at www.aomedia.org/license/software. If the Alliance for Open -# Media Patent License 1.0 was not distributed with this source code in the -# PATENTS file, you can obtain it at www.aomedia.org/license/patent. -# -# This make file builds aom_test app for android. -# The test app itself runs on the command line through adb shell -# The paths are really messed up as the libaom make file -# expects to be made from a parent directory. -CUR_WD := $(call my-dir) -BINDINGS_DIR := $(CUR_WD)/../../.. -LOCAL_PATH := $(CUR_WD)/../../.. - -#libwebm -include $(CLEAR_VARS) -include $(BINDINGS_DIR)/libaom/third_party/libwebm/Android.mk -LOCAL_PATH := $(CUR_WD)/../../.. - -#libaom -include $(CLEAR_VARS) -LOCAL_STATIC_LIBRARIES := libwebm -include $(BINDINGS_DIR)/libaom/build/make/Android.mk -LOCAL_PATH := $(CUR_WD)/../.. - -#libgtest -include $(CLEAR_VARS) -LOCAL_ARM_MODE := arm -LOCAL_CPP_EXTENSION := .cc -LOCAL_MODULE := gtest -LOCAL_C_INCLUDES := $(LOCAL_PATH)/third_party/googletest/src/googletest/src -LOCAL_C_INCLUDES += $(LOCAL_PATH)/third_party/googletest/src/googletest/include -LOCAL_SRC_FILES := ./third_party/googletest/src/googletest/src/gtest-all.cc -include $(BUILD_STATIC_LIBRARY) - -#libaom_test -include $(CLEAR_VARS) -LOCAL_ARM_MODE := arm -LOCAL_MODULE := libaom_test -LOCAL_STATIC_LIBRARIES := gtest libwebm - -ifeq ($(ENABLE_SHARED),1) - LOCAL_SHARED_LIBRARIES := aom -else - LOCAL_STATIC_LIBRARIES += aom -endif - -include $(LOCAL_PATH)/test/test.mk -LOCAL_C_INCLUDES := $(BINDINGS_DIR) -FILTERED_SRC := $(sort $(filter %.cc %.c, $(LIBAOM_TEST_SRCS-yes))) -LOCAL_SRC_FILES := $(addprefix ./test/, $(FILTERED_SRC)) -# some test files depend on *_rtcd.h, ensure they're generated first. -$(eval $(call rtcd_dep_template)) -include $(BUILD_EXECUTABLE) diff --git a/test/test-data.mk b/test/test-data.mk deleted file mode 100644 index 316d93e231..0000000000 --- a/test/test-data.mk +++ /dev/null @@ -1,46 +0,0 @@ -LIBAOM_TEST_SRCS-yes += test-data.mk - -# Encoder test source -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += hantro_collage_w352h288.yuv -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += hantro_odd.yuv - -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += park_joy_90p_10_420.y4m -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += park_joy_90p_10_422.y4m -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += park_joy_90p_10_444.y4m -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += park_joy_90p_12_420.y4m -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += park_joy_90p_12_422.y4m -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += park_joy_90p_12_444.y4m -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += park_joy_90p_8_420_a10-1.y4m -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += park_joy_90p_8_420.y4m -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += park_joy_90p_8_422.y4m -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += park_joy_90p_8_444.y4m - -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += desktop_credits.y4m -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += niklas_1280_720_30.y4m -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += rush_hour_444.y4m -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += screendata.y4m -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += niklas_640_480_30.yuv - -ifeq ($(CONFIG_DECODE_PERF_TESTS),yes) -# Encode / Decode test -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += niklas_1280_720_30.yuv -endif # CONFIG_DECODE_PERF_TESTS - -ifeq ($(CONFIG_ENCODE_PERF_TESTS),yes) -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += desktop_640_360_30.yuv -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += kirland_640_480_30.yuv -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += macmarcomoving_640_480_30.yuv -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += macmarcostationary_640_480_30.yuv -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += niklas_1280_720_30.yuv -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += tacomanarrows_640_480_30.yuv -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += tacomasmallcameramovement_640_480_30.yuv -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += thaloundeskmtg_640_480_30.yuv -endif # CONFIG_ENCODE_PERF_TESTS - -ifeq ($(CONFIG_EXT_TILE),yes) -LIBAOM_TEST_DATA-$(CONFIG_AV1_ENCODER) += vase10x10.yuv -endif # CONFIG_EXT_TILE - -# sort and remove duplicates -LIBAOM_TEST_DATA-yes := $(sort $(LIBAOM_TEST_DATA-yes)) - diff --git a/test/test.mk b/test/test.mk deleted file mode 100644 index f2998cdc78..0000000000 --- a/test/test.mk +++ /dev/null @@ -1,243 +0,0 @@ -## -## Copyright (c) 2017, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - -LIBAOM_TEST_SRCS-yes += acm_random.h -LIBAOM_TEST_SRCS-yes += aom_integer_test.cc -LIBAOM_TEST_SRCS-yes += clear_system_state.h -LIBAOM_TEST_SRCS-yes += codec_factory.h -LIBAOM_TEST_SRCS-yes += md5_helper.h -LIBAOM_TEST_SRCS-yes += register_state_check.h -LIBAOM_TEST_SRCS-yes += test.mk -LIBAOM_TEST_SRCS-yes += test_libaom.cc -LIBAOM_TEST_SRCS-yes += util.h -LIBAOM_TEST_SRCS-yes += video_source.h -LIBAOM_TEST_SRCS-yes += transform_test_base.h -LIBAOM_TEST_SRCS-yes += function_equivalence_test.h - -## -## BLACK BOX TESTS -## -## Black box tests only use the public API. -## -LIBAOM_TEST_SRCS-yes += ../md5_utils.h ../md5_utils.c -LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += ivf_video_source.h -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += ../y4minput.h ../y4minput.c -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += altref_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += aq_segment_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += datarate_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += encode_api_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += error_resilience_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += i420_video_source.h -#LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += realtime_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += resize_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += y4m_video_source.h -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += yuv_video_source.h - -#LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += level_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += active_map_refresh_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += active_map_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += borders_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += cpu_speed_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += frame_size_tests.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += lossless_test.cc - -LIBAOM_TEST_SRCS-yes += decode_test_driver.cc -LIBAOM_TEST_SRCS-yes += decode_test_driver.h -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += encode_test_driver.cc -LIBAOM_TEST_SRCS-yes += encode_test_driver.h - -## IVF writing. -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += ../ivfenc.c ../ivfenc.h - -## Y4m parsing. -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += y4m_test.cc ../y4menc.c ../y4menc.h - -## WebM Parsing -ifeq ($(CONFIG_WEBM_IO), yes) -LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser/mkvparser.cc -LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser/mkvreader.cc -LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser/mkvparser.h -LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser/mkvreader.h -LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += $(LIBWEBM_PARSER_SRCS) -LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += ../tools_common.h -LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += ../webmdec.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += ../webmdec.h -LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += webm_video_source.h -endif - -LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += decode_api_test.cc - -# Currently we only support decoder perf tests for av1. Also they read from WebM -# files, so WebM IO is required. -ifeq ($(CONFIG_DECODE_PERF_TESTS)$(CONFIG_AV1_DECODER)$(CONFIG_WEBM_IO), \ - yesyesyes) -LIBAOM_TEST_SRCS-yes += decode_perf_test.cc -endif - -ifeq ($(CONFIG_ENCODE_PERF_TESTS)$(CONFIG_AV1_ENCODER), yesyes) -LIBAOM_TEST_SRCS-yes += encode_perf_test.cc -endif - -## Multi-codec / unconditional black box tests. -ifeq ($(findstring yes,$(CONFIG_AV1_ENCODER)),yes) -LIBAOM_TEST_SRCS-yes += active_map_refresh_test.cc -LIBAOM_TEST_SRCS-yes += active_map_test.cc -LIBAOM_TEST_SRCS-yes += end_to_end_test.cc -endif - -## -## WHITE BOX TESTS -## -## Whitebox tests invoke functions not exposed via the public API. Certain -## shared library builds don't make these functions accessible. -## -ifeq ($(CONFIG_SHARED),) - -## AV1 -ifeq ($(CONFIG_AV1),yes) - -# These tests require both the encoder and decoder to be built. -ifeq ($(CONFIG_AV1_ENCODER)$(CONFIG_AV1_DECODER),yesyes) -# IDCT test currently depends on FDCT function -LIBAOM_TEST_SRCS-yes += coding_path_sync.cc -LIBAOM_TEST_SRCS-yes += idct8x8_test.cc -LIBAOM_TEST_SRCS-yes += partial_idct_test.cc -LIBAOM_TEST_SRCS-yes += superframe_test.cc -LIBAOM_TEST_SRCS-yes += tile_independence_test.cc -LIBAOM_TEST_SRCS-yes += ethread_test.cc -LIBAOM_TEST_SRCS-yes += motion_vector_test.cc -LIBAOM_TEST_SRCS-yes += binary_codes_test.cc -ifeq ($(CONFIG_EXT_TILE),yes) -LIBAOM_TEST_SRCS-yes += av1_ext_tile_test.cc -endif -LIBAOM_TEST_SRCS-yes += boolcoder_test.cc -ifeq ($(CONFIG_ACCOUNTING),yes) -LIBAOM_TEST_SRCS-yes += accounting_test.cc -endif -LIBAOM_TEST_SRCS-yes += divu_small_test.cc -LIBAOM_TEST_SRCS-yes += ec_test.cc -#LIBAOM_TEST_SRCS-yes += encoder_parms_get_to_decoder.cc -endif -ifeq ($(CONFIG_CFL),yes) - LIBAOM_TEST_SRCS-yes += cfl_test.cc -endif - -LIBAOM_TEST_SRCS-yes += convolve_test.cc -LIBAOM_TEST_SRCS-yes += lpf_test.cc -LIBAOM_TEST_SRCS-yes += cdef_test.cc -LIBAOM_TEST_SRCS-yes += simd_cmp_impl.h -LIBAOM_TEST_SRCS-$(HAVE_SSE2) += simd_cmp_sse2.cc -LIBAOM_TEST_SRCS-$(HAVE_SSSE3) += simd_cmp_ssse3.cc -LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += simd_cmp_sse4.cc -LIBAOM_TEST_SRCS-$(HAVE_AVX2) += simd_cmp_avx2.cc -LIBAOM_TEST_SRCS-$(HAVE_NEON) += simd_cmp_neon.cc -LIBAOM_TEST_SRCS-yes += simd_impl.h -LIBAOM_TEST_SRCS-$(HAVE_SSE2) += simd_sse2_test.cc -LIBAOM_TEST_SRCS-$(HAVE_SSSE3) += simd_ssse3_test.cc -LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += simd_sse4_test.cc -LIBAOM_TEST_SRCS-$(HAVE_AVX2) += simd_avx2_test.cc -LIBAOM_TEST_SRCS-$(HAVE_NEON) += simd_neon_test.cc -LIBAOM_TEST_SRCS-yes += intrapred_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_LV_MAP) += txb_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_INTRABC) += intrabc_test.cc -#LIBAOM_TEST_SRCS-$(CONFIG_AV1_DECODER) += av1_thread_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += dct16x16_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += dct32x32_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += fdct4x4_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += fdct8x8_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += hadamard_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += minmax_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += variance_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += error_block_test.cc -#LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_quantize_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += subtract_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += arf_freq_test.cc -ifneq ($(CONFIG_NEW_QUANT), yes) -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += quantize_func_test.cc -endif -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += block_error_test.cc - -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_inv_txfm_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_dct_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht4x4_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht8x8_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht16x16_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht32x32_test.cc -ifeq ($(CONFIG_TX64X64),yes) -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht64x64_test.cc -endif -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht4x8_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht8x4_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht8x16_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht16x8_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht16x32_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fht32x16_test.cc - -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += sum_squares_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += subtract_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += blend_a64_mask_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += blend_a64_mask_1d_test.cc - -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += masked_variance_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += masked_sad_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_wedge_utils_test.cc - -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += obmc_sad_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += obmc_variance_test.cc - -ifeq ($(CONFIG_AV1_ENCODER),yes) -LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += av1_quantize_test.cc -LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += av1_highbd_iht_test.cc -endif -endif # AV1 - -## Multi-codec / unconditional whitebox tests. - -ifeq ($(CONFIG_AV1_ENCODER),yes) -LIBAOM_TEST_SRCS-yes += avg_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_LV_MAP) += encodetxb_test.cc -endif -ifeq ($(CONFIG_INTERNAL_STATS),yes) -LIBAOM_TEST_SRCS-yes += hbd_metrics_test.cc -endif -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += sad_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_txfm_test.h -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_txfm_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fwd_txfm1d_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_inv_txfm1d_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fwd_txfm2d_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_inv_txfm2d_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1) += av1_convolve_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1) += av1_convolve_optimz_test.cc -LIBAOM_TEST_SRCS-$(HAVE_SSE2) += warp_filter_test_util.h -LIBAOM_TEST_SRCS-$(HAVE_SSE2) += warp_filter_test.cc warp_filter_test_util.cc -ifeq ($(CONFIG_LOOP_RESTORATION),yes) -LIBAOM_TEST_SRCS-$(HAVE_SSE2) += hiprec_convolve_test_util.h -LIBAOM_TEST_SRCS-$(HAVE_SSE2) += hiprec_convolve_test.cc -LIBAOM_TEST_SRCS-$(HAVE_SSE2) += hiprec_convolve_test_util.cc -LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += selfguided_filter_test.cc -endif -LIBAOM_TEST_SRCS-$(HAVE_SSE2) += av1_convolve_2d_test_util.h -LIBAOM_TEST_SRCS-$(HAVE_SSE2) += av1_convolve_2d_test.cc -LIBAOM_TEST_SRCS-$(HAVE_SSE2) += av1_convolve_2d_test_util.cc -LIBAOM_TEST_SRCS-yes += convolve_round_test.cc -LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += av1_convolve_scale_test.cc - -ifeq ($(CONFIG_AV1_ENCODER),yes) -LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += corner_match_test.cc -endif - -TEST_INTRA_PRED_SPEED_SRCS-yes := test_intra_pred_speed.cc -TEST_INTRA_PRED_SPEED_SRCS-yes += ../md5_utils.h ../md5_utils.c - -endif # CONFIG_SHARED - -include $(SRC_PATH_BARE)/test/test-data.mk diff --git a/tools.mk b/tools.mk deleted file mode 100644 index 26c20d433a..0000000000 --- a/tools.mk +++ /dev/null @@ -1,126 +0,0 @@ -## -## Copyright (c) 2017, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - -# List of tools to build. -ifeq ($(CONFIG_ENTROPY_STATS), yes) -TOOLS-$(CONFIG_AV1_ENCODER) += aom_entropy_optimizer.c -aom_entropy_optimizer.GUID = 3afa9b05-940b-4d68-b5aa-55157d8ed7b4 -aom_entropy_optimizer.DESCRIPTION = Offline default probability optimizer -endif - -# -# End of specified files. The rest of the build rules should happen -# automagically from here. -# - -# Tools need different flags based on whether we're building -# from an installed tree or a version controlled tree. Determine -# the proper paths. -ifeq ($(HAVE_ALT_TREE_LAYOUT),yes) - LIB_PATH-yes := $(SRC_PATH_BARE)/../lib - INC_PATH-yes := $(SRC_PATH_BARE)/../include -else - LIB_PATH-yes += $(if $(BUILD_PFX),$(BUILD_PFX),.) - INC_PATH-$(CONFIG_AV1_DECODER) += $(SRC_PATH_BARE)/av1 - INC_PATH-$(CONFIG_AV1_ENCODER) += $(SRC_PATH_BARE)/av1 -endif -INC_PATH-$(CONFIG_LIBYUV) += $(SRC_PATH_BARE)/third_party/libyuv/include -LIB_PATH := $(call enabled,LIB_PATH) -INC_PATH := $(call enabled,INC_PATH) -INTERNAL_CFLAGS = $(addprefix -I,$(INC_PATH)) -INTERNAL_LDFLAGS += $(addprefix -L,$(LIB_PATH)) - -# Expand list of selected tools to build (as specified above) -TOOLS = $(addprefix tools/,$(call enabled,TOOLS)) -ALL_SRCS = $(foreach ex,$(TOOLS),$($(notdir $(ex:.c=)).SRCS)) -CFLAGS += -I../include -CODEC_EXTRA_LIBS=$(sort $(call enabled,CODEC_EXTRA_LIBS)) - -ifneq ($(CONFIG_CODEC_SRCS), yes) - CFLAGS += -I../include/vpx -endif - -# Expand all tools sources into a variable containing all sources -# for that tools (not just them main one specified in TOOLS) -# and add this file to the list (for MSVS workspace generation) -$(foreach ex,$(TOOLS),$(eval $(notdir $(ex:.c=)).SRCS += $(ex) tools.mk)) - - -# Create build/install dependencies for all tools. The common case -# is handled here. The MSVS case is handled below. -NOT_MSVS = $(if $(CONFIG_MSVS),,yes) -DIST-BINS-$(NOT_MSVS) += $(addprefix bin/,$(TOOLS:.c=$(EXE_SFX))) -DIST-SRCS-yes += $(ALL_SRCS) -OBJS-$(NOT_MSVS) += $(call objs,$(ALL_SRCS)) -BINS-$(NOT_MSVS) += $(addprefix $(BUILD_PFX),$(TOOLS:.c=$(EXE_SFX))) - -# Instantiate linker template for all tools. -ifeq ($(CONFIG_OS_SUPPORT), yes) -CODEC_EXTRA_LIBS-$(CONFIG_AV1) += m -else - ifeq ($(CONFIG_GCC), yes) - CODEC_EXTRA_LIBS-$(CONFIG_AV1) += m - endif -endif - -CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),aom_g,aom) -ifneq ($(filter darwin%,$(TGT_OS)),) -SHARED_LIB_SUF=.dylib -else -ifneq ($(filter os2%,$(TGT_OS)),) -SHARED_LIB_SUF=_dll.a -else -SHARED_LIB_SUF=.so -endif -endif -CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a) -$(foreach bin,$(BINS-yes),\ - $(eval $(bin):$(LIB_PATH)/lib$(CODEC_LIB)$(CODEC_LIB_SUF))\ - $(eval $(call linker_template,$(bin),\ - $(call objs,$($(notdir $(bin:$(EXE_SFX)=)).SRCS)) \ - -l$(CODEC_LIB) $(addprefix -l,$(CODEC_EXTRA_LIBS))\ - ))) - -# The following pairs define a mapping of locations in the distribution -# tree to locations in the source/build trees. -INSTALL_MAPS += src/%.c %.c -INSTALL_MAPS += src/% $(SRC_PATH_BARE)/% -INSTALL_MAPS += bin/% % -INSTALL_MAPS += % % - - -# Build Visual Studio Projects. We use a template here to instantiate -# explicit rules rather than using an implicit rule because we want to -# leverage make's VPATH searching rather than specifying the paths on -# each file in TOOLS. This has the unfortunate side effect that -# touching the source files trigger a rebuild of the project files -# even though there is no real dependency there (the dependency is on -# the makefiles). We may want to revisit this. -define vcproj_template -$(1): $($(1:.$(VCPROJ_SFX)=).SRCS) vpx.$(VCPROJ_SFX) - $(if $(quiet),@echo " [vcproj] $$@") - $(qexec)$$(GEN_VCPROJ)\ - --exe\ - --target=$$(TOOLCHAIN)\ - --name=$$(@:.$(VCPROJ_SFX)=)\ - --ver=$$(CONFIG_VS_VERSION)\ - --proj-guid=$$($$(@:.$(VCPROJ_SFX)=).GUID)\ - --src-path-bare="$(SRC_PATH_BARE)" \ - $$(if $$(CONFIG_STATIC_MSVCRT),--static-crt) \ - --out=$$@ $$(INTERNAL_CFLAGS) $$(CFLAGS) \ - $$(INTERNAL_LDFLAGS) $$(LDFLAGS) $$^ -endef -TOOLS_BASENAME := $(notdir $(TOOLS)) -PROJECTS-$(CONFIG_MSVS) += $(TOOLS_BASENAME:.c=.$(VCPROJ_SFX)) -INSTALL-BINS-$(CONFIG_MSVS) += $(foreach p,$(VS_PLATFORMS),\ - $(addprefix bin/$(p)/,$(TOOLS_BASENAME:.c=.exe))) -$(foreach proj,$(call enabled,PROJECTS),\ - $(eval $(call vcproj_template,$(proj)))) diff --git a/tools/build_inspector.sh b/tools/build_inspector.sh deleted file mode 100755 index 3bd3cfc723..0000000000 --- a/tools/build_inspector.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -## -## Copyright (c) 2017, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## - -if ! [ -x "$(command -v emcc)" ] \ - || ! [ -x "$(command -v emconfigure)" ] \ - || ! [ -x "$(command -v emmake)" ]; then - cat << EOF >& 2 -Emscripten SDK is not available (emcc, emconfigure or emmake is missing). -Install it from -https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html -and try again. -EOF - exit 1 -fi - -echo 'Building JS Inspector' -if [ ! -d ".inspect" ]; then - mkdir .inspect - cd .inspect && emconfigure ../../configure \ - --disable-multithread \ - --disable-runtime-cpu-detect \ - --target=generic-gnu \ - --enable-accounting \ - --disable-docs \ - --disable-unit-tests \ - --enable-inspection \ - --extra-cflags="-D_POSIX_SOURCE" - cd .. -fi - -cd .inspect -emmake make -j 8 -cp examples/inspect inspect.bc -emcc -O3 inspect.bc -o inspect.js \ - -s TOTAL_MEMORY=134217728 \ - -s MODULARIZE=1 \ - -s EXPORT_NAME="'DecoderModule'" \ - --post-js "../inspect-post.js" \ - --memory-init-file 0 -cp inspect.js ../inspect.js -- GitLab