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 | |
Johann | e07fc7c | 2017-12-04 09:07:24 -0800 | [diff] [blame] | 154 | # Assembly files that are included, but don't define symbols themselves. |
| 155 | # Filtered out to avoid Visual Studio build warnings. |
| 156 | ASM_INCLUDES := \ |
| 157 | third_party/x86inc/x86inc.asm \ |
| 158 | aom_config.asm \ |
| 159 | aom_ports/x86_abi_support.asm \ |
John Koleszar | 5e562c7 | 2011-08-12 14:59:10 -0400 | [diff] [blame] | 160 | |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 161 | ifeq ($(CONFIG_EXTERNAL_BUILD),yes) |
| 162 | ifeq ($(CONFIG_MSVS),yes) |
| 163 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 164 | aom.def: $(call enabled,CODEC_EXPORTS) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 165 | @echo " [CREATE] $@" |
James Zern | e8d58d3 | 2012-08-15 11:47:13 -0700 | [diff] [blame] | 166 | $(qexec)$(SRC_PATH_BARE)/build/make/gen_msvs_def.sh\ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 167 | --name=aom\ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 168 | --out=$@ $^ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 169 | CLEAN-OBJS += aom.def |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 170 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 171 | aom.$(VCPROJ_SFX): $(CODEC_SRCS) aom.def |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 172 | @echo " [CREATE] $@" |
Martin Storsjo | 0b4637e | 2013-05-17 00:56:46 +0300 | [diff] [blame] | 173 | $(qexec)$(GEN_VCPROJ) \ |
Jim Bankoski | 1b16e74 | 2012-07-23 12:32:59 -0700 | [diff] [blame] | 174 | $(if $(CONFIG_SHARED),--dll,--lib) \ |
| 175 | --target=$(TOOLCHAIN) \ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 176 | $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 177 | --name=aom \ |
Johann | 128d2c2 | 2011-03-02 09:44:39 -0500 | [diff] [blame] | 178 | --proj-guid=DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74 \ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 179 | --module-def=aom.def \ |
Johann | 128d2c2 | 2011-03-02 09:44:39 -0500 | [diff] [blame] | 180 | --ver=$(CONFIG_VS_VERSION) \ |
James Zern | f66590c | 2014-06-02 16:42:14 -0700 | [diff] [blame] | 181 | --src-path-bare="$(SRC_PATH_BARE)" \ |
James Zern | b92f7bc | 2014-03-04 19:46:29 -0800 | [diff] [blame] | 182 | --out=$@ $(CFLAGS) \ |
| 183 | $(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) \ |
Johann | 128d2c2 | 2011-03-02 09:44:39 -0500 | [diff] [blame] | 184 | --src-path-bare="$(SRC_PATH_BARE)" \ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 185 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 186 | PROJECTS-yes += aom.$(VCPROJ_SFX) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 187 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 188 | aom.$(VCPROJ_SFX): aom_config.asm |
| 189 | aom.$(VCPROJ_SFX): $(RTCD) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 190 | |
| 191 | endif |
| 192 | else |
Johann | e07fc7c | 2017-12-04 09:07:24 -0800 | [diff] [blame] | 193 | LIBAOM_OBJS=$(call objs, $(filter-out $(ASM_INCLUDES), $(CODEC_SRCS))) |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 194 | OBJS-yes += $(LIBAOM_OBJS) |
| 195 | LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libaom.a $(BUILD_PFX)libaom_g.a |
| 196 | $(BUILD_PFX)libaom_g.a: $(LIBAOM_OBJS) |
John Koleszar | 7aa97a3 | 2010-06-03 10:29:04 -0400 | [diff] [blame] | 197 | |
Tom Finegan | 4a3a9c0 | 2017-07-14 08:34:20 -0700 | [diff] [blame] | 198 | SO_VERSION_MAJOR := 0 |
Johann | bb5a39c | 2015-03-23 15:33:17 -0700 | [diff] [blame] | 199 | SO_VERSION_MINOR := 0 |
| 200 | SO_VERSION_PATCH := 0 |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 201 | ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS)) |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 202 | LIBAOM_SO := libaom.$(SO_VERSION_MAJOR).dylib |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 203 | SHARED_LIB_SUF := .dylib |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 204 | EXPORT_FILE := libaom.syms |
| 205 | LIBAOM_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ |
| 206 | libaom.dylib ) |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 207 | else |
Brion Vibber | 992e4b7 | 2016-05-02 12:41:59 -0400 | [diff] [blame] | 208 | ifeq ($(filter iphonesimulator%,$(TGT_OS)),$(TGT_OS)) |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 209 | LIBAOM_SO := libaom.$(SO_VERSION_MAJOR).dylib |
Brion Vibber | 992e4b7 | 2016-05-02 12:41:59 -0400 | [diff] [blame] | 210 | SHARED_LIB_SUF := .dylib |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 211 | EXPORT_FILE := libaom.syms |
| 212 | LIBAOM_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, libaom.dylib) |
Brion Vibber | 992e4b7 | 2016-05-02 12:41:59 -0400 | [diff] [blame] | 213 | else |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 214 | ifeq ($(filter os2%,$(TGT_OS)),$(TGT_OS)) |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 215 | LIBAOM_SO := libaom$(SO_VERSION_MAJOR).dll |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 216 | SHARED_LIB_SUF := _dll.a |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 217 | EXPORT_FILE := libaom.def |
| 218 | LIBAOM_SO_SYMLINKS := |
| 219 | LIBAOM_SO_IMPLIB := libaom_dll.a |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 220 | else |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 221 | 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] | 222 | SHARED_LIB_SUF := .so |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 223 | EXPORT_FILE := libaom.ver |
| 224 | LIBAOM_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ |
| 225 | libaom.so libaom.so.$(SO_VERSION_MAJOR) \ |
| 226 | libaom.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR)) |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 227 | endif |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 228 | endif |
Brion Vibber | 992e4b7 | 2016-05-02 12:41:59 -0400 | [diff] [blame] | 229 | endif |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 230 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 231 | LIBS-$(CONFIG_SHARED) += $(BUILD_PFX)$(LIBAOM_SO)\ |
| 232 | $(notdir $(LIBAOM_SO_SYMLINKS)) \ |
| 233 | $(if $(LIBAOM_SO_IMPLIB), $(BUILD_PFX)$(LIBAOM_SO_IMPLIB)) |
| 234 | $(BUILD_PFX)$(LIBAOM_SO): $(LIBAOM_OBJS) $(EXPORT_FILE) |
| 235 | $(BUILD_PFX)$(LIBAOM_SO): extralibs += -lm |
| 236 | $(BUILD_PFX)$(LIBAOM_SO): SONAME = libaom.so.$(SO_VERSION_MAJOR) |
| 237 | $(BUILD_PFX)$(LIBAOM_SO): EXPORTS_FILE = $(EXPORT_FILE) |
John Koleszar | 7aa97a3 | 2010-06-03 10:29:04 -0400 | [diff] [blame] | 238 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 239 | libaom.ver: $(call enabled,CODEC_EXPORTS) |
John Koleszar | 7aa97a3 | 2010-06-03 10:29:04 -0400 | [diff] [blame] | 240 | @echo " [CREATE] $@" |
| 241 | $(qexec)echo "{ global:" > $@ |
| 242 | $(qexec)for f in $?; do awk '{print $$2";"}' < $$f >>$@; done |
| 243 | $(qexec)echo "local: *; };" >> $@ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 244 | CLEAN-OBJS += libaom.ver |
John Koleszar | 7aa97a3 | 2010-06-03 10:29:04 -0400 | [diff] [blame] | 245 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 246 | libaom.syms: $(call enabled,CODEC_EXPORTS) |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 247 | @echo " [CREATE] $@" |
| 248 | $(qexec)awk '{print "_"$$2}' $^ >$@ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 249 | CLEAN-OBJS += libaom.syms |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 250 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 251 | libaom.def: $(call enabled,CODEC_EXPORTS) |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 252 | @echo " [CREATE] $@" |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 253 | $(qexec)echo LIBRARY $(LIBAOM_SO:.dll=) INITINSTANCE TERMINSTANCE > $@ |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 254 | $(qexec)echo "DATA MULTIPLE NONSHARED" >> $@ |
| 255 | $(qexec)echo "EXPORTS" >> $@ |
James Zern | cc73e1f | 2016-08-08 15:09:30 -0700 | [diff] [blame] | 256 | $(qexec)awk '{print "_"$$2}' $^ >>$@ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 257 | CLEAN-OBJS += libaom.def |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 258 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 259 | libaom_dll.a: $(LIBAOM_SO) |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 260 | @echo " [IMPLIB] $@" |
| 261 | $(qexec)emximp -o $@ $< |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 262 | CLEAN-OBJS += libaom_dll.a |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 263 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 264 | define libaom_symlink_template |
James Zern | 495b241 | 2011-07-25 15:40:36 -0700 | [diff] [blame] | 265 | $(1): $(2) |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 266 | @echo " [LN] $(2) $$@" |
John Koleszar | 5ebe94f | 2012-12-23 07:20:10 -0800 | [diff] [blame] | 267 | $(qexec)mkdir -p $$(dir $$@) |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 268 | $(qexec)ln -sf $(2) $$@ |
James Zern | 495b241 | 2011-07-25 15:40:36 -0700 | [diff] [blame] | 269 | endef |
| 270 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 271 | $(eval $(call libaom_symlink_template,\ |
| 272 | $(addprefix $(BUILD_PFX),$(notdir $(LIBAOM_SO_SYMLINKS))),\ |
| 273 | $(BUILD_PFX)$(LIBAOM_SO))) |
| 274 | $(eval $(call libaom_symlink_template,\ |
| 275 | $(addprefix $(DIST_DIR)/,$(LIBAOM_SO_SYMLINKS)),\ |
| 276 | $(LIBAOM_SO))) |
John Koleszar | 7aa97a3 | 2010-06-03 10:29:04 -0400 | [diff] [blame] | 277 | |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 278 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 279 | INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBAOM_SO_SYMLINKS) |
| 280 | INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBAOM_SO) |
| 281 | INSTALL-LIBS-$(CONFIG_SHARED) += $(if $(LIBAOM_SO_IMPLIB),$(LIBSUBDIR)/$(LIBAOM_SO_IMPLIB)) |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 282 | |
Ralph Giles | 607f842 | 2011-03-28 12:04:51 -0700 | [diff] [blame] | 283 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 284 | LIBS-yes += aom.pc |
| 285 | aom.pc: config.mk libs.mk |
Ralph Giles | 607f842 | 2011-03-28 12:04:51 -0700 | [diff] [blame] | 286 | @echo " [CREATE] $@" |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 287 | $(qexec)echo '# pkg-config file from libaom $(VERSION_STRING)' > $@ |
Ralph Giles | 607f842 | 2011-03-28 12:04:51 -0700 | [diff] [blame] | 288 | $(qexec)echo 'prefix=$(PREFIX)' >> $@ |
| 289 | $(qexec)echo 'exec_prefix=$${prefix}' >> $@ |
Takanori MATSUURA | a7eea3e | 2012-04-20 15:11:46 -0700 | [diff] [blame] | 290 | $(qexec)echo 'libdir=$${prefix}/$(LIBSUBDIR)' >> $@ |
Ralph Giles | 607f842 | 2011-03-28 12:04:51 -0700 | [diff] [blame] | 291 | $(qexec)echo 'includedir=$${prefix}/include' >> $@ |
| 292 | $(qexec)echo '' >> $@ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 293 | $(qexec)echo 'Name: aom' >> $@ |
| 294 | $(qexec)echo 'Description: WebM Project AVx codec implementation' >> $@ |
Ralph Giles | 607f842 | 2011-03-28 12:04:51 -0700 | [diff] [blame] | 295 | $(qexec)echo 'Version: $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)' >> $@ |
| 296 | $(qexec)echo 'Requires:' >> $@ |
| 297 | $(qexec)echo 'Conflicts:' >> $@ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 298 | $(qexec)echo 'Libs: -L$${libdir} -laom -lm' >> $@ |
Johann | b46d58a | 2013-01-18 11:31:22 -0800 | [diff] [blame] | 299 | ifeq ($(HAVE_PTHREAD_H),yes) |
John Koleszar | bd6ffaa | 2012-08-21 10:54:30 -0700 | [diff] [blame] | 300 | $(qexec)echo 'Libs.private: -lm -lpthread' >> $@ |
Johann | b46d58a | 2013-01-18 11:31:22 -0800 | [diff] [blame] | 301 | else |
| 302 | $(qexec)echo 'Libs.private: -lm' >> $@ |
| 303 | endif |
Ralph Giles | 607f842 | 2011-03-28 12:04:51 -0700 | [diff] [blame] | 304 | $(qexec)echo 'Cflags: -I$${includedir}' >> $@ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 305 | INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/aom.pc |
Ralph Giles | 607f842 | 2011-03-28 12:04:51 -0700 | [diff] [blame] | 306 | INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 307 | CLEAN-OBJS += aom.pc |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 308 | endif |
| 309 | |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 310 | # |
| 311 | # Rule to make assembler configuration file from C configuration file |
| 312 | # |
| 313 | ifeq ($(ARCH_X86)$(ARCH_X86_64),yes) |
| 314 | # YASM |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 315 | $(BUILD_PFX)aom_config.asm: $(BUILD_PFX)aom_config.h |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 316 | @echo " [CREATE] $@" |
| 317 | @egrep "#define [A-Z0-9_]+ [01]" $< \ |
| 318 | | awk '{print $$2 " equ " $$3}' > $@ |
| 319 | else |
| 320 | ADS2GAS=$(if $(filter yes,$(CONFIG_GCC)),| $(ASM_CONVERSION)) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 321 | $(BUILD_PFX)aom_config.asm: $(BUILD_PFX)aom_config.h |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 322 | @echo " [CREATE] $@" |
| 323 | @egrep "#define [A-Z0-9_]+ [01]" $< \ |
| 324 | | awk '{print $$2 " EQU " $$3}' $(ADS2GAS) > $@ |
| 325 | @echo " END" $(ADS2GAS) >> $@ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 326 | CLEAN-OBJS += $(BUILD_PFX)aom_config.asm |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 327 | endif |
| 328 | |
| 329 | # |
Johann | 6eec73a | 2014-07-31 14:19:31 -0700 | [diff] [blame] | 330 | # Add assembler dependencies for configuration. |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 331 | # |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 332 | $(filter %.s.o,$(OBJS-yes)): $(BUILD_PFX)aom_config.asm |
| 333 | $(filter %$(ASM).o,$(OBJS-yes)): $(BUILD_PFX)aom_config.asm |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 334 | |
Johann | 40dcae9 | 2011-02-04 17:44:31 -0500 | [diff] [blame] | 335 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 336 | $(shell $(SRC_PATH_BARE)/build/make/version.sh "$(SRC_PATH_BARE)" $(BUILD_PFX)aom_version.h) |
| 337 | CLEAN-OBJS += $(BUILD_PFX)aom_version.h |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 338 | |
Tom Finegan | 4317ba5 | 2016-03-24 13:12:51 -0700 | [diff] [blame] | 339 | # |
| 340 | # Add include path for libwebm sources. |
| 341 | # |
| 342 | ifeq ($(CONFIG_WEBM_IO),yes) |
| 343 | CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/libwebm |
| 344 | endif |
John Koleszar | a910049 | 2011-08-19 14:06:00 -0400 | [diff] [blame] | 345 | |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 346 | ## |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 347 | ## libaom test directives |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 348 | ## |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 349 | ifeq ($(CONFIG_UNIT_TESTS),yes) |
Yaowu Xu | 97aa09f | 2016-10-12 08:25:39 -0700 | [diff] [blame] | 350 | LIBAOM_TEST_DATA_PATH ?= . |
John Koleszar | e82d261 | 2012-05-16 16:25:51 -0700 | [diff] [blame] | 351 | |
| 352 | include $(SRC_PATH_BARE)/test/test.mk |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 353 | LIBAOM_TEST_SRCS=$(addprefix test/,$(call enabled,LIBAOM_TEST_SRCS)) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 354 | LIBAOM_TEST_BIN=./test_libaom$(EXE_SFX) |
Yaowu Xu | 97aa09f | 2016-10-12 08:25:39 -0700 | [diff] [blame] | 355 | LIBAOM_TEST_DATA=$(addprefix $(LIBAOM_TEST_DATA_PATH)/,\ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 356 | $(call enabled,LIBAOM_TEST_DATA)) |
James Zern | f9687c5 | 2017-04-19 12:28:24 -0700 | [diff] [blame] | 357 | 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] | 358 | |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 359 | TEST_INTRA_PRED_SPEED_BIN=./test_intra_pred_speed$(EXE_SFX) |
| 360 | 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] | 361 | 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] | 362 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 363 | libaom_test_srcs.txt: |
James Zern | 4a7cebe | 2013-06-25 13:50:30 -0700 | [diff] [blame] | 364 | @echo " [CREATE] $@" |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 365 | @echo $(LIBAOM_TEST_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@ |
| 366 | CLEAN-OBJS += libaom_test_srcs.txt |
James Zern | 4a7cebe | 2013-06-25 13:50:30 -0700 | [diff] [blame] | 367 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 368 | $(LIBAOM_TEST_DATA): $(SRC_PATH_BARE)/test/test-data.sha1 |
John Koleszar | 0074863 | 2012-06-20 14:45:22 -0700 | [diff] [blame] | 369 | @echo " [DOWNLOAD] $@" |
| 370 | $(qexec)trap 'rm -f $@' INT TERM &&\ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 371 | curl -L -o $@ $(call libaom_test_data_url,$(@F)) |
John Koleszar | 0074863 | 2012-06-20 14:45:22 -0700 | [diff] [blame] | 372 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 373 | testdata:: $(LIBAOM_TEST_DATA) |
James Zern | d6fd229 | 2014-07-29 20:43:56 -0700 | [diff] [blame] | 374 | $(qexec)[ -x "$$(which sha1sum)" ] && sha1sum=sha1sum;\ |
| 375 | [ -x "$$(which shasum)" ] && sha1sum=shasum;\ |
| 376 | [ -x "$$(which sha1)" ] && sha1sum=sha1;\ |
| 377 | if [ -n "$${sha1sum}" ]; then\ |
James Zern | 23fbef2 | 2014-07-29 20:31:23 -0700 | [diff] [blame] | 378 | set -e;\ |
John Koleszar | 0074863 | 2012-06-20 14:45:22 -0700 | [diff] [blame] | 379 | echo "Checking test data:";\ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 380 | for f in $(call enabled,LIBAOM_TEST_DATA); do\ |
James Zern | ec45003 | 2015-11-10 17:54:51 -0800 | [diff] [blame] | 381 | grep $$f $(SRC_PATH_BARE)/test/test-data.sha1 |\ |
Yaowu Xu | 97aa09f | 2016-10-12 08:25:39 -0700 | [diff] [blame] | 382 | (cd $(LIBAOM_TEST_DATA_PATH); $${sha1sum} -c);\ |
James Zern | ec45003 | 2015-11-10 17:54:51 -0800 | [diff] [blame] | 383 | done; \ |
John Koleszar | 0074863 | 2012-06-20 14:45:22 -0700 | [diff] [blame] | 384 | else\ |
| 385 | echo "Skipping test data integrity check, sha1sum not found.";\ |
| 386 | fi |
John Koleszar | e82d261 | 2012-05-16 16:25:51 -0700 | [diff] [blame] | 387 | |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 388 | ifeq ($(CONFIG_EXTERNAL_BUILD),yes) |
| 389 | ifeq ($(CONFIG_MSVS),yes) |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 390 | 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] | 391 | @echo " [CREATE] $@" |
Martin Storsjo | 0b4637e | 2013-05-17 00:56:46 +0300 | [diff] [blame] | 392 | $(qexec)$(GEN_VCPROJ) \ |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 393 | --lib \ |
| 394 | --target=$(TOOLCHAIN) \ |
| 395 | $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ |
| 396 | --name=gtest \ |
| 397 | --proj-guid=EC00E1EC-AF68-4D92-A255-181690D1C9B1 \ |
| 398 | --ver=$(CONFIG_VS_VERSION) \ |
| 399 | --src-path-bare="$(SRC_PATH_BARE)" \ |
Yaowu Xu | c202100 | 2012-12-04 12:28:10 -0800 | [diff] [blame] | 400 | -D_VARIADIC_MAX=10 \ |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 401 | --out=gtest.$(VCPROJ_SFX) \ |
| 402 | $(SRC_PATH_BARE)/third_party/googletest/src/googletest/src/gtest-all.cc \ |
| 403 | -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/googletest/include" \ |
| 404 | -I"$(SRC_PATH_BARE)/third_party/googletest/src/googletest" |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 405 | |
Martin Storsjo | 0b4637e | 2013-05-17 00:56:46 +0300 | [diff] [blame] | 406 | PROJECTS-$(CONFIG_MSVS) += gtest.$(VCPROJ_SFX) |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 407 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 408 | 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] | 409 | @echo " [CREATE] $@" |
Martin Storsjo | 0b4637e | 2013-05-17 00:56:46 +0300 | [diff] [blame] | 410 | $(qexec)$(GEN_VCPROJ) \ |
John Koleszar | 7f63bfa | 2012-06-01 10:43:47 -0700 | [diff] [blame] | 411 | --exe \ |
| 412 | --target=$(TOOLCHAIN) \ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 413 | --name=test_libaom \ |
Yaowu Xu | c202100 | 2012-12-04 12:28:10 -0800 | [diff] [blame] | 414 | -D_VARIADIC_MAX=10 \ |
John Koleszar | 7f63bfa | 2012-06-01 10:43:47 -0700 | [diff] [blame] | 415 | --proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \ |
| 416 | --ver=$(CONFIG_VS_VERSION) \ |
James Zern | f66590c | 2014-06-02 16:42:14 -0700 | [diff] [blame] | 417 | --src-path-bare="$(SRC_PATH_BARE)" \ |
John Koleszar | 7f63bfa | 2012-06-01 10:43:47 -0700 | [diff] [blame] | 418 | $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ |
| 419 | --out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \ |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 420 | -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/googletest/include" \ |
Tom Finegan | 4317ba5 | 2016-03-24 13:12:51 -0700 | [diff] [blame] | 421 | $(if $(CONFIG_WEBM_IO),-I"$(SRC_PATH_BARE)/third_party/libwebm") \ |
Martin Storsjo | a37e84d | 2013-05-19 12:21:29 +0300 | [diff] [blame] | 422 | -L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^ |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 423 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 424 | PROJECTS-$(CONFIG_MSVS) += test_libaom.$(VCPROJ_SFX) |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 425 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 426 | 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] | 427 | |
| 428 | ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),) |
| 429 | PROJECTS-$(CONFIG_MSVS) += test_intra_pred_speed.$(VCPROJ_SFX) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 430 | 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] | 431 | @echo " [CREATE] $@" |
| 432 | $(qexec)$(GEN_VCPROJ) \ |
| 433 | --exe \ |
| 434 | --target=$(TOOLCHAIN) \ |
| 435 | --name=test_intra_pred_speed \ |
| 436 | -D_VARIADIC_MAX=10 \ |
| 437 | --proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \ |
| 438 | --ver=$(CONFIG_VS_VERSION) \ |
| 439 | --src-path-bare="$(SRC_PATH_BARE)" \ |
| 440 | $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ |
| 441 | --out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \ |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 442 | -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/googletest/include" \ |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 443 | -L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^ |
| 444 | endif # TEST_INTRA_PRED_SPEED |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 445 | endif |
| 446 | else |
| 447 | |
| 448 | include $(SRC_PATH_BARE)/third_party/googletest/gtest.mk |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 449 | GTEST_SRCS := $(addprefix third_party/,$(call enabled,GTEST_SRCS)) |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 450 | GTEST_OBJS=$(call objs,$(GTEST_SRCS)) |
James Zern | e4d2c25 | 2013-06-26 18:35:11 -0700 | [diff] [blame] | 451 | ifeq ($(filter win%,$(TGT_OS)),$(TGT_OS)) |
| 452 | # Disabling pthreads globally will cause issues on darwin and possibly elsewhere |
| 453 | $(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -DGTEST_HAS_PTHREAD=0 |
| 454 | endif |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 455 | GTEST_INCLUDES := -I$(SRC_PATH_BARE)/third_party/googletest/src/googletest |
| 456 | GTEST_INCLUDES += -I$(SRC_PATH_BARE)/third_party/googletest/src/googletest/include |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 457 | $(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES) |
Tom Finegan | d104b16 | 2015-05-14 10:46:44 -0700 | [diff] [blame] | 458 | OBJS-yes += $(GTEST_OBJS) |
| 459 | LIBS-yes += $(BUILD_PFX)libgtest.a $(BUILD_PFX)libgtest_g.a |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 460 | $(BUILD_PFX)libgtest_g.a: $(GTEST_OBJS) |
| 461 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 462 | LIBAOM_TEST_OBJS=$(sort $(call objs,$(LIBAOM_TEST_SRCS))) |
| 463 | $(LIBAOM_TEST_OBJS) $(LIBAOM_TEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES) |
| 464 | OBJS-yes += $(LIBAOM_TEST_OBJS) |
| 465 | BINS-yes += $(LIBAOM_TEST_BIN) |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 466 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 467 | CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),aom_g,aom) |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 468 | CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a) |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 469 | TEST_LIBS := lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 470 | $(LIBAOM_TEST_BIN): $(TEST_LIBS) |
| 471 | $(eval $(call linkerxx_template,$(LIBAOM_TEST_BIN), \ |
| 472 | $(LIBAOM_TEST_OBJS) \ |
| 473 | -L. -laom -lgtest $(extralibs) -lm)) |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 474 | |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 475 | ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),) |
| 476 | $(TEST_INTRA_PRED_SPEED_OBJS) $(TEST_INTRA_PRED_SPEED_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES) |
| 477 | OBJS-yes += $(TEST_INTRA_PRED_SPEED_OBJS) |
| 478 | BINS-yes += $(TEST_INTRA_PRED_SPEED_BIN) |
| 479 | |
| 480 | $(TEST_INTRA_PRED_SPEED_BIN): $(TEST_LIBS) |
| 481 | $(eval $(call linkerxx_template,$(TEST_INTRA_PRED_SPEED_BIN), \ |
| 482 | $(TEST_INTRA_PRED_SPEED_OBJS) \ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 483 | -L. -laom -lgtest $(extralibs) -lm)) |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 484 | endif # TEST_INTRA_PRED_SPEED |
| 485 | |
James Zern | b0789cd | 2015-05-11 19:04:48 -0700 | [diff] [blame] | 486 | endif # CONFIG_UNIT_TESTS |
James Zern | 7059c1d | 2013-05-31 16:08:09 -0700 | [diff] [blame] | 487 | |
Johann | 0239f11 | 2014-01-08 15:45:14 -0800 | [diff] [blame] | 488 | # Install test sources only if codec source is included |
| 489 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(patsubst $(SRC_PATH_BARE)/%,%,\ |
| 490 | $(shell find $(SRC_PATH_BARE)/third_party/googletest -type f)) |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 491 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(LIBAOM_TEST_SRCS) |
James Zern | 0d2f348 | 2015-05-11 19:36:59 -0700 | [diff] [blame] | 492 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(TEST_INTRA_PRED_SPEED_SRCS) |
Johann | 0239f11 | 2014-01-08 15:45:14 -0800 | [diff] [blame] | 493 | |
James Zern | 7059c1d | 2013-05-31 16:08:09 -0700 | [diff] [blame] | 494 | define test_shard_template |
| 495 | test:: test_shard.$(1) |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 496 | test-no-data-check:: test_shard_ndc.$(1) |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 497 | test_shard.$(1) test_shard_ndc.$(1): $(LIBAOM_TEST_BIN) |
James Zern | 7059c1d | 2013-05-31 16:08:09 -0700 | [diff] [blame] | 498 | @set -e; \ |
James Zern | b0789cd | 2015-05-11 19:04:48 -0700 | [diff] [blame] | 499 | export GTEST_SHARD_INDEX=$(1); \ |
| 500 | export GTEST_TOTAL_SHARDS=$(2); \ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 501 | $(LIBAOM_TEST_BIN) |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 502 | test_shard.$(1): testdata |
James Zern | 7059c1d | 2013-05-31 16:08:09 -0700 | [diff] [blame] | 503 | .PHONY: test_shard.$(1) |
| 504 | endef |
| 505 | |
| 506 | NUM_SHARDS := 10 |
| 507 | SHARDS := 0 1 2 3 4 5 6 7 8 9 |
| 508 | $(foreach s,$(SHARDS),$(eval $(call test_shard_template,$(s),$(NUM_SHARDS)))) |
| 509 | |
James Berry | 07c71ef | 2011-11-04 11:48:30 -0400 | [diff] [blame] | 510 | endif |
| 511 | |
| 512 | ## |
| 513 | ## documentation directives |
| 514 | ## |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 515 | CLEAN-OBJS += libs.doxy |
| 516 | DOCS-yes += libs.doxy |
| 517 | libs.doxy: $(CODEC_DOC_SRCS) |
| 518 | @echo " [CREATE] $@" |
| 519 | @rm -f $@ |
| 520 | @echo "INPUT += $^" >> $@ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 521 | @echo "INCLUDE_PATH += ." >> $@; |
| 522 | @echo "ENABLED_SECTIONS += $(sort $(CODEC_DOC_SECTIONS))" >> $@ |
John Koleszar | e82d261 | 2012-05-16 16:25:51 -0700 | [diff] [blame] | 523 | |
John Koleszar | a9c7597 | 2012-11-08 17:09:30 -0800 | [diff] [blame] | 524 | ## Generate rtcd.h for all objects |
James Zern | aaccf65 | 2015-02-05 19:31:38 -0800 | [diff] [blame] | 525 | ifeq ($(CONFIG_DEPENDENCY_TRACKING),yes) |
John Koleszar | a9c7597 | 2012-11-08 17:09:30 -0800 | [diff] [blame] | 526 | $(OBJS-yes:.o=.d): $(RTCD) |
James Zern | aaccf65 | 2015-02-05 19:31:38 -0800 | [diff] [blame] | 527 | else |
| 528 | $(OBJS-yes): $(RTCD) |
| 529 | endif |
John Koleszar | b72373d | 2012-10-31 13:13:19 -0700 | [diff] [blame] | 530 | |
| 531 | ## Update the global src list |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 532 | SRCS += $(CODEC_SRCS) $(LIBAOM_TEST_SRCS) $(GTEST_SRCS) |
Tom Finegan | 7b7c843 | 2014-04-22 10:38:43 -0700 | [diff] [blame] | 533 | |
| 534 | ## |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 535 | ## aomdec/aomenc tests. |
Tom Finegan | 7b7c843 | 2014-04-22 10:38:43 -0700 | [diff] [blame] | 536 | ## |
| 537 | ifeq ($(CONFIG_UNIT_TESTS),yes) |
| 538 | TEST_BIN_PATH = . |
| 539 | ifeq ($(CONFIG_MSVS),yes) |
| 540 | # MSVC will build both Debug and Release configurations of tools in a |
| 541 | # sub directory named for the current target. Assume the user wants to |
| 542 | # run the Release tools, and assign TEST_BIN_PATH accordingly. |
| 543 | # TODO(tomfinegan): Is this adequate for ARM? |
| 544 | # TODO(tomfinegan): Support running the debug versions of tools? |
| 545 | TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH)) |
| 546 | endif |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 547 | utiltest utiltest-no-data-check: |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 548 | $(qexec)$(SRC_PATH_BARE)/test/aomdec.sh \ |
Yaowu Xu | 97aa09f | 2016-10-12 08:25:39 -0700 | [diff] [blame] | 549 | --test-data-path $(LIBAOM_TEST_DATA_PATH) \ |
Tom Finegan | 7b7c843 | 2014-04-22 10:38:43 -0700 | [diff] [blame] | 550 | --bin-path $(TEST_BIN_PATH) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 551 | $(qexec)$(SRC_PATH_BARE)/test/aomenc.sh \ |
Yaowu Xu | 97aa09f | 2016-10-12 08:25:39 -0700 | [diff] [blame] | 552 | --test-data-path $(LIBAOM_TEST_DATA_PATH) \ |
Tom Finegan | 7b7c843 | 2014-04-22 10:38:43 -0700 | [diff] [blame] | 553 | --bin-path $(TEST_BIN_PATH) |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 554 | utiltest: testdata |
Tom Finegan | 7b7c843 | 2014-04-22 10:38:43 -0700 | [diff] [blame] | 555 | else |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 556 | utiltest utiltest-no-data-check: |
Tom Finegan | 7b7c843 | 2014-04-22 10:38:43 -0700 | [diff] [blame] | 557 | @echo Unit tests must be enabled to make the utiltest target. |
| 558 | endif |
Tom Finegan | bc27d7e | 2014-05-15 21:34:42 -0700 | [diff] [blame] | 559 | |
| 560 | ## |
| 561 | ## Example tests. |
| 562 | ## |
| 563 | ifeq ($(CONFIG_UNIT_TESTS),yes) |
| 564 | # All non-MSVC targets output example targets in a sub dir named examples. |
| 565 | EXAMPLES_BIN_PATH = examples |
| 566 | ifeq ($(CONFIG_MSVS),yes) |
| 567 | # MSVC will build both Debug and Release configurations of the examples in a |
| 568 | # sub directory named for the current target. Assume the user wants to |
| 569 | # run the Release tools, and assign EXAMPLES_BIN_PATH accordingly. |
| 570 | # TODO(tomfinegan): Is this adequate for ARM? |
| 571 | # TODO(tomfinegan): Support running the debug versions of tools? |
| 572 | EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release |
| 573 | endif |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 574 | exampletest exampletest-no-data-check: examples |
Tom Finegan | bc27d7e | 2014-05-15 21:34:42 -0700 | [diff] [blame] | 575 | $(qexec)$(SRC_PATH_BARE)/test/examples.sh \ |
Yaowu Xu | 97aa09f | 2016-10-12 08:25:39 -0700 | [diff] [blame] | 576 | --test-data-path $(LIBAOM_TEST_DATA_PATH) \ |
Tom Finegan | bc27d7e | 2014-05-15 21:34:42 -0700 | [diff] [blame] | 577 | --bin-path $(EXAMPLES_BIN_PATH) |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 578 | exampletest: testdata |
Tom Finegan | bc27d7e | 2014-05-15 21:34:42 -0700 | [diff] [blame] | 579 | else |
James Zern | 557ae51 | 2015-06-19 16:02:28 -0700 | [diff] [blame] | 580 | exampletest exampletest-no-data-check: |
Tom Finegan | bc27d7e | 2014-05-15 21:34:42 -0700 | [diff] [blame] | 581 | @echo Unit tests must be enabled to make the exampletest target. |
| 582 | endif |