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