John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 1 | ## |
Yaowu Xu | 9c01aa1 | 2016-09-01 14:32:49 -0700 | [diff] [blame] | 2 | ## Copyright (c) 2016, Alliance for Open Media. All rights reserved |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 3 | ## |
Yaowu Xu | 9c01aa1 | 2016-09-01 14:32:49 -0700 | [diff] [blame] | 4 | ## This source code is subject to the terms of the BSD 2 Clause License and |
| 5 | ## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License |
| 6 | ## was not distributed with this source code in the LICENSE file, you can |
| 7 | ## obtain it at www.aomedia.org/license/software. If the Alliance for Open |
| 8 | ## Media Patent License 1.0 was not distributed with this source code in the |
| 9 | ## PATENTS file, you can obtain it at www.aomedia.org/license/patent. |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 10 | ## |
| 11 | |
| 12 | |
Johann | 128d2c2 | 2011-03-02 09:44:39 -0500 | [diff] [blame] | 13 | # ARM assembly files are written in RVCT-style. We use some make magic to |
| 14 | # filter those files to allow GCC compilation |
| 15 | ifeq ($(ARCH_ARM),yes) |
Martin Storsjo | ad484fc | 2013-05-18 23:32:49 +0300 | [diff] [blame] | 16 | ASM:=$(if $(filter yes,$(CONFIG_GCC)$(CONFIG_MSVS)),.asm.s,.asm) |
Johann | 128d2c2 | 2011-03-02 09:44:39 -0500 | [diff] [blame] | 17 | else |
| 18 | ASM:=.asm |
| 19 | endif |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 20 | |
John Koleszar | 7b8dfcb | 2012-11-06 16:59:01 -0800 | [diff] [blame] | 21 | # |
John Koleszar | a9c7597 | 2012-11-08 17:09:30 -0800 | [diff] [blame] | 22 | # Rule to generate runtime cpu detection files |
| 23 | # |
| 24 | define rtcd_h_template |
| 25 | $$(BUILD_PFX)$(1).h: $$(SRC_PATH_BARE)/$(2) |
| 26 | @echo " [CREATE] $$@" |
James Zern | 805078a | 2014-02-23 16:33:14 -0800 | [diff] [blame] | 27 | $$(qexec)$$(SRC_PATH_BARE)/build/make/rtcd.pl --arch=$$(TGT_ISA) \ |
John Koleszar | a9c7597 | 2012-11-08 17:09:30 -0800 | [diff] [blame] | 28 | --sym=$(1) \ |
Tom Finegan | 3d7063d | 2015-05-12 15:33:40 -0700 | [diff] [blame] | 29 | --config=$$(CONFIG_DIR)$$(target)-$$(TOOLCHAIN).mk \ |
John Koleszar | a9c7597 | 2012-11-08 17:09:30 -0800 | [diff] [blame] | 30 | $$(RTCD_OPTIONS) $$^ > $$@ |
| 31 | CLEAN-OBJS += $$(BUILD_PFX)$(1).h |
| 32 | RTCD += $$(BUILD_PFX)$(1).h |
| 33 | endef |
John Koleszar | 7b8dfcb | 2012-11-06 16:59:01 -0800 | [diff] [blame] | 34 | |
Johann | 5d88a82 | 2012-03-05 16:36:23 -0800 | [diff] [blame] | 35 | CODEC_SRCS-yes += CHANGELOG |
John Koleszar | 4d86ef3 | 2010-06-22 08:44:48 -0400 | [diff] [blame] | 36 | CODEC_SRCS-yes += libs.mk |
| 37 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 38 | include $(SRC_PATH_BARE)/aom/aom_codec.mk |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 39 | CODEC_SRCS-yes += $(addprefix aom/,$(call enabled,API_SRCS)) |
| 40 | CODEC_DOC_SRCS += $(addprefix aom/,$(call enabled,API_DOC_SRCS)) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 41 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 42 | include $(SRC_PATH_BARE)/aom_mem/aom_mem.mk |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 43 | CODEC_SRCS-yes += $(addprefix aom_mem/,$(call enabled,MEM_SRCS)) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 44 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 45 | include $(SRC_PATH_BARE)/aom_scale/aom_scale.mk |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 46 | CODEC_SRCS-yes += $(addprefix aom_scale/,$(call enabled,SCALE_SRCS)) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 47 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 48 | include $(SRC_PATH_BARE)/aom_ports/aom_ports.mk |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 49 | CODEC_SRCS-yes += $(addprefix aom_ports/,$(call enabled,PORTS_SRCS)) |
Johann | a5ffcdd | 2012-11-15 16:28:20 -0800 | [diff] [blame] | 50 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 51 | include $(SRC_PATH_BARE)/aom_dsp/aom_dsp.mk |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 52 | CODEC_SRCS-yes += $(addprefix aom_dsp/,$(call enabled,DSP_SRCS)) |
Johann | d5d9289 | 2015-04-17 16:11:38 -0400 | [diff] [blame] | 53 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 54 | include $(SRC_PATH_BARE)/aom_util/aom_util.mk |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 55 | CODEC_SRCS-yes += $(addprefix aom_util/,$(call enabled,UTIL_SRCS)) |
Jingning Han | 3a3b0be | 2015-07-01 14:58:13 -0700 | [diff] [blame] | 56 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 57 | # AV1 make file |
| 58 | ifeq ($(CONFIG_AV1),yes) |
| 59 | AV1_PREFIX=av1/ |
| 60 | include $(SRC_PATH_BARE)/$(AV1_PREFIX)av1_common.mk |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 61 | endif |
| 62 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 63 | ifeq ($(CONFIG_AV1_ENCODER),yes) |
| 64 | AV1_PREFIX=av1/ |
Yaowu Xu | 3b95d59 | 2016-09-01 11:05:32 -0700 | [diff] [blame] | 65 | include $(SRC_PATH_BARE)/$(AV1_PREFIX)av1_cx.mk |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 66 | CODEC_SRCS-yes += $(addprefix $(AV1_PREFIX),$(call enabled,AV1_CX_SRCS)) |
| 67 | CODEC_EXPORTS-yes += $(addprefix $(AV1_PREFIX),$(AV1_CX_EXPORTS)) |
Yaowu Xu | 3b95d59 | 2016-09-01 11:05:32 -0700 | [diff] [blame] | 68 | CODEC_SRCS-yes += $(AV1_PREFIX)av1_cx.mk aom/aom.h aom/aomcx.h |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 69 | INSTALL-LIBS-yes += include/aom/aom.h include/aom/aomcx.h |
| 70 | INSTALL_MAPS += include/aom/% $(SRC_PATH_BARE)/$(AV1_PREFIX)/% |
| 71 | CODEC_DOC_SRCS += aom/aom.h aom/aomcx.h |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 72 | CODEC_DOC_SECTIONS += av1 av1_encoder encoder |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 73 | endif |
| 74 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 75 | ifeq ($(CONFIG_AV1_DECODER),yes) |
| 76 | AV1_PREFIX=av1/ |
Yaowu Xu | 3b95d59 | 2016-09-01 11:05:32 -0700 | [diff] [blame] | 77 | include $(SRC_PATH_BARE)/$(AV1_PREFIX)av1_dx.mk |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 78 | CODEC_SRCS-yes += $(addprefix $(AV1_PREFIX),$(call enabled,AV1_DX_SRCS)) |
| 79 | CODEC_EXPORTS-yes += $(addprefix $(AV1_PREFIX),$(AV1_DX_EXPORTS)) |
Yaowu Xu | 3b95d59 | 2016-09-01 11:05:32 -0700 | [diff] [blame] | 80 | CODEC_SRCS-yes += $(AV1_PREFIX)av1_dx.mk aom/aom.h aom/aomdx.h |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 81 | INSTALL-LIBS-yes += include/aom/aom.h include/aom/aomdx.h |
| 82 | INSTALL_MAPS += include/aom/% $(SRC_PATH_BARE)/$(AV1_PREFIX)/% |
| 83 | CODEC_DOC_SRCS += aom/aom.h aom/aomdx.h |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 84 | CODEC_DOC_SECTIONS += av1 av1_decoder decoder |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 85 | endif |
| 86 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 87 | AV1_PREFIX=av1/ |
| 88 | $(BUILD_PFX)$(AV1_PREFIX)%.c.o: CFLAGS += -Wextra |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 89 | |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 90 | ifeq ($(CONFIG_MSVS),yes) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 91 | CODEC_LIB=$(if $(CONFIG_STATIC_MSVCRT),aommt,aommd) |
James Berry | 0cc044f | 2012-05-02 18:09:54 -0400 | [diff] [blame] | 92 | GTEST_LIB=$(if $(CONFIG_STATIC_MSVCRT),gtestmt,gtestmd) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 93 | # This variable uses deferred expansion intentionally, since the results of |
| 94 | # $(wildcard) may change during the course of the Make. |
| 95 | VS_PLATFORMS = $(foreach d,$(wildcard */Release/$(CODEC_LIB).lib),$(word 1,$(subst /, ,$(d)))) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 96 | endif |
| 97 | |
| 98 | # The following pairs define a mapping of locations in the distribution |
| 99 | # tree to locations in the source/build trees. |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 100 | INSTALL_MAPS += include/aom/% $(SRC_PATH_BARE)/aom/% |
| 101 | INSTALL_MAPS += include/aom/% $(SRC_PATH_BARE)/aom_ports/% |
John Koleszar | 670af3a | 2010-05-26 15:57:42 -0400 | [diff] [blame] | 102 | INSTALL_MAPS += $(LIBSUBDIR)/% % |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 103 | INSTALL_MAPS += src/% $(SRC_PATH_BARE)/% |
| 104 | ifeq ($(CONFIG_MSVS),yes) |
John Koleszar | 670af3a | 2010-05-26 15:57:42 -0400 | [diff] [blame] | 105 | INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/% $(p)/Release/%) |
| 106 | INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/% $(p)/Debug/%) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 107 | endif |
| 108 | |
Tom Finegan | d104b16 | 2015-05-14 10:46:44 -0700 | [diff] [blame] | 109 | CODEC_SRCS-yes += build/make/version.sh |
| 110 | CODEC_SRCS-yes += build/make/rtcd.pl |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 111 | CODEC_SRCS-yes += aom_ports/emmintrin_compat.h |
| 112 | CODEC_SRCS-yes += aom_ports/mem_ops.h |
| 113 | CODEC_SRCS-yes += aom_ports/mem_ops_aligned.h |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 114 | CODEC_SRCS-yes += aom_ports/aom_once.h |
| 115 | CODEC_SRCS-yes += $(BUILD_PFX)aom_config.c |
| 116 | INSTALL-SRCS-no += $(BUILD_PFX)aom_config.c |
John Koleszar | 2396302 | 2013-01-16 16:44:33 -0800 | [diff] [blame] | 117 | ifeq ($(ARCH_X86)$(ARCH_X86_64),yes) |
James Zern | e707e95 | 2014-06-27 16:40:39 -0700 | [diff] [blame] | 118 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += third_party/x86inc/x86inc.asm |
John Koleszar | 2396302 | 2013-01-16 16:44:33 -0800 | [diff] [blame] | 119 | endif |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 120 | CODEC_EXPORTS-yes += aom/exports_com |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 121 | CODEC_EXPORTS-$(CONFIG_AV1_ENCODER) += aom/exports_enc |
| 122 | CODEC_EXPORTS-$(CONFIG_AV1_DECODER) += aom/exports_dec |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 123 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 124 | INSTALL-LIBS-yes += include/aom/aom_codec.h |
| 125 | INSTALL-LIBS-yes += include/aom/aom_frame_buffer.h |
| 126 | INSTALL-LIBS-yes += include/aom/aom_image.h |
| 127 | INSTALL-LIBS-yes += include/aom/aom_integer.h |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 128 | INSTALL-LIBS-$(CONFIG_AV1_DECODER) += include/aom/aom_decoder.h |
| 129 | INSTALL-LIBS-$(CONFIG_AV1_ENCODER) += include/aom/aom_encoder.h |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 130 | ifeq ($(CONFIG_EXTERNAL_BUILD),yes) |
| 131 | ifeq ($(CONFIG_MSVS),yes) |
John Koleszar | 670af3a | 2010-05-26 15:57:42 -0400 | [diff] [blame] | 132 | INSTALL-LIBS-yes += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/$(CODEC_LIB).lib) |
| 133 | INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/$(CODEC_LIB)d.lib) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 134 | INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/aom.dll) |
| 135 | INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/aom.exp) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 136 | endif |
| 137 | else |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 138 | INSTALL-LIBS-$(CONFIG_STATIC) += $(LIBSUBDIR)/libaom.a |
| 139 | INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(LIBSUBDIR)/libaom_g.a |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 140 | endif |
| 141 | |
John Koleszar | 5ebe94f | 2012-12-23 07:20:10 -0800 | [diff] [blame] | 142 | CODEC_SRCS=$(call enabled,CODEC_SRCS) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 143 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(CODEC_SRCS) |
| 144 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(call enabled,CODEC_EXPORTS) |
| 145 | |
John Koleszar | 5e562c7 | 2011-08-12 14:59:10 -0400 | [diff] [blame] | 146 | |
| 147 | # Generate a list of all enabled sources, in particular for exporting to gyp |
| 148 | # based build systems. |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 149 | libaom_srcs.txt: |
John Koleszar | 5e562c7 | 2011-08-12 14:59:10 -0400 | [diff] [blame] | 150 | @echo " [CREATE] $@" |
James Zern | 0f96f02 | 2015-02-26 20:48:40 -0800 | [diff] [blame] | 151 | @echo $(CODEC_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 152 | CLEAN-OBJS += libaom_srcs.txt |
John Koleszar | 5e562c7 | 2011-08-12 14:59:10 -0400 | [diff] [blame] | 153 | |
| 154 | |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 155 | ifeq ($(CONFIG_EXTERNAL_BUILD),yes) |
| 156 | ifeq ($(CONFIG_MSVS),yes) |
| 157 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 158 | aom.def: $(call enabled,CODEC_EXPORTS) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 159 | @echo " [CREATE] $@" |
James Zern | e8d58d3 | 2012-08-15 11:47:13 -0700 | [diff] [blame] | 160 | $(qexec)$(SRC_PATH_BARE)/build/make/gen_msvs_def.sh\ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 161 | --name=aom\ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 162 | --out=$@ $^ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 163 | CLEAN-OBJS += aom.def |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 164 | |
James Zern | b92f7bc | 2014-03-04 19:46:29 -0800 | [diff] [blame] | 165 | # Assembly files that are included, but don't define symbols themselves. |
| 166 | # Filtered out to avoid Visual Studio build warnings. |
| 167 | ASM_INCLUDES := \ |
| 168 | third_party/x86inc/x86inc.asm \ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 169 | aom_config.asm \ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 170 | aom_ports/x86_abi_support.asm \ |
James Zern | b92f7bc | 2014-03-04 19:46:29 -0800 | [diff] [blame] | 171 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 172 | aom.$(VCPROJ_SFX): $(CODEC_SRCS) aom.def |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 173 | @echo " [CREATE] $@" |
Martin Storsjo | 0b4637e | 2013-05-17 00:56:46 +0300 | [diff] [blame] | 174 | $(qexec)$(GEN_VCPROJ) \ |
Jim Bankoski | 1b16e74 | 2012-07-23 12:32:59 -0700 | [diff] [blame] | 175 | $(if $(CONFIG_SHARED),--dll,--lib) \ |
| 176 | --target=$(TOOLCHAIN) \ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 177 | $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 178 | --name=aom \ |
Johann | 128d2c2 | 2011-03-02 09:44:39 -0500 | [diff] [blame] | 179 | --proj-guid=DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74 \ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 180 | --module-def=aom.def \ |
Johann | 128d2c2 | 2011-03-02 09:44:39 -0500 | [diff] [blame] | 181 | --ver=$(CONFIG_VS_VERSION) \ |
James Zern | f66590c | 2014-06-02 16:42:14 -0700 | [diff] [blame] | 182 | --src-path-bare="$(SRC_PATH_BARE)" \ |
James Zern | b92f7bc | 2014-03-04 19:46:29 -0800 | [diff] [blame] | 183 | --out=$@ $(CFLAGS) \ |
| 184 | $(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) \ |
Johann | 128d2c2 | 2011-03-02 09:44:39 -0500 | [diff] [blame] | 185 | --src-path-bare="$(SRC_PATH_BARE)" \ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 186 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 187 | PROJECTS-yes += aom.$(VCPROJ_SFX) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 188 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 189 | aom.$(VCPROJ_SFX): aom_config.asm |
| 190 | aom.$(VCPROJ_SFX): $(RTCD) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 191 | |
| 192 | endif |
| 193 | else |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 194 | LIBAOM_OBJS=$(call objs,$(CODEC_SRCS)) |
| 195 | OBJS-yes += $(LIBAOM_OBJS) |
| 196 | LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libaom.a $(BUILD_PFX)libaom_g.a |
| 197 | $(BUILD_PFX)libaom_g.a: $(LIBAOM_OBJS) |
John Koleszar | 7aa97a3 | 2010-06-03 10:29:04 -0400 | [diff] [blame] | 198 | |
Tom Finegan | 4a3a9c0 | 2017-07-14 08:34:20 -0700 | [diff] [blame] | 199 | SO_VERSION_MAJOR := 0 |
Johann | bb5a39c | 2015-03-23 15:33:17 -0700 | [diff] [blame] | 200 | SO_VERSION_MINOR := 0 |
| 201 | SO_VERSION_PATCH := 0 |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 202 | ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS)) |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 203 | LIBAOM_SO := libaom.$(SO_VERSION_MAJOR).dylib |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 204 | SHARED_LIB_SUF := .dylib |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 205 | EXPORT_FILE := libaom.syms |
| 206 | LIBAOM_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ |
| 207 | libaom.dylib ) |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 208 | else |
Brion Vibber | 992e4b7 | 2016-05-02 12:41:59 -0400 | [diff] [blame] | 209 | ifeq ($(filter iphonesimulator%,$(TGT_OS)),$(TGT_OS)) |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 210 | LIBAOM_SO := libaom.$(SO_VERSION_MAJOR).dylib |
Brion Vibber | 992e4b7 | 2016-05-02 12:41:59 -0400 | [diff] [blame] | 211 | SHARED_LIB_SUF := .dylib |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 212 | EXPORT_FILE := libaom.syms |
| 213 | LIBAOM_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, libaom.dylib) |
Brion Vibber | 992e4b7 | 2016-05-02 12:41:59 -0400 | [diff] [blame] | 214 | else |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 215 | ifeq ($(filter os2%,$(TGT_OS)),$(TGT_OS)) |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 216 | LIBAOM_SO := libaom$(SO_VERSION_MAJOR).dll |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 217 | SHARED_LIB_SUF := _dll.a |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 218 | EXPORT_FILE := libaom.def |
| 219 | LIBAOM_SO_SYMLINKS := |
| 220 | LIBAOM_SO_IMPLIB := libaom_dll.a |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 221 | else |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 222 | LIBAOM_SO := libaom.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH) |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 223 | SHARED_LIB_SUF := .so |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 224 | EXPORT_FILE := libaom.ver |
| 225 | LIBAOM_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ |
| 226 | libaom.so libaom.so.$(SO_VERSION_MAJOR) \ |
| 227 | libaom.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR)) |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 228 | endif |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 229 | endif |
Brion Vibber | 992e4b7 | 2016-05-02 12:41:59 -0400 | [diff] [blame] | 230 | endif |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 231 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 232 | LIBS-$(CONFIG_SHARED) += $(BUILD_PFX)$(LIBAOM_SO)\ |
| 233 | $(notdir $(LIBAOM_SO_SYMLINKS)) \ |
| 234 | $(if $(LIBAOM_SO_IMPLIB), $(BUILD_PFX)$(LIBAOM_SO_IMPLIB)) |
| 235 | $(BUILD_PFX)$(LIBAOM_SO): $(LIBAOM_OBJS) $(EXPORT_FILE) |
| 236 | $(BUILD_PFX)$(LIBAOM_SO): extralibs += -lm |
| 237 | $(BUILD_PFX)$(LIBAOM_SO): SONAME = libaom.so.$(SO_VERSION_MAJOR) |
| 238 | $(BUILD_PFX)$(LIBAOM_SO): EXPORTS_FILE = $(EXPORT_FILE) |
John Koleszar | 7aa97a3 | 2010-06-03 10:29:04 -0400 | [diff] [blame] | 239 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 240 | libaom.ver: $(call enabled,CODEC_EXPORTS) |
John Koleszar | 7aa97a3 | 2010-06-03 10:29:04 -0400 | [diff] [blame] | 241 | @echo " [CREATE] $@" |
| 242 | $(qexec)echo "{ global:" > $@ |
| 243 | $(qexec)for f in $?; do awk '{print $$2";"}' < $$f >>$@; done |
| 244 | $(qexec)echo "local: *; };" >> $@ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 245 | CLEAN-OBJS += libaom.ver |
John Koleszar | 7aa97a3 | 2010-06-03 10:29:04 -0400 | [diff] [blame] | 246 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 247 | libaom.syms: $(call enabled,CODEC_EXPORTS) |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 248 | @echo " [CREATE] $@" |
| 249 | $(qexec)awk '{print "_"$$2}' $^ >$@ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 250 | CLEAN-OBJS += libaom.syms |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 251 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 252 | libaom.def: $(call enabled,CODEC_EXPORTS) |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 253 | @echo " [CREATE] $@" |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 254 | $(qexec)echo LIBRARY $(LIBAOM_SO:.dll=) INITINSTANCE TERMINSTANCE > $@ |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 255 | $(qexec)echo "DATA MULTIPLE NONSHARED" >> $@ |
| 256 | $(qexec)echo "EXPORTS" >> $@ |
James Zern | cc73e1f | 2016-08-08 15:09:30 -0700 | [diff] [blame] | 257 | $(qexec)awk '{print "_"$$2}' $^ >>$@ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 258 | CLEAN-OBJS += libaom.def |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 259 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 260 | libaom_dll.a: $(LIBAOM_SO) |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 261 | @echo " [IMPLIB] $@" |
| 262 | $(qexec)emximp -o $@ $< |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 263 | CLEAN-OBJS += libaom_dll.a |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 264 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 265 | define libaom_symlink_template |
James Zern | 495b241 | 2011-07-25 15:40:36 -0700 | [diff] [blame] | 266 | $(1): $(2) |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 267 | @echo " [LN] $(2) $$@" |
John Koleszar | 5ebe94f | 2012-12-23 07:20:10 -0800 | [diff] [blame] | 268 | $(qexec)mkdir -p $$(dir $$@) |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 269 | $(qexec)ln -sf $(2) $$@ |
James Zern | 495b241 | 2011-07-25 15:40:36 -0700 | [diff] [blame] | 270 | endef |
| 271 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 272 | $(eval $(call libaom_symlink_template,\ |
| 273 | $(addprefix $(BUILD_PFX),$(notdir $(LIBAOM_SO_SYMLINKS))),\ |
| 274 | $(BUILD_PFX)$(LIBAOM_SO))) |
| 275 | $(eval $(call libaom_symlink_template,\ |
| 276 | $(addprefix $(DIST_DIR)/,$(LIBAOM_SO_SYMLINKS)),\ |
| 277 | $(LIBAOM_SO))) |
John Koleszar | 7aa97a3 | 2010-06-03 10:29:04 -0400 | [diff] [blame] | 278 | |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 279 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 280 | INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBAOM_SO_SYMLINKS) |
| 281 | INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBAOM_SO) |
| 282 | INSTALL-LIBS-$(CONFIG_SHARED) += $(if $(LIBAOM_SO_IMPLIB),$(LIBSUBDIR)/$(LIBAOM_SO_IMPLIB)) |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 283 | |
Ralph Giles | 607f842 | 2011-03-28 12:04:51 -0700 | [diff] [blame] | 284 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 285 | LIBS-yes += aom.pc |
| 286 | aom.pc: config.mk libs.mk |
Ralph Giles | 607f842 | 2011-03-28 12:04:51 -0700 | [diff] [blame] | 287 | @echo " [CREATE] $@" |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 288 | $(qexec)echo '# pkg-config file from libaom $(VERSION_STRING)' > $@ |
Ralph Giles | 607f842 | 2011-03-28 12:04:51 -0700 | [diff] [blame] | 289 | $(qexec)echo 'prefix=$(PREFIX)' >> $@ |
| 290 | $(qexec)echo 'exec_prefix=$${prefix}' >> $@ |
Takanori MATSUURA | a7eea3e | 2012-04-20 15:11:46 -0700 | [diff] [blame] | 291 | $(qexec)echo 'libdir=$${prefix}/$(LIBSUBDIR)' >> $@ |
Ralph Giles | 607f842 | 2011-03-28 12:04:51 -0700 | [diff] [blame] | 292 | $(qexec)echo 'includedir=$${prefix}/include' >> $@ |
| 293 | $(qexec)echo '' >> $@ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 294 | $(qexec)echo 'Name: aom' >> $@ |
| 295 | $(qexec)echo 'Description: WebM Project AVx codec implementation' >> $@ |
Ralph Giles | 607f842 | 2011-03-28 12:04:51 -0700 | [diff] [blame] | 296 | $(qexec)echo 'Version: $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)' >> $@ |
| 297 | $(qexec)echo 'Requires:' >> $@ |
| 298 | $(qexec)echo 'Conflicts:' >> $@ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 299 | $(qexec)echo 'Libs: -L$${libdir} -laom -lm' >> $@ |
Johann | b46d58a | 2013-01-18 11:31:22 -0800 | [diff] [blame] | 300 | ifeq ($(HAVE_PTHREAD_H),yes) |
John Koleszar | bd6ffaa | 2012-08-21 10:54:30 -0700 | [diff] [blame] | 301 | $(qexec)echo 'Libs.private: -lm -lpthread' >> $@ |
Johann | b46d58a | 2013-01-18 11:31:22 -0800 | [diff] [blame] | 302 | else |
| 303 | $(qexec)echo 'Libs.private: -lm' >> $@ |
| 304 | endif |
Ralph Giles | 607f842 | 2011-03-28 12:04:51 -0700 | [diff] [blame] | 305 | $(qexec)echo 'Cflags: -I$${includedir}' >> $@ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 306 | INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/aom.pc |
Ralph Giles | 607f842 | 2011-03-28 12:04:51 -0700 | [diff] [blame] | 307 | INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 308 | CLEAN-OBJS += aom.pc |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 309 | endif |
| 310 | |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 311 | # |
| 312 | # Rule to make assembler configuration file from C configuration file |
| 313 | # |
| 314 | ifeq ($(ARCH_X86)$(ARCH_X86_64),yes) |
| 315 | # YASM |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 316 | $(BUILD_PFX)aom_config.asm: $(BUILD_PFX)aom_config.h |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 317 | @echo " [CREATE] $@" |
| 318 | @egrep "#define [A-Z0-9_]+ [01]" $< \ |
| 319 | | awk '{print $$2 " equ " $$3}' > $@ |
| 320 | else |
| 321 | ADS2GAS=$(if $(filter yes,$(CONFIG_GCC)),| $(ASM_CONVERSION)) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 322 | $(BUILD_PFX)aom_config.asm: $(BUILD_PFX)aom_config.h |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 323 | @echo " [CREATE] $@" |
| 324 | @egrep "#define [A-Z0-9_]+ [01]" $< \ |
| 325 | | awk '{print $$2 " EQU " $$3}' $(ADS2GAS) > $@ |
| 326 | @echo " END" $(ADS2GAS) >> $@ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 327 | CLEAN-OBJS += $(BUILD_PFX)aom_config.asm |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 328 | endif |
| 329 | |
| 330 | # |
Johann | 6eec73a | 2014-07-31 14:19:31 -0700 | [diff] [blame] | 331 | # Add assembler dependencies for configuration. |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 332 | # |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 333 | $(filter %.s.o,$(OBJS-yes)): $(BUILD_PFX)aom_config.asm |
| 334 | $(filter %$(ASM).o,$(OBJS-yes)): $(BUILD_PFX)aom_config.asm |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 335 | |
Johann | 40dcae9 | 2011-02-04 17:44:31 -0500 | [diff] [blame] | 336 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 337 | $(shell $(SRC_PATH_BARE)/build/make/version.sh "$(SRC_PATH_BARE)" $(BUILD_PFX)aom_version.h) |
| 338 | CLEAN-OBJS += $(BUILD_PFX)aom_version.h |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 339 | |
Tom Finegan | 4317ba5 | 2016-03-24 13:12:51 -0700 | [diff] [blame] | 340 | # |
| 341 | # Add include path for libwebm sources. |
| 342 | # |
| 343 | ifeq ($(CONFIG_WEBM_IO),yes) |
| 344 | CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/libwebm |
| 345 | endif |
John Koleszar | a910049 | 2011-08-19 14:06:00 -0400 | [diff] [blame] | 346 | |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 347 | ## |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 348 | ## libaom test directives |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 349 | ## |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 350 | ifeq ($(CONFIG_UNIT_TESTS),yes) |
Yaowu Xu | 97aa09f | 2016-10-12 08:25:39 -0700 | [diff] [blame] | 351 | LIBAOM_TEST_DATA_PATH ?= . |
John Koleszar | e82d261 | 2012-05-16 16:25:51 -0700 | [diff] [blame] | 352 | |
| 353 | include $(SRC_PATH_BARE)/test/test.mk |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 354 | LIBAOM_TEST_SRCS=$(addprefix test/,$(call enabled,LIBAOM_TEST_SRCS)) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 355 | LIBAOM_TEST_BIN=./test_libaom$(EXE_SFX) |
Yaowu Xu | 97aa09f | 2016-10-12 08:25:39 -0700 | [diff] [blame] | 356 | LIBAOM_TEST_DATA=$(addprefix $(LIBAOM_TEST_DATA_PATH)/,\ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 357 | $(call enabled,LIBAOM_TEST_DATA)) |
James Zern | f9687c5 | 2017-04-19 12:28:24 -0700 | [diff] [blame] | 358 | libaom_test_data_url=https://storage.googleapis.com/downloads.webmproject.org/test_data/libvpx/$(1) |
John Koleszar | 0074863 | 2012-06-20 14:45:22 -0700 | [diff] [blame] | 359 | |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 360 | TEST_INTRA_PRED_SPEED_BIN=./test_intra_pred_speed$(EXE_SFX) |
| 361 | TEST_INTRA_PRED_SPEED_SRCS=$(addprefix test/,$(call enabled,TEST_INTRA_PRED_SPEED_SRCS)) |
James Zern | 39d93f3 | 2015-06-09 19:30:46 -0700 | [diff] [blame] | 362 | TEST_INTRA_PRED_SPEED_OBJS := $(sort $(call objs,$(TEST_INTRA_PRED_SPEED_SRCS))) |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 363 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 364 | libaom_test_srcs.txt: |
James Zern | 4a7cebe | 2013-06-25 13:50:30 -0700 | [diff] [blame] | 365 | @echo " [CREATE] $@" |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 366 | @echo $(LIBAOM_TEST_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@ |
| 367 | CLEAN-OBJS += libaom_test_srcs.txt |
James Zern | 4a7cebe | 2013-06-25 13:50:30 -0700 | [diff] [blame] | 368 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 369 | $(LIBAOM_TEST_DATA): $(SRC_PATH_BARE)/test/test-data.sha1 |
John Koleszar | 0074863 | 2012-06-20 14:45:22 -0700 | [diff] [blame] | 370 | @echo " [DOWNLOAD] $@" |
| 371 | $(qexec)trap 'rm -f $@' INT TERM &&\ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 372 | curl -L -o $@ $(call libaom_test_data_url,$(@F)) |
John Koleszar | 0074863 | 2012-06-20 14:45:22 -0700 | [diff] [blame] | 373 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 374 | testdata:: $(LIBAOM_TEST_DATA) |
James Zern | d6fd229 | 2014-07-29 20:43:56 -0700 | [diff] [blame] | 375 | $(qexec)[ -x "$$(which sha1sum)" ] && sha1sum=sha1sum;\ |
| 376 | [ -x "$$(which shasum)" ] && sha1sum=shasum;\ |
| 377 | [ -x "$$(which sha1)" ] && sha1sum=sha1;\ |
| 378 | if [ -n "$${sha1sum}" ]; then\ |
James Zern | 23fbef2 | 2014-07-29 20:31:23 -0700 | [diff] [blame] | 379 | set -e;\ |
John Koleszar | 0074863 | 2012-06-20 14:45:22 -0700 | [diff] [blame] | 380 | echo "Checking test data:";\ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 381 | for f in $(call enabled,LIBAOM_TEST_DATA); do\ |
James Zern | ec45003 | 2015-11-10 17:54:51 -0800 | [diff] [blame] | 382 | grep $$f $(SRC_PATH_BARE)/test/test-data.sha1 |\ |
Yaowu Xu | 97aa09f | 2016-10-12 08:25:39 -0700 | [diff] [blame] | 383 | (cd $(LIBAOM_TEST_DATA_PATH); $${sha1sum} -c);\ |
James Zern | ec45003 | 2015-11-10 17:54:51 -0800 | [diff] [blame] | 384 | done; \ |
John Koleszar | 0074863 | 2012-06-20 14:45:22 -0700 | [diff] [blame] | 385 | else\ |
| 386 | echo "Skipping test data integrity check, sha1sum not found.";\ |
| 387 | fi |
John Koleszar | e82d261 | 2012-05-16 16:25:51 -0700 | [diff] [blame] | 388 | |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 389 | ifeq ($(CONFIG_EXTERNAL_BUILD),yes) |
| 390 | ifeq ($(CONFIG_MSVS),yes) |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 391 | gtest.$(VCPROJ_SFX): $(SRC_PATH_BARE)/third_party/googletest/src/googletest/src/gtest-all.cc |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 392 | @echo " [CREATE] $@" |
Martin Storsjo | 0b4637e | 2013-05-17 00:56:46 +0300 | [diff] [blame] | 393 | $(qexec)$(GEN_VCPROJ) \ |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 394 | --lib \ |
| 395 | --target=$(TOOLCHAIN) \ |
| 396 | $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ |
| 397 | --name=gtest \ |
| 398 | --proj-guid=EC00E1EC-AF68-4D92-A255-181690D1C9B1 \ |
| 399 | --ver=$(CONFIG_VS_VERSION) \ |
| 400 | --src-path-bare="$(SRC_PATH_BARE)" \ |
Yaowu Xu | c202100 | 2012-12-04 12:28:10 -0800 | [diff] [blame] | 401 | -D_VARIADIC_MAX=10 \ |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 402 | --out=gtest.$(VCPROJ_SFX) \ |
| 403 | $(SRC_PATH_BARE)/third_party/googletest/src/googletest/src/gtest-all.cc \ |
| 404 | -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/googletest/include" \ |
| 405 | -I"$(SRC_PATH_BARE)/third_party/googletest/src/googletest" |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 406 | |
Martin Storsjo | 0b4637e | 2013-05-17 00:56:46 +0300 | [diff] [blame] | 407 | PROJECTS-$(CONFIG_MSVS) += gtest.$(VCPROJ_SFX) |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 408 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 409 | test_libaom.$(VCPROJ_SFX): $(LIBAOM_TEST_SRCS) aom.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX) |
John Koleszar | 7f63bfa | 2012-06-01 10:43:47 -0700 | [diff] [blame] | 410 | @echo " [CREATE] $@" |
Martin Storsjo | 0b4637e | 2013-05-17 00:56:46 +0300 | [diff] [blame] | 411 | $(qexec)$(GEN_VCPROJ) \ |
John Koleszar | 7f63bfa | 2012-06-01 10:43:47 -0700 | [diff] [blame] | 412 | --exe \ |
| 413 | --target=$(TOOLCHAIN) \ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 414 | --name=test_libaom \ |
Yaowu Xu | c202100 | 2012-12-04 12:28:10 -0800 | [diff] [blame] | 415 | -D_VARIADIC_MAX=10 \ |
John Koleszar | 7f63bfa | 2012-06-01 10:43:47 -0700 | [diff] [blame] | 416 | --proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \ |
| 417 | --ver=$(CONFIG_VS_VERSION) \ |
James Zern | f66590c | 2014-06-02 16:42:14 -0700 | [diff] [blame] | 418 | --src-path-bare="$(SRC_PATH_BARE)" \ |
John Koleszar | 7f63bfa | 2012-06-01 10:43:47 -0700 | [diff] [blame] | 419 | $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ |
| 420 | --out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \ |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 421 | -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/googletest/include" \ |
Tom Finegan | 4317ba5 | 2016-03-24 13:12:51 -0700 | [diff] [blame] | 422 | $(if $(CONFIG_WEBM_IO),-I"$(SRC_PATH_BARE)/third_party/libwebm") \ |
Martin Storsjo | a37e84d | 2013-05-19 12:21:29 +0300 | [diff] [blame] | 423 | -L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^ |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 424 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 425 | PROJECTS-$(CONFIG_MSVS) += test_libaom.$(VCPROJ_SFX) |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 426 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 427 | LIBAOM_TEST_BIN := $(addprefix $(TGT_OS:win64=x64)/Release/,$(notdir $(LIBAOM_TEST_BIN))) |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 428 | |
| 429 | ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),) |
| 430 | PROJECTS-$(CONFIG_MSVS) += test_intra_pred_speed.$(VCPROJ_SFX) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 431 | test_intra_pred_speed.$(VCPROJ_SFX): $(TEST_INTRA_PRED_SPEED_SRCS) aom.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX) |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 432 | @echo " [CREATE] $@" |
| 433 | $(qexec)$(GEN_VCPROJ) \ |
| 434 | --exe \ |
| 435 | --target=$(TOOLCHAIN) \ |
| 436 | --name=test_intra_pred_speed \ |
| 437 | -D_VARIADIC_MAX=10 \ |
| 438 | --proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \ |
| 439 | --ver=$(CONFIG_VS_VERSION) \ |
| 440 | --src-path-bare="$(SRC_PATH_BARE)" \ |
| 441 | $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ |
| 442 | --out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \ |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 443 | -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/googletest/include" \ |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 444 | -L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^ |
| 445 | endif # TEST_INTRA_PRED_SPEED |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 446 | endif |
| 447 | else |
| 448 | |
| 449 | include $(SRC_PATH_BARE)/third_party/googletest/gtest.mk |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 450 | GTEST_SRCS := $(addprefix third_party/,$(call enabled,GTEST_SRCS)) |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 451 | GTEST_OBJS=$(call objs,$(GTEST_SRCS)) |
James Zern | e4d2c25 | 2013-06-26 18:35:11 -0700 | [diff] [blame] | 452 | ifeq ($(filter win%,$(TGT_OS)),$(TGT_OS)) |
| 453 | # Disabling pthreads globally will cause issues on darwin and possibly elsewhere |
| 454 | $(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -DGTEST_HAS_PTHREAD=0 |
| 455 | endif |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 456 | GTEST_INCLUDES := -I$(SRC_PATH_BARE)/third_party/googletest/src/googletest |
| 457 | GTEST_INCLUDES += -I$(SRC_PATH_BARE)/third_party/googletest/src/googletest/include |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 458 | $(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES) |
Tom Finegan | d104b16 | 2015-05-14 10:46:44 -0700 | [diff] [blame] | 459 | OBJS-yes += $(GTEST_OBJS) |
| 460 | LIBS-yes += $(BUILD_PFX)libgtest.a $(BUILD_PFX)libgtest_g.a |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 461 | $(BUILD_PFX)libgtest_g.a: $(GTEST_OBJS) |
| 462 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 463 | LIBAOM_TEST_OBJS=$(sort $(call objs,$(LIBAOM_TEST_SRCS))) |
| 464 | $(LIBAOM_TEST_OBJS) $(LIBAOM_TEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES) |
| 465 | OBJS-yes += $(LIBAOM_TEST_OBJS) |
| 466 | BINS-yes += $(LIBAOM_TEST_BIN) |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 467 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 468 | CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),aom_g,aom) |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 469 | CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a) |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 470 | TEST_LIBS := lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 471 | $(LIBAOM_TEST_BIN): $(TEST_LIBS) |
| 472 | $(eval $(call linkerxx_template,$(LIBAOM_TEST_BIN), \ |
| 473 | $(LIBAOM_TEST_OBJS) \ |
| 474 | -L. -laom -lgtest $(extralibs) -lm)) |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 475 | |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 476 | ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),) |
| 477 | $(TEST_INTRA_PRED_SPEED_OBJS) $(TEST_INTRA_PRED_SPEED_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES) |
| 478 | OBJS-yes += $(TEST_INTRA_PRED_SPEED_OBJS) |
| 479 | BINS-yes += $(TEST_INTRA_PRED_SPEED_BIN) |
| 480 | |
| 481 | $(TEST_INTRA_PRED_SPEED_BIN): $(TEST_LIBS) |
| 482 | $(eval $(call linkerxx_template,$(TEST_INTRA_PRED_SPEED_BIN), \ |
| 483 | $(TEST_INTRA_PRED_SPEED_OBJS) \ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 484 | -L. -laom -lgtest $(extralibs) -lm)) |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 485 | endif # TEST_INTRA_PRED_SPEED |
| 486 | |
James Zern | b0789cd | 2015-05-11 19:04:48 -0700 | [diff] [blame] | 487 | endif # CONFIG_UNIT_TESTS |
James Zern | 7059c1d | 2013-05-31 16:08:09 -0700 | [diff] [blame] | 488 | |
Johann | 0239f11 | 2014-01-08 15:45:14 -0800 | [diff] [blame] | 489 | # Install test sources only if codec source is included |
| 490 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(patsubst $(SRC_PATH_BARE)/%,%,\ |
| 491 | $(shell find $(SRC_PATH_BARE)/third_party/googletest -type f)) |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 492 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(LIBAOM_TEST_SRCS) |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 493 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(TEST_INTRA_PRED_SPEED_SRCS) |
Johann | 0239f11 | 2014-01-08 15:45:14 -0800 | [diff] [blame] | 494 | |
James Zern | 7059c1d | 2013-05-31 16:08:09 -0700 | [diff] [blame] | 495 | define test_shard_template |
| 496 | test:: test_shard.$(1) |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 497 | test-no-data-check:: test_shard_ndc.$(1) |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 498 | test_shard.$(1) test_shard_ndc.$(1): $(LIBAOM_TEST_BIN) |
James Zern | 7059c1d | 2013-05-31 16:08:09 -0700 | [diff] [blame] | 499 | @set -e; \ |
James Zern | b0789cd | 2015-05-11 19:04:48 -0700 | [diff] [blame] | 500 | export GTEST_SHARD_INDEX=$(1); \ |
| 501 | export GTEST_TOTAL_SHARDS=$(2); \ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 502 | $(LIBAOM_TEST_BIN) |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 503 | test_shard.$(1): testdata |
James Zern | 7059c1d | 2013-05-31 16:08:09 -0700 | [diff] [blame] | 504 | .PHONY: test_shard.$(1) |
| 505 | endef |
| 506 | |
| 507 | NUM_SHARDS := 10 |
| 508 | SHARDS := 0 1 2 3 4 5 6 7 8 9 |
| 509 | $(foreach s,$(SHARDS),$(eval $(call test_shard_template,$(s),$(NUM_SHARDS)))) |
| 510 | |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 511 | endif |
| 512 | |
| 513 | ## |
| 514 | ## documentation directives |
| 515 | ## |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 516 | CLEAN-OBJS += libs.doxy |
| 517 | DOCS-yes += libs.doxy |
| 518 | libs.doxy: $(CODEC_DOC_SRCS) |
| 519 | @echo " [CREATE] $@" |
| 520 | @rm -f $@ |
| 521 | @echo "INPUT += $^" >> $@ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 522 | @echo "INCLUDE_PATH += ." >> $@; |
| 523 | @echo "ENABLED_SECTIONS += $(sort $(CODEC_DOC_SECTIONS))" >> $@ |
John Koleszar | e82d261 | 2012-05-16 16:25:51 -0700 | [diff] [blame] | 524 | |
John Koleszar | a9c7597 | 2012-11-08 17:09:30 -0800 | [diff] [blame] | 525 | ## Generate rtcd.h for all objects |
James Zern | aaccf65 | 2015-02-05 19:31:38 -0800 | [diff] [blame] | 526 | ifeq ($(CONFIG_DEPENDENCY_TRACKING),yes) |
John Koleszar | a9c7597 | 2012-11-08 17:09:30 -0800 | [diff] [blame] | 527 | $(OBJS-yes:.o=.d): $(RTCD) |
James Zern | aaccf65 | 2015-02-05 19:31:38 -0800 | [diff] [blame] | 528 | else |
| 529 | $(OBJS-yes): $(RTCD) |
| 530 | endif |
John Koleszar | b72373d | 2012-10-31 13:13:19 -0700 | [diff] [blame] | 531 | |
| 532 | ## Update the global src list |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 533 | SRCS += $(CODEC_SRCS) $(LIBAOM_TEST_SRCS) $(GTEST_SRCS) |
Tom Finegan | 7b7c843 | 2014-04-22 10:38:43 -0700 | [diff] [blame] | 534 | |
| 535 | ## |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 536 | ## aomdec/aomenc tests. |
Tom Finegan | 7b7c843 | 2014-04-22 10:38:43 -0700 | [diff] [blame] | 537 | ## |
| 538 | ifeq ($(CONFIG_UNIT_TESTS),yes) |
| 539 | TEST_BIN_PATH = . |
| 540 | ifeq ($(CONFIG_MSVS),yes) |
| 541 | # MSVC will build both Debug and Release configurations of tools in a |
| 542 | # sub directory named for the current target. Assume the user wants to |
| 543 | # run the Release tools, and assign TEST_BIN_PATH accordingly. |
| 544 | # TODO(tomfinegan): Is this adequate for ARM? |
| 545 | # TODO(tomfinegan): Support running the debug versions of tools? |
| 546 | TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH)) |
| 547 | endif |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 548 | utiltest utiltest-no-data-check: |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 549 | $(qexec)$(SRC_PATH_BARE)/test/aomdec.sh \ |
Yaowu Xu | 97aa09f | 2016-10-12 08:25:39 -0700 | [diff] [blame] | 550 | --test-data-path $(LIBAOM_TEST_DATA_PATH) \ |
Tom Finegan | 7b7c843 | 2014-04-22 10:38:43 -0700 | [diff] [blame] | 551 | --bin-path $(TEST_BIN_PATH) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 552 | $(qexec)$(SRC_PATH_BARE)/test/aomenc.sh \ |
Yaowu Xu | 97aa09f | 2016-10-12 08:25:39 -0700 | [diff] [blame] | 553 | --test-data-path $(LIBAOM_TEST_DATA_PATH) \ |
Tom Finegan | 7b7c843 | 2014-04-22 10:38:43 -0700 | [diff] [blame] | 554 | --bin-path $(TEST_BIN_PATH) |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 555 | utiltest: testdata |
Tom Finegan | 7b7c843 | 2014-04-22 10:38:43 -0700 | [diff] [blame] | 556 | else |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 557 | utiltest utiltest-no-data-check: |
Tom Finegan | 7b7c843 | 2014-04-22 10:38:43 -0700 | [diff] [blame] | 558 | @echo Unit tests must be enabled to make the utiltest target. |
| 559 | endif |
Tom Finegan | bc27d7e | 2014-05-15 21:34:42 -0700 | [diff] [blame] | 560 | |
| 561 | ## |
| 562 | ## Example tests. |
| 563 | ## |
| 564 | ifeq ($(CONFIG_UNIT_TESTS),yes) |
| 565 | # All non-MSVC targets output example targets in a sub dir named examples. |
| 566 | EXAMPLES_BIN_PATH = examples |
| 567 | ifeq ($(CONFIG_MSVS),yes) |
| 568 | # MSVC will build both Debug and Release configurations of the examples in a |
| 569 | # sub directory named for the current target. Assume the user wants to |
| 570 | # run the Release tools, and assign EXAMPLES_BIN_PATH accordingly. |
| 571 | # TODO(tomfinegan): Is this adequate for ARM? |
| 572 | # TODO(tomfinegan): Support running the debug versions of tools? |
| 573 | EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release |
| 574 | endif |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 575 | exampletest exampletest-no-data-check: examples |
Tom Finegan | bc27d7e | 2014-05-15 21:34:42 -0700 | [diff] [blame] | 576 | $(qexec)$(SRC_PATH_BARE)/test/examples.sh \ |
Yaowu Xu | 97aa09f | 2016-10-12 08:25:39 -0700 | [diff] [blame] | 577 | --test-data-path $(LIBAOM_TEST_DATA_PATH) \ |
Tom Finegan | bc27d7e | 2014-05-15 21:34:42 -0700 | [diff] [blame] | 578 | --bin-path $(EXAMPLES_BIN_PATH) |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 579 | exampletest: testdata |
Tom Finegan | bc27d7e | 2014-05-15 21:34:42 -0700 | [diff] [blame] | 580 | else |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 581 | exampletest exampletest-no-data-check: |
Tom Finegan | bc27d7e | 2014-05-15 21:34:42 -0700 | [diff] [blame] | 582 | @echo Unit tests must be enabled to make the exampletest target. |
| 583 | endif |