John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 1 | ## |
Yaowu Xu | fe24b95 | 2016-09-08 09:57:21 -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 | fe24b95 | 2016-09-08 09:57:21 -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 | |
Yaowu Xu | fe24b95 | 2016-09-08 09:57:21 -0700 | [diff] [blame] | 12 | |
John Koleszar | 7dfec96 | 2012-03-01 12:50:40 -0800 | [diff] [blame] | 13 | LIBYUV_SRCS += third_party/libyuv/include/libyuv/basic_types.h \ |
James Zern | 3a7d467 | 2014-08-10 16:15:18 -0700 | [diff] [blame] | 14 | third_party/libyuv/include/libyuv/convert.h \ |
| 15 | third_party/libyuv/include/libyuv/convert_argb.h \ |
| 16 | third_party/libyuv/include/libyuv/convert_from.h \ |
John Koleszar | 7dfec96 | 2012-03-01 12:50:40 -0800 | [diff] [blame] | 17 | third_party/libyuv/include/libyuv/cpu_id.h \ |
Deb Mukherjee | 47031c0 | 2014-05-16 18:52:01 -0700 | [diff] [blame] | 18 | third_party/libyuv/include/libyuv/planar_functions.h \ |
James Zern | 3a7d467 | 2014-08-10 16:15:18 -0700 | [diff] [blame] | 19 | third_party/libyuv/include/libyuv/rotate.h \ |
Deb Mukherjee | 47031c0 | 2014-05-16 18:52:01 -0700 | [diff] [blame] | 20 | third_party/libyuv/include/libyuv/row.h \ |
John Koleszar | 7dfec96 | 2012-03-01 12:50:40 -0800 | [diff] [blame] | 21 | third_party/libyuv/include/libyuv/scale.h \ |
Deb Mukherjee | 47031c0 | 2014-05-16 18:52:01 -0700 | [diff] [blame] | 22 | third_party/libyuv/include/libyuv/scale_row.h \ |
| 23 | third_party/libyuv/source/cpu_id.cc \ |
| 24 | third_party/libyuv/source/planar_functions.cc \ |
| 25 | third_party/libyuv/source/row_any.cc \ |
| 26 | third_party/libyuv/source/row_common.cc \ |
James Zern | fcb4253 | 2015-07-24 16:54:51 -0700 | [diff] [blame] | 27 | third_party/libyuv/source/row_gcc.cc \ |
Deb Mukherjee | 47031c0 | 2014-05-16 18:52:01 -0700 | [diff] [blame] | 28 | third_party/libyuv/source/row_mips.cc \ |
| 29 | third_party/libyuv/source/row_neon.cc \ |
James Zern | 3a7d467 | 2014-08-10 16:15:18 -0700 | [diff] [blame] | 30 | third_party/libyuv/source/row_neon64.cc \ |
Deb Mukherjee | 47031c0 | 2014-05-16 18:52:01 -0700 | [diff] [blame] | 31 | third_party/libyuv/source/row_win.cc \ |
James Zern | 3a7d467 | 2014-08-10 16:15:18 -0700 | [diff] [blame] | 32 | third_party/libyuv/source/scale.cc \ |
James Zern | fcb4253 | 2015-07-24 16:54:51 -0700 | [diff] [blame] | 33 | third_party/libyuv/source/scale_any.cc \ |
Deb Mukherjee | 47031c0 | 2014-05-16 18:52:01 -0700 | [diff] [blame] | 34 | third_party/libyuv/source/scale_common.cc \ |
James Zern | fcb4253 | 2015-07-24 16:54:51 -0700 | [diff] [blame] | 35 | third_party/libyuv/source/scale_gcc.cc \ |
Deb Mukherjee | 47031c0 | 2014-05-16 18:52:01 -0700 | [diff] [blame] | 36 | third_party/libyuv/source/scale_mips.cc \ |
| 37 | third_party/libyuv/source/scale_neon.cc \ |
James Zern | 2f5e0fa | 2014-08-22 18:16:44 -0700 | [diff] [blame] | 38 | third_party/libyuv/source/scale_neon64.cc \ |
James Zern | 3a7d467 | 2014-08-10 16:15:18 -0700 | [diff] [blame] | 39 | third_party/libyuv/source/scale_win.cc \ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 40 | |
Tom Finegan | 4317ba5 | 2016-03-24 13:12:51 -0700 | [diff] [blame] | 41 | LIBWEBM_COMMON_SRCS += third_party/libwebm/common/hdr_util.cc \ |
| 42 | third_party/libwebm/common/hdr_util.h \ |
| 43 | third_party/libwebm/common/webmids.h |
Vignesh Venkatasubramanian | dd55107 | 2015-09-10 11:02:40 -0700 | [diff] [blame] | 44 | |
Tom Finegan | 4317ba5 | 2016-03-24 13:12:51 -0700 | [diff] [blame] | 45 | LIBWEBM_MUXER_SRCS += third_party/libwebm/mkvmuxer/mkvmuxer.cc \ |
| 46 | third_party/libwebm/mkvmuxer/mkvmuxerutil.cc \ |
| 47 | third_party/libwebm/mkvmuxer/mkvwriter.cc \ |
| 48 | third_party/libwebm/mkvmuxer/mkvmuxer.h \ |
| 49 | third_party/libwebm/mkvmuxer/mkvmuxertypes.h \ |
| 50 | third_party/libwebm/mkvmuxer/mkvmuxerutil.h \ |
| 51 | third_party/libwebm/mkvparser/mkvparser.h \ |
| 52 | third_party/libwebm/mkvmuxer/mkvwriter.h |
Vignesh Venkatasubramanian | 2dcbf8c | 2014-03-19 11:56:02 -0700 | [diff] [blame] | 53 | |
Tom Finegan | 4317ba5 | 2016-03-24 13:12:51 -0700 | [diff] [blame] | 54 | LIBWEBM_PARSER_SRCS = third_party/libwebm/mkvparser/mkvparser.cc \ |
| 55 | third_party/libwebm/mkvparser/mkvreader.cc \ |
| 56 | third_party/libwebm/mkvparser/mkvparser.h \ |
| 57 | third_party/libwebm/mkvparser/mkvreader.h |
| 58 | |
| 59 | # Add compile flags and include path for libwebm sources. |
| 60 | ifeq ($(CONFIG_WEBM_IO),yes) |
| 61 | CXXFLAGS += -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS |
| 62 | INC_PATH-yes += $(SRC_PATH_BARE)/third_party/libwebm |
| 63 | endif |
| 64 | |
James Zern | 77bbcab | 2014-02-05 16:55:01 -0800 | [diff] [blame] | 65 | # List of examples to build. UTILS are tools meant for distribution |
| 66 | # while EXAMPLES demonstrate specific portions of the API. |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 67 | UTILS-$(CONFIG_AV1_DECODER) += aomdec.c |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 68 | aomdec.SRCS += md5_utils.c md5_utils.h |
| 69 | aomdec.SRCS += aom_ports/mem_ops.h |
| 70 | aomdec.SRCS += aom_ports/mem_ops_aligned.h |
| 71 | aomdec.SRCS += aom_ports/msvc.h |
| 72 | aomdec.SRCS += aom_ports/aom_timer.h |
| 73 | aomdec.SRCS += aom/aom_integer.h |
| 74 | aomdec.SRCS += args.c args.h |
| 75 | aomdec.SRCS += ivfdec.c ivfdec.h |
| 76 | aomdec.SRCS += tools_common.c tools_common.h |
| 77 | aomdec.SRCS += y4menc.c y4menc.h |
Deb Mukherjee | 47031c0 | 2014-05-16 18:52:01 -0700 | [diff] [blame] | 78 | ifeq ($(CONFIG_LIBYUV),yes) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 79 | aomdec.SRCS += $(LIBYUV_SRCS) |
Deb Mukherjee | 47031c0 | 2014-05-16 18:52:01 -0700 | [diff] [blame] | 80 | endif |
Vignesh Venkatasubramanian | 0ffa383 | 2014-03-14 08:10:35 -0700 | [diff] [blame] | 81 | ifeq ($(CONFIG_WEBM_IO),yes) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 82 | aomdec.SRCS += $(LIBWEBM_COMMON_SRCS) |
| 83 | aomdec.SRCS += $(LIBWEBM_MUXER_SRCS) |
| 84 | aomdec.SRCS += $(LIBWEBM_PARSER_SRCS) |
| 85 | aomdec.SRCS += webmdec.cc webmdec.h |
Vignesh Venkatasubramanian | 0ffa383 | 2014-03-14 08:10:35 -0700 | [diff] [blame] | 86 | endif |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 87 | aomdec.GUID = BA5FE66F-38DD-E034-F542-B1578C5FB950 |
| 88 | aomdec.DESCRIPTION = Full featured decoder |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 89 | UTILS-$(CONFIG_AV1_ENCODER) += aomenc.c |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 90 | aomenc.SRCS += args.c args.h y4minput.c y4minput.h aomenc.h |
| 91 | aomenc.SRCS += ivfdec.c ivfdec.h |
| 92 | aomenc.SRCS += ivfenc.c ivfenc.h |
| 93 | aomenc.SRCS += rate_hist.c rate_hist.h |
| 94 | aomenc.SRCS += tools_common.c tools_common.h |
Urvang Joshi | 09c293e | 2017-04-20 17:56:27 -0700 | [diff] [blame] | 95 | aomenc.SRCS += examples/encoder_util.h examples/encoder_util.c |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 96 | aomenc.SRCS += warnings.c warnings.h |
| 97 | aomenc.SRCS += aom_ports/mem_ops.h |
| 98 | aomenc.SRCS += aom_ports/mem_ops_aligned.h |
| 99 | aomenc.SRCS += aom_ports/msvc.h |
| 100 | aomenc.SRCS += aom_ports/aom_timer.h |
| 101 | aomenc.SRCS += aomstats.c aomstats.h |
Deb Mukherjee | 47031c0 | 2014-05-16 18:52:01 -0700 | [diff] [blame] | 102 | ifeq ($(CONFIG_LIBYUV),yes) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 103 | aomenc.SRCS += $(LIBYUV_SRCS) |
Deb Mukherjee | 47031c0 | 2014-05-16 18:52:01 -0700 | [diff] [blame] | 104 | endif |
Vignesh Venkatasubramanian | 0ffa383 | 2014-03-14 08:10:35 -0700 | [diff] [blame] | 105 | ifeq ($(CONFIG_WEBM_IO),yes) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 106 | aomenc.SRCS += $(LIBWEBM_COMMON_SRCS) |
| 107 | aomenc.SRCS += $(LIBWEBM_MUXER_SRCS) |
| 108 | aomenc.SRCS += $(LIBWEBM_PARSER_SRCS) |
| 109 | aomenc.SRCS += webmenc.cc webmenc.h |
Vignesh Venkatasubramanian | 0ffa383 | 2014-03-14 08:10:35 -0700 | [diff] [blame] | 110 | endif |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 111 | aomenc.GUID = 548DEC74-7A15-4B2B-AFC3-AA102E7C25C1 |
| 112 | aomenc.DESCRIPTION = Full featured encoder |
John Koleszar | ea68ee0 | 2010-10-21 15:02:10 -0400 | [diff] [blame] | 113 | |
Nathan E. Egge | 1a0d5ea | 2017-02-22 11:17:00 -0500 | [diff] [blame] | 114 | ifeq ($(CONFIG_ANALYZER),yes) |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 115 | EXAMPLES-$(CONFIG_AV1_DECODER) += analyzer.cc |
Nathan E. Egge | 1a0d5ea | 2017-02-22 11:17:00 -0500 | [diff] [blame] | 116 | analyzer.GUID = 83827a8c-e3c3-4b19-8832-0cfc206c4496 |
| 117 | analyzer.SRCS += ivfdec.h ivfdec.c |
| 118 | analyzer.SRCS += av1/decoder/inspection.h |
| 119 | analyzer.SRCS += av1/decoder/inspection.c |
| 120 | analyzer.SRCS += video_reader.h video_reader.c |
| 121 | analyzer.SRCS += tools_common.h tools_common.c |
| 122 | analyzer.DESCRIPTION = Bitstream analyzer |
| 123 | endif |
| 124 | |
Michael Bebenita | f4f27fe | 2017-03-02 17:40:44 -0800 | [diff] [blame] | 125 | ifeq ($(CONFIG_INSPECTION),yes) |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 126 | EXAMPLES-$(CONFIG_AV1_DECODER) += inspect.c |
| 127 | inspect.GUID = FA46A420-3356-441F-B0FD-60AA1345C181 |
| 128 | inspect.SRCS += ivfdec.h ivfdec.c |
| 129 | inspect.SRCS += args.c args.h |
| 130 | inspect.SRCS += tools_common.h tools_common.c |
| 131 | inspect.SRCS += video_common.h |
| 132 | inspect.SRCS += video_reader.h video_reader.c |
| 133 | inspect.SRCS += aom_ports/mem_ops.h |
| 134 | inspect.SRCS += aom_ports/mem_ops_aligned.h |
| 135 | inspect.SRCS += aom_ports/msvc.h |
| 136 | inspect.DESCRIPTION = Dump inspection data |
Michael Bebenita | f4f27fe | 2017-03-02 17:40:44 -0800 | [diff] [blame] | 137 | endif |
| 138 | |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 139 | EXAMPLES-$(CONFIG_AV1_DECODER) += simple_decoder.c |
James Zern | 77bbcab | 2014-02-05 16:55:01 -0800 | [diff] [blame] | 140 | simple_decoder.GUID = D3BBF1E9-2427-450D-BBFF-B2843C1D44CC |
Dmitry Kovalev | 7ec2769 | 2014-01-27 13:40:29 -0800 | [diff] [blame] | 141 | simple_decoder.SRCS += ivfdec.h ivfdec.c |
| 142 | simple_decoder.SRCS += tools_common.h tools_common.c |
Dmitry Kovalev | 37e6fd3 | 2014-02-05 18:34:46 -0800 | [diff] [blame] | 143 | simple_decoder.SRCS += video_common.h |
| 144 | simple_decoder.SRCS += video_reader.h video_reader.c |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 145 | simple_decoder.SRCS += aom_ports/mem_ops.h |
| 146 | simple_decoder.SRCS += aom_ports/mem_ops_aligned.h |
| 147 | simple_decoder.SRCS += aom_ports/msvc.h |
James Zern | 77bbcab | 2014-02-05 16:55:01 -0800 | [diff] [blame] | 148 | simple_decoder.DESCRIPTION = Simplified decoder loop |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 149 | EXAMPLES-$(CONFIG_AV1_DECODER) += decode_to_md5.c |
Dmitry Kovalev | c2b3368 | 2014-01-24 11:20:09 -0800 | [diff] [blame] | 150 | decode_to_md5.SRCS += md5_utils.h md5_utils.c |
| 151 | decode_to_md5.SRCS += ivfdec.h ivfdec.c |
| 152 | decode_to_md5.SRCS += tools_common.h tools_common.c |
Dmitry Kovalev | 37e6fd3 | 2014-02-05 18:34:46 -0800 | [diff] [blame] | 153 | decode_to_md5.SRCS += video_common.h |
| 154 | decode_to_md5.SRCS += video_reader.h video_reader.c |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 155 | decode_to_md5.SRCS += aom_ports/mem_ops.h |
| 156 | decode_to_md5.SRCS += aom_ports/mem_ops_aligned.h |
| 157 | decode_to_md5.SRCS += aom_ports/msvc.h |
James Zern | 77bbcab | 2014-02-05 16:55:01 -0800 | [diff] [blame] | 158 | decode_to_md5.GUID = 59120B9B-2735-4BFE-B022-146CA340FE42 |
| 159 | decode_to_md5.DESCRIPTION = Frame by frame MD5 checksum |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 160 | EXAMPLES-$(CONFIG_AV1_ENCODER) += simple_encoder.c |
Dmitry Kovalev | 37e6fd3 | 2014-02-05 18:34:46 -0800 | [diff] [blame] | 161 | simple_encoder.SRCS += ivfenc.h ivfenc.c |
| 162 | simple_encoder.SRCS += tools_common.h tools_common.c |
| 163 | simple_encoder.SRCS += video_common.h |
| 164 | simple_encoder.SRCS += video_writer.h video_writer.c |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 165 | simple_encoder.SRCS += aom_ports/msvc.h |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 166 | simple_encoder.GUID = 4607D299-8A71-4D2C-9B1D-071899B6FBFD |
| 167 | simple_encoder.DESCRIPTION = Simplified encoder loop |
Yaowu Xu | def1a3d | 2016-09-23 15:37:46 -0700 | [diff] [blame] | 168 | EXAMPLES-$(CONFIG_AV1_ENCODER) += lossless_encoder.c |
Yaowu Xu | 5eee907 | 2016-07-28 11:51:48 -0700 | [diff] [blame] | 169 | lossless_encoder.SRCS += ivfenc.h ivfenc.c |
| 170 | lossless_encoder.SRCS += tools_common.h tools_common.c |
| 171 | lossless_encoder.SRCS += video_common.h |
| 172 | lossless_encoder.SRCS += video_writer.h video_writer.c |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 173 | lossless_encoder.SRCS += aom_ports/msvc.h |
Yaowu Xu | 5eee907 | 2016-07-28 11:51:48 -0700 | [diff] [blame] | 174 | lossless_encoder.GUID = B63C7C88-5348-46DC-A5A6-CC151EF93366 |
Yaowu Xu | a3cff08 | 2016-08-03 11:33:39 -0700 | [diff] [blame] | 175 | lossless_encoder.DESCRIPTION = Simplified lossless encoder |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 176 | EXAMPLES-$(CONFIG_AV1_ENCODER) += twopass_encoder.c |
Dmitry Kovalev | 592936b | 2014-02-07 11:37:39 -0800 | [diff] [blame] | 177 | twopass_encoder.SRCS += ivfenc.h ivfenc.c |
| 178 | twopass_encoder.SRCS += tools_common.h tools_common.c |
| 179 | twopass_encoder.SRCS += video_common.h |
| 180 | twopass_encoder.SRCS += video_writer.h video_writer.c |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 181 | twopass_encoder.SRCS += aom_ports/msvc.h |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 182 | twopass_encoder.GUID = 73494FA6-4AF9-4763-8FBB-265C92402FD8 |
| 183 | twopass_encoder.DESCRIPTION = Two-pass encoder loop |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 184 | EXAMPLES-$(CONFIG_AV1_DECODER) += decode_with_drops.c |
James Zern | 77bbcab | 2014-02-05 16:55:01 -0800 | [diff] [blame] | 185 | decode_with_drops.SRCS += ivfdec.h ivfdec.c |
| 186 | decode_with_drops.SRCS += tools_common.h tools_common.c |
Dmitry Kovalev | 37e6fd3 | 2014-02-05 18:34:46 -0800 | [diff] [blame] | 187 | decode_with_drops.SRCS += video_common.h |
| 188 | decode_with_drops.SRCS += video_reader.h video_reader.c |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 189 | decode_with_drops.SRCS += aom_ports/mem_ops.h |
| 190 | decode_with_drops.SRCS += aom_ports/mem_ops_aligned.h |
| 191 | decode_with_drops.SRCS += aom_ports/msvc.h |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 192 | decode_with_drops.GUID = CE5C53C4-8DDA-438A-86ED-0DDD3CDB8D26 |
| 193 | decode_with_drops.DESCRIPTION = Drops frames while decoding |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 194 | EXAMPLES-$(CONFIG_AV1_ENCODER) += set_maps.c |
Alex Converse | 61ecd7f | 2014-03-10 16:13:49 -0700 | [diff] [blame] | 195 | set_maps.SRCS += ivfenc.h ivfenc.c |
| 196 | set_maps.SRCS += tools_common.h tools_common.c |
| 197 | set_maps.SRCS += video_common.h |
| 198 | set_maps.SRCS += video_writer.h video_writer.c |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 199 | set_maps.SRCS += aom_ports/msvc.h |
Alex Converse | 61ecd7f | 2014-03-10 16:13:49 -0700 | [diff] [blame] | 200 | set_maps.GUID = ECB2D24D-98B8-4015-A465-A4AF3DCC145F |
| 201 | set_maps.DESCRIPTION = Set active and ROI maps |
Ryan Overbeck | a5fefa7 | 2017-09-19 11:39:10 -0700 | [diff] [blame] | 202 | ifeq ($(CONFIG_EXT_TILE),yes) |
| 203 | EXAMPLES-$(CONFIG_AV1_ENCODER) += lightfield_encoder.c |
| 204 | lightfield_encoder.SRCS += ivfenc.h ivfenc.c |
| 205 | lightfield_encoder.SRCS += tools_common.h tools_common.c |
| 206 | lightfield_encoder.SRCS += video_common.h |
| 207 | lightfield_encoder.SRCS += video_writer.h video_writer.c |
| 208 | lightfield_encoder.SRCS += aom_ports/msvc.h |
| 209 | lightfield_encoder.GUID = 73494FA6-4AF9-4763-8FBB-265C92402FD8 |
| 210 | lightfield_encoder.DESCRIPTION = Lightfield encoder loop |
| 211 | EXAMPLES-$(CONFIG_AV1_DECODER) += lightfield_decoder.c |
| 212 | lightfield_decoder.SRCS += ivfdec.h ivfdec.c |
| 213 | lightfield_decoder.SRCS += tools_common.h tools_common.c |
| 214 | lightfield_decoder.SRCS += video_common.h |
| 215 | lightfield_decoder.SRCS += video_reader.h video_reader.c |
| 216 | lightfield_decoder.SRCS += aom_ports/mem_ops.h |
| 217 | lightfield_decoder.SRCS += aom_ports/mem_ops_aligned.h |
| 218 | lightfield_decoder.SRCS += aom_ports/msvc.h |
| 219 | lightfield_decoder.GUID = D3BBF1E9-2427-450D-BBFF-B2843C1D44CC |
| 220 | lightfield_decoder.DESCRIPTION = lightfield decoder loop |
| 221 | endif |
Tom Finegan | 378d652 | 2017-05-22 13:04:56 -0700 | [diff] [blame] | 222 | ifeq ($(CONFIG_AV1_ENCODER),yes) |
| 223 | ifeq ($(CONFIG_AV1_DECODER),yes) |
| 224 | EXAMPLES-$(CONFIG_AV1_ENCODER) += aom_cx_set_ref.c |
Yaowu Xu | fe24b95 | 2016-09-08 09:57:21 -0700 | [diff] [blame] | 225 | aom_cx_set_ref.SRCS += ivfenc.h ivfenc.c |
| 226 | aom_cx_set_ref.SRCS += tools_common.h tools_common.c |
Urvang Joshi | 09c293e | 2017-04-20 17:56:27 -0700 | [diff] [blame] | 227 | aom_cx_set_ref.SRCS += examples/encoder_util.h |
| 228 | aom_cx_set_ref.SRCS += examples/encoder_util.c |
Yaowu Xu | fe24b95 | 2016-09-08 09:57:21 -0700 | [diff] [blame] | 229 | aom_cx_set_ref.SRCS += video_common.h |
| 230 | aom_cx_set_ref.SRCS += video_writer.h video_writer.c |
| 231 | aom_cx_set_ref.SRCS += aom_ports/msvc.h |
| 232 | aom_cx_set_ref.GUID = C5E31F7F-96F6-48BD-BD3E-10EBF6E8057A |
| 233 | aom_cx_set_ref.DESCRIPTION = AV1 set encoder reference frame |
Yunqing Wang | 9aaa3c9 | 2016-03-25 11:57:20 -0700 | [diff] [blame] | 234 | endif |
| 235 | endif |
Dmitry Kovalev | 98254a4 | 2014-01-17 16:56:04 -0800 | [diff] [blame] | 236 | |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 237 | # Handle extra library flags depending on codec configuration |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 238 | |
Tero Rintaluoma | 11a222f | 2011-01-24 11:21:40 +0200 | [diff] [blame] | 239 | # We should not link to math library (libm) on RVCT |
| 240 | # when building for bare-metal targets |
| 241 | ifeq ($(CONFIG_OS_SUPPORT), yes) |
Yaowu Xu | fe24b95 | 2016-09-08 09:57:21 -0700 | [diff] [blame] | 242 | CODEC_EXTRA_LIBS-$(CONFIG_AV1) += m |
Tero Rintaluoma | 11a222f | 2011-01-24 11:21:40 +0200 | [diff] [blame] | 243 | else |
| 244 | ifeq ($(CONFIG_GCC), yes) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 245 | CODEC_EXTRA_LIBS-$(CONFIG_AV1) += m |
Tero Rintaluoma | 11a222f | 2011-01-24 11:21:40 +0200 | [diff] [blame] | 246 | endif |
| 247 | endif |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 248 | # |
| 249 | # End of specified files. The rest of the build rules should happen |
| 250 | # automagically from here. |
| 251 | # |
| 252 | |
| 253 | |
| 254 | # Examples need different flags based on whether we're building |
| 255 | # from an installed tree or a version controlled tree. Determine |
| 256 | # the proper paths. |
| 257 | ifeq ($(HAVE_ALT_TREE_LAYOUT),yes) |
James Zern | 3a7d467 | 2014-08-10 16:15:18 -0700 | [diff] [blame] | 258 | LIB_PATH-yes := $(SRC_PATH_BARE)/../lib |
| 259 | INC_PATH-yes := $(SRC_PATH_BARE)/../include |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 260 | else |
| 261 | LIB_PATH-yes += $(if $(BUILD_PFX),$(BUILD_PFX),.) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 262 | INC_PATH-$(CONFIG_AV1_DECODER) += $(SRC_PATH_BARE)/av1 |
| 263 | INC_PATH-$(CONFIG_AV1_ENCODER) += $(SRC_PATH_BARE)/av1 |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 264 | endif |
James Zern | 3a7d467 | 2014-08-10 16:15:18 -0700 | [diff] [blame] | 265 | INC_PATH-$(CONFIG_LIBYUV) += $(SRC_PATH_BARE)/third_party/libyuv/include |
| 266 | LIB_PATH := $(call enabled,LIB_PATH) |
| 267 | INC_PATH := $(call enabled,INC_PATH) |
Ronald S. Bultje | bbf890f | 2011-05-02 13:56:41 -0400 | [diff] [blame] | 268 | INTERNAL_CFLAGS = $(addprefix -I,$(INC_PATH)) |
| 269 | INTERNAL_LDFLAGS += $(addprefix -L,$(LIB_PATH)) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 270 | |
| 271 | |
| 272 | # Expand list of selected examples to build (as specified above) |
| 273 | UTILS = $(call enabled,UTILS) |
James Zern | 77bbcab | 2014-02-05 16:55:01 -0800 | [diff] [blame] | 274 | EXAMPLES = $(addprefix examples/,$(call enabled,EXAMPLES)) |
| 275 | ALL_EXAMPLES = $(UTILS) $(EXAMPLES) |
Tom Finegan | 252453b | 2017-03-07 14:20:11 -0800 | [diff] [blame] | 276 | UTIL_SRCS = $(foreach ex,$(UTILS),$($(ex:.c=).SRCS) $($(ex:.cc=).SRCS)) |
| 277 | ALL_SRCS = $(foreach ex, $(ALL_EXAMPLES), \ |
| 278 | $($(notdir $(ex:.c=)).SRCS) \ |
| 279 | $($(notdir $(ex:.cc=)).SRCS)) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 280 | CODEC_EXTRA_LIBS=$(sort $(call enabled,CODEC_EXTRA_LIBS)) |
| 281 | |
| 282 | |
| 283 | # Expand all example sources into a variable containing all sources |
James Zern | 77bbcab | 2014-02-05 16:55:01 -0800 | [diff] [blame] | 284 | # for that example (not just them main one specified in UTILS/EXAMPLES) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 285 | # and add this file to the list (for MSVS workspace generation) |
Tom Finegan | 252453b | 2017-03-07 14:20:11 -0800 | [diff] [blame] | 286 | EXAMPLES_C = $(filter-out %.cc, $(ALL_EXAMPLES)) |
| 287 | $(foreach ex,$(EXAMPLES_C), \ |
| 288 | $(eval $(notdir $(ex:.c=)).SRCS += $(ex) examples.mk)) |
| 289 | EXAMPLES_CXX = $(filter-out %.c, $(ALL_EXAMPLES)) |
| 290 | $(foreach ex,$(EXAMPLES_CXX), \ |
| 291 | $(eval $(notdir $(ex:.cc=)).SRCS += $(ex) examples.mk)) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 292 | |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 293 | # Create build/install dependencies for all examples. The common case |
| 294 | # is handled here. The MSVS case is handled below. |
| 295 | NOT_MSVS = $(if $(CONFIG_MSVS),,yes) |
Tom Finegan | 252453b | 2017-03-07 14:20:11 -0800 | [diff] [blame] | 296 | DIST-BINS-$(NOT_MSVS) += $(addprefix bin/,$(EXAMPLES_C:.c=$(EXE_SFX))) |
| 297 | DIST-BINS-$(NOT_MSVS) += $(addprefix bin/,$(EXAMPLES_CXX:.cc=$(EXE_SFX))) |
KO Myung-Hun | 2dad8d6 | 2012-02-03 13:31:11 +0900 | [diff] [blame] | 298 | INSTALL-BINS-$(NOT_MSVS) += $(addprefix bin/,$(UTILS:.c=$(EXE_SFX))) |
John Koleszar | ee8bcb1 | 2010-05-24 10:16:44 -0400 | [diff] [blame] | 299 | DIST-SRCS-yes += $(ALL_SRCS) |
| 300 | INSTALL-SRCS-yes += $(UTIL_SRCS) |
Tom Finegan | 3d7063d | 2015-05-12 15:33:40 -0700 | [diff] [blame] | 301 | OBJS-$(NOT_MSVS) += $(call objs,$(ALL_SRCS)) |
Tom Finegan | 252453b | 2017-03-07 14:20:11 -0800 | [diff] [blame] | 302 | BINS-$(NOT_MSVS) += $(addprefix $(BUILD_PFX), \ |
| 303 | $(EXAMPLES_C:.c=$(EXE_SFX))) |
| 304 | BINS-$(NOT_MSVS) += $(addprefix $(BUILD_PFX), \ |
| 305 | $(EXAMPLES_CXX:.cc=$(EXE_SFX))) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 306 | |
| 307 | # Instantiate linker template for all examples. |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 308 | CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),aom_g,aom) |
KO Myung-Hun | 6d52fe2 | 2014-08-08 13:13:02 +0900 | [diff] [blame] | 309 | ifneq ($(filter darwin%,$(TGT_OS)),) |
| 310 | SHARED_LIB_SUF=.dylib |
| 311 | else |
| 312 | ifneq ($(filter os2%,$(TGT_OS)),) |
| 313 | SHARED_LIB_SUF=_dll.a |
| 314 | else |
| 315 | SHARED_LIB_SUF=.so |
| 316 | endif |
| 317 | endif |
jimbankoski | 45e551b | 2012-07-25 19:39:33 -0700 | [diff] [blame] | 318 | CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 319 | $(foreach bin,$(BINS-yes),\ |
Tom Finegan | 3d7063d | 2015-05-12 15:33:40 -0700 | [diff] [blame] | 320 | $(eval $(bin):$(LIB_PATH)/lib$(CODEC_LIB)$(CODEC_LIB_SUF))\ |
| 321 | $(eval $(call linker_template,$(bin),\ |
KO Myung-Hun | 2dad8d6 | 2012-02-03 13:31:11 +0900 | [diff] [blame] | 322 | $(call objs,$($(notdir $(bin:$(EXE_SFX)=)).SRCS)) \ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 323 | -l$(CODEC_LIB) $(addprefix -l,$(CODEC_EXTRA_LIBS))\ |
Tom Finegan | 3d7063d | 2015-05-12 15:33:40 -0700 | [diff] [blame] | 324 | ))) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 325 | |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 326 | # The following pairs define a mapping of locations in the distribution |
| 327 | # tree to locations in the source/build trees. |
| 328 | INSTALL_MAPS += src/%.c %.c |
| 329 | INSTALL_MAPS += src/% $(SRC_PATH_BARE)/% |
| 330 | INSTALL_MAPS += bin/% % |
| 331 | INSTALL_MAPS += % % |
| 332 | |
| 333 | |
| 334 | # Set up additional MSVS environment |
| 335 | ifeq ($(CONFIG_MSVS),yes) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 336 | CODEC_LIB=$(if $(CONFIG_SHARED),aom,$(if $(CONFIG_STATIC_MSVCRT),aommt,aommd)) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 337 | # This variable uses deferred expansion intentionally, since the results of |
| 338 | # $(wildcard) may change during the course of the Make. |
| 339 | VS_PLATFORMS = $(foreach d,$(wildcard */Release/$(CODEC_LIB).lib),$(word 1,$(subst /, ,$(d)))) |
| 340 | INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),bin/$(p)/% $(p)/Release/%) |
| 341 | endif |
| 342 | |
| 343 | # Build Visual Studio Projects. We use a template here to instantiate |
| 344 | # explicit rules rather than using an implicit rule because we want to |
| 345 | # leverage make's VPATH searching rather than specifying the paths on |
| 346 | # each file in ALL_EXAMPLES. This has the unfortunate side effect that |
| 347 | # touching the source files trigger a rebuild of the project files |
| 348 | # even though there is no real dependency there (the dependency is on |
| 349 | # the makefiles). We may want to revisit this. |
| 350 | define vcproj_template |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 351 | $(1): $($(1:.$(VCPROJ_SFX)=).SRCS) aom.$(VCPROJ_SFX) |
James Zern | a2746d7 | 2015-08-03 16:24:24 -0700 | [diff] [blame] | 352 | $(if $(quiet),@echo " [vcproj] $$@") |
| 353 | $(qexec)$$(GEN_VCPROJ)\ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 354 | --exe\ |
| 355 | --target=$$(TOOLCHAIN)\ |
Martin Storsjo | 0b4637e | 2013-05-17 00:56:46 +0300 | [diff] [blame] | 356 | --name=$$(@:.$(VCPROJ_SFX)=)\ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 357 | --ver=$$(CONFIG_VS_VERSION)\ |
Martin Storsjo | 0b4637e | 2013-05-17 00:56:46 +0300 | [diff] [blame] | 358 | --proj-guid=$$($$(@:.$(VCPROJ_SFX)=).GUID)\ |
James Zern | f66590c | 2014-06-02 16:42:14 -0700 | [diff] [blame] | 359 | --src-path-bare="$(SRC_PATH_BARE)" \ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 360 | $$(if $$(CONFIG_STATIC_MSVCRT),--static-crt) \ |
Ronald S. Bultje | bbf890f | 2011-05-02 13:56:41 -0400 | [diff] [blame] | 361 | --out=$$@ $$(INTERNAL_CFLAGS) $$(CFLAGS) \ |
Martin Storsjo | a37e84d | 2013-05-19 12:21:29 +0300 | [diff] [blame] | 362 | $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -l$$(CODEC_LIB) $$^ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 363 | endef |
James Zern | 77bbcab | 2014-02-05 16:55:01 -0800 | [diff] [blame] | 364 | ALL_EXAMPLES_BASENAME := $(notdir $(ALL_EXAMPLES)) |
| 365 | PROJECTS-$(CONFIG_MSVS) += $(ALL_EXAMPLES_BASENAME:.c=.$(VCPROJ_SFX)) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 366 | INSTALL-BINS-$(CONFIG_MSVS) += $(foreach p,$(VS_PLATFORMS),\ |
James Zern | 77bbcab | 2014-02-05 16:55:01 -0800 | [diff] [blame] | 367 | $(addprefix bin/$(p)/,$(ALL_EXAMPLES_BASENAME:.c=.exe))) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 368 | $(foreach proj,$(call enabled,PROJECTS),\ |
| 369 | $(eval $(call vcproj_template,$(proj)))) |
James Zern | 354c566 | 2014-02-14 19:38:20 -0800 | [diff] [blame] | 370 | |
| 371 | # |
| 372 | # Documentation Rules |
| 373 | # |
| 374 | %.dox: %.c |
| 375 | @echo " [DOXY] $@" |
James Zern | aaccf65 | 2015-02-05 19:31:38 -0800 | [diff] [blame] | 376 | @mkdir -p $(dir $@) |
James Zern | 354c566 | 2014-02-14 19:38:20 -0800 | [diff] [blame] | 377 | @echo "/*!\page example_$(@F:.dox=) $(@F:.dox=)" > $@ |
| 378 | @echo " \includelineno $(<F)" >> $@ |
| 379 | @echo "*/" >> $@ |
| 380 | |
| 381 | samples.dox: examples.mk |
| 382 | @echo " [DOXY] $@" |
| 383 | @echo "/*!\page samples Sample Code" > $@ |
| 384 | @echo " This SDK includes a number of sample applications."\ |
| 385 | "Each sample documents a feature of the SDK in both prose"\ |
| 386 | "and the associated C code."\ |
| 387 | "The following samples are included: ">>$@ |
| 388 | @$(foreach ex,$(sort $(notdir $(EXAMPLES:.c=))),\ |
| 389 | echo " - \subpage example_$(ex) $($(ex).DESCRIPTION)" >> $@;) |
| 390 | @echo >> $@ |
| 391 | @echo " In addition, the SDK contains a number of utilities."\ |
| 392 | "Since these utilities are built upon the concepts described"\ |
| 393 | "in the sample code listed above, they are not documented in"\ |
| 394 | "pieces like the samples are. Their source is included here"\ |
| 395 | "for reference. The following utilities are included:" >> $@ |
| 396 | @$(foreach ex,$(sort $(UTILS:.c=)),\ |
| 397 | echo " - \subpage example_$(ex) $($(ex).DESCRIPTION)" >> $@;) |
| 398 | @echo "*/" >> $@ |
| 399 | |
| 400 | CLEAN-OBJS += examples.doxy samples.dox $(ALL_EXAMPLES:.c=.dox) |
| 401 | DOCS-yes += examples.doxy samples.dox |
| 402 | examples.doxy: samples.dox $(ALL_EXAMPLES:.c=.dox) |
| 403 | @echo "INPUT += $^" > $@ |