cmake: Output aom_config in config sub dir.

Does away with somewhat confusing usage of "./aom_config.h" in
include statements while keeping linters silent.

aom_config.asm, aom_config.c, and aom_config.h are now written to
the config sub dir.

Change-Id: I99e2422d6ca8b20b9cdf2feee83a866c273e47b0
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 570fa17..0afaf5d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -140,8 +140,8 @@
             "${AOM_ROOT}/third_party/libyuv/source/scale_win.cc")
 
 list(APPEND AOM_SOURCES
-            "${AOM_CONFIG_DIR}/aom_config.c"
-            "${AOM_CONFIG_DIR}/aom_config.h"
+            "${AOM_CONFIG_DIR}/config/aom_config.c"
+            "${AOM_CONFIG_DIR}/config/aom_config.h"
             "${AOM_ROOT}/aom/aom.h"
             "${AOM_ROOT}/aom/aom_codec.h"
             "${AOM_ROOT}/aom/aom_decoder.h"
diff --git a/aom/src/aom_codec.c b/aom/src/aom_codec.c
index dbd6fa5..66df063 100644
--- a/aom/src/aom_codec.c
+++ b/aom/src/aom_codec.c
@@ -16,7 +16,8 @@
 #include <stdarg.h>
 #include <stdlib.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 #include "aom/internal/aom_codec_internal.h"
 #include "aom_version.h"
diff --git a/aom/src/aom_encoder.c b/aom/src/aom_encoder.c
index bc94846..22765d6 100644
--- a/aom/src/aom_encoder.c
+++ b/aom/src/aom_encoder.c
@@ -13,7 +13,7 @@
  * \brief Provides the high level interface to wrap encoder algorithms.
  *
  */
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #if HAVE_FEXCEPT
 #define _GNU_SOURCE
diff --git a/aom_dsp/add_noise.c b/aom_dsp/add_noise.c
index 389cf20..8ca126a 100644
--- a/aom_dsp/add_noise.c
+++ b/aom_dsp/add_noise.c
@@ -12,7 +12,7 @@
 #include <math.h>
 #include <stdlib.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
 
 #include "aom/aom_integer.h"
diff --git a/aom_dsp/aom_convolve.c b/aom_dsp/aom_convolve.c
index 29c0a11..087bc6a 100644
--- a/aom_dsp/aom_convolve.c
+++ b/aom_dsp/aom_convolve.c
@@ -12,8 +12,9 @@
 #include <assert.h>
 #include <string.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "aom/aom_integer.h"
 #include "aom_dsp/aom_convolve.h"
 #include "aom_dsp/aom_dsp_common.h"
diff --git a/aom_dsp/aom_convolve.h b/aom_dsp/aom_convolve.h
index 36d1feb..a33549f 100644
--- a/aom_dsp/aom_convolve.h
+++ b/aom_dsp/aom_convolve.h
@@ -11,7 +11,8 @@
 #ifndef AOM_DSP_AOM_CONVOLVE_H_
 #define AOM_DSP_AOM_CONVOLVE_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 
 #ifdef __cplusplus
diff --git a/aom_dsp/aom_dsp_common.h b/aom_dsp/aom_dsp_common.h
index 309d0c3..404fccb 100644
--- a/aom_dsp/aom_dsp_common.h
+++ b/aom_dsp/aom_dsp_common.h
@@ -12,7 +12,8 @@
 #ifndef AOM_DSP_AOM_DSP_COMMON_H_
 #define AOM_DSP_AOM_DSP_COMMON_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 #include "aom_ports/mem.h"
 
diff --git a/aom_dsp/aom_dsp_rtcd.c b/aom_dsp/aom_dsp_rtcd.c
index 11a57d3..05c5b4a 100644
--- a/aom_dsp/aom_dsp_rtcd.c
+++ b/aom_dsp/aom_dsp_rtcd.c
@@ -8,7 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #define RTCD_C
 #include "./aom_dsp_rtcd.h"
 #include "aom_ports/aom_once.h"
diff --git a/aom_dsp/aom_simd.h b/aom_dsp/aom_simd.h
index 469fd8e..991ff0a 100644
--- a/aom_dsp/aom_simd.h
+++ b/aom_dsp/aom_simd.h
@@ -18,7 +18,8 @@
 #include <intrin.h>
 #endif
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_simd_inline.h"
 
 #define SIMD_CHECK 1  // Sanity checks in C equivalents
diff --git a/aom_dsp/arm/aom_convolve8_neon.c b/aom_dsp/arm/aom_convolve8_neon.c
index 8ebffb5..e184f9b 100644
--- a/aom_dsp/arm/aom_convolve8_neon.c
+++ b/aom_dsp/arm/aom_convolve8_neon.c
@@ -12,7 +12,8 @@
 #include <arm_neon.h>
 #include <assert.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "aom/aom_integer.h"
 #include "aom_ports/mem.h"
diff --git a/aom_dsp/arm/avg_neon.c b/aom_dsp/arm/avg_neon.c
index 55639d3..fdd0bb9 100644
--- a/aom_dsp/arm/avg_neon.c
+++ b/aom_dsp/arm/avg_neon.c
@@ -13,7 +13,7 @@
 #include <assert.h>
 
 #include "./aom_dsp_rtcd.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom/aom_integer.h"
 
diff --git a/aom_dsp/arm/fwd_txfm_neon.c b/aom_dsp/arm/fwd_txfm_neon.c
index 1cf8a3a..e4300c9 100644
--- a/aom_dsp/arm/fwd_txfm_neon.c
+++ b/aom_dsp/arm/fwd_txfm_neon.c
@@ -11,7 +11,8 @@
 
 #include <arm_neon.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_dsp/txfm_common.h"
 
 void aom_fdct8x8_neon(const int16_t *input, int16_t *final_output, int stride) {
diff --git a/aom_dsp/arm/intrapred_neon.c b/aom_dsp/arm/intrapred_neon.c
index 7d5f640..06156ef 100644
--- a/aom_dsp/arm/intrapred_neon.c
+++ b/aom_dsp/arm/intrapred_neon.c
@@ -11,7 +11,8 @@
 
 #include <arm_neon.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "aom/aom_integer.h"
 
diff --git a/aom_dsp/arm/loopfilter_16_neon.c b/aom_dsp/arm/loopfilter_16_neon.c
index c0562a6..1863bed 100644
--- a/aom_dsp/arm/loopfilter_16_neon.c
+++ b/aom_dsp/arm/loopfilter_16_neon.c
@@ -12,7 +12,8 @@
 #include <arm_neon.h>
 
 #include "./aom_dsp_rtcd.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 
 static INLINE void loop_filter_neon_16(uint8x16_t qblimit,  // blimit
diff --git a/aom_dsp/arm/loopfilter_neon.c b/aom_dsp/arm/loopfilter_neon.c
index c90d6bf..cae2607 100644
--- a/aom_dsp/arm/loopfilter_neon.c
+++ b/aom_dsp/arm/loopfilter_neon.c
@@ -12,7 +12,8 @@
 #include <arm_neon.h>
 
 #include "./aom_dsp_rtcd.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 
 void aom_lpf_vertical_4_dual_neon(uint8_t *s, int p, const uint8_t *blimit0,
diff --git a/aom_dsp/arm/sad4d_neon.c b/aom_dsp/arm/sad4d_neon.c
index a1eeaf4..3de1d96 100644
--- a/aom_dsp/arm/sad4d_neon.c
+++ b/aom_dsp/arm/sad4d_neon.c
@@ -11,7 +11,8 @@
 
 #include <arm_neon.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "aom/aom_integer.h"
 
diff --git a/aom_dsp/arm/sad_neon.c b/aom_dsp/arm/sad_neon.c
index 2f452f5..a39de91 100644
--- a/aom_dsp/arm/sad_neon.c
+++ b/aom_dsp/arm/sad_neon.c
@@ -11,7 +11,7 @@
 
 #include <arm_neon.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom/aom_integer.h"
 
diff --git a/aom_dsp/arm/subpel_variance_neon.c b/aom_dsp/arm/subpel_variance_neon.c
index 064b72d..3099613 100644
--- a/aom_dsp/arm/subpel_variance_neon.c
+++ b/aom_dsp/arm/subpel_variance_neon.c
@@ -11,7 +11,7 @@
 
 #include <arm_neon.h>
 #include "./aom_dsp_rtcd.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom_ports/mem.h"
 #include "aom/aom_integer.h"
diff --git a/aom_dsp/arm/subtract_neon.c b/aom_dsp/arm/subtract_neon.c
index cb8a2da..28f5ace 100644
--- a/aom_dsp/arm/subtract_neon.c
+++ b/aom_dsp/arm/subtract_neon.c
@@ -11,7 +11,8 @@
 
 #include <arm_neon.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 
 void aom_subtract_block_neon(int rows, int cols, int16_t *diff,
diff --git a/aom_dsp/arm/variance_neon.c b/aom_dsp/arm/variance_neon.c
index dbab287..a01a030 100644
--- a/aom_dsp/arm/variance_neon.c
+++ b/aom_dsp/arm/variance_neon.c
@@ -12,7 +12,7 @@
 #include <arm_neon.h>
 
 #include "./aom_dsp_rtcd.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom/aom_integer.h"
 #include "aom_ports/mem.h"
diff --git a/aom_dsp/binary_codes_reader.h b/aom_dsp/binary_codes_reader.h
index bb31328..5253c61 100644
--- a/aom_dsp/binary_codes_reader.h
+++ b/aom_dsp/binary_codes_reader.h
@@ -18,7 +18,8 @@
 
 #include <assert.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 #include "aom_dsp/bitreader.h"
 #include "aom_dsp/bitreader_buffer.h"
diff --git a/aom_dsp/binary_codes_writer.h b/aom_dsp/binary_codes_writer.h
index 1ce708e..784c721 100644
--- a/aom_dsp/binary_codes_writer.h
+++ b/aom_dsp/binary_codes_writer.h
@@ -17,7 +17,8 @@
 #endif
 
 #include <assert.h>
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 #include "aom_dsp/bitwriter.h"
 #include "aom_dsp/bitwriter_buffer.h"
diff --git a/aom_dsp/bitreader.h b/aom_dsp/bitreader.h
index 86a02b8..328935b 100644
--- a/aom_dsp/bitreader.h
+++ b/aom_dsp/bitreader.h
@@ -15,7 +15,7 @@
 #include <assert.h>
 #include <limits.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom/aomdx.h"
 #include "aom/aom_integer.h"
diff --git a/aom_dsp/bitreader_buffer.c b/aom_dsp/bitreader_buffer.c
index bd3d0ab..c0055c9 100644
--- a/aom_dsp/bitreader_buffer.c
+++ b/aom_dsp/bitreader_buffer.c
@@ -8,7 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./bitreader_buffer.h"
 
 size_t aom_rb_bytes_read(struct aom_read_bit_buffer *rb) {
diff --git a/aom_dsp/bitwriter.h b/aom_dsp/bitwriter.h
index 1f84df6..de1b1d0 100644
--- a/aom_dsp/bitwriter.h
+++ b/aom_dsp/bitwriter.h
@@ -13,7 +13,8 @@
 #define AOM_DSP_BITWRITER_H_
 
 #include <assert.h>
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
 
 #include "aom_dsp/daalaboolwriter.h"
 #include "aom_dsp/prob.h"
diff --git a/aom_dsp/bitwriter_buffer.c b/aom_dsp/bitwriter_buffer.c
index d3ca4d2..68389dc 100644
--- a/aom_dsp/bitwriter_buffer.c
+++ b/aom_dsp/bitwriter_buffer.c
@@ -12,7 +12,8 @@
 #include <limits.h>
 #include <stdlib.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./bitwriter_buffer.h"
 
 int aom_wb_is_byte_aligned(const struct aom_write_bit_buffer *wb) {
diff --git a/aom_dsp/buf_ans.h b/aom_dsp/buf_ans.h
index ae3286c..cf7df1d 100644
--- a/aom_dsp/buf_ans.h
+++ b/aom_dsp/buf_ans.h
@@ -16,7 +16,8 @@
 // backwards due to ANS's stack like behavior.
 
 #include <assert.h>
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 #include "aom_dsp/ans.h"
 #include "aom_dsp/answriter.h"
diff --git a/aom_dsp/fastssim.c b/aom_dsp/fastssim.c
index 87060aa..6224627 100644
--- a/aom_dsp/fastssim.c
+++ b/aom_dsp/fastssim.c
@@ -15,7 +15,9 @@
 #include <math.h>
 #include <stdlib.h>
 #include <string.h>
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "aom_dsp/ssim.h"
 #include "aom_ports/system_state.h"
diff --git a/aom_dsp/intrapred.c b/aom_dsp/intrapred.c
index 7184ccb..2e7ba5f 100644
--- a/aom_dsp/intrapred.c
+++ b/aom_dsp/intrapred.c
@@ -12,7 +12,7 @@
 #include <assert.h>
 #include <math.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
 
 #include "aom_dsp/aom_dsp_common.h"
diff --git a/aom_dsp/intrapred_common.h b/aom_dsp/intrapred_common.h
index 2089318..e047d98 100644
--- a/aom_dsp/intrapred_common.h
+++ b/aom_dsp/intrapred_common.h
@@ -12,7 +12,7 @@
 #ifndef _AOM_DSP_INTRAPRED_COMMON_H
 #define _AOM_DSP_INTRAPRED_COMMON_H
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 // Weights are quadratic from '1' to '1 / block_size', scaled by
 // 2^sm_weight_log2_scale.
diff --git a/aom_dsp/loopfilter.c b/aom_dsp/loopfilter.c
index 5b98f699..5be3b7d 100644
--- a/aom_dsp/loopfilter.c
+++ b/aom_dsp/loopfilter.c
@@ -11,7 +11,8 @@
 
 #include <stdlib.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "aom_dsp/aom_dsp_common.h"
 #include "aom_ports/mem.h"
diff --git a/aom_dsp/mips/common_dspr2.h b/aom_dsp/mips/common_dspr2.h
index 31159fd..d51bfa8 100644
--- a/aom_dsp/mips/common_dspr2.h
+++ b/aom_dsp/mips/common_dspr2.h
@@ -13,7 +13,9 @@
 #define AOM_COMMON_MIPS_DSPR2_H_
 
 #include <assert.h>
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 
 #ifdef __cplusplus
diff --git a/aom_dsp/mips/convolve_common_dspr2.h b/aom_dsp/mips/convolve_common_dspr2.h
index c6895fb..e7b8d53 100644
--- a/aom_dsp/mips/convolve_common_dspr2.h
+++ b/aom_dsp/mips/convolve_common_dspr2.h
@@ -14,7 +14,8 @@
 
 #include <assert.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 #include "aom_dsp/mips/common_dspr2.h"
 
diff --git a/aom_dsp/mips/macros_msa.h b/aom_dsp/mips/macros_msa.h
index 48fbcfd..eb919d4 100644
--- a/aom_dsp/mips/macros_msa.h
+++ b/aom_dsp/mips/macros_msa.h
@@ -14,7 +14,8 @@
 
 #include <msa.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 
 #define LD_B(RTYPE, psrc) *((const RTYPE *)(psrc))
diff --git a/aom_dsp/prob.h b/aom_dsp/prob.h
index c99db21..c06f403 100644
--- a/aom_dsp/prob.h
+++ b/aom_dsp/prob.h
@@ -15,7 +15,8 @@
 #include <assert.h>
 #include <stdio.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_common.h"
 
 #include "aom_ports/bitops.h"
diff --git a/aom_dsp/psnrhvs.c b/aom_dsp/psnrhvs.c
index 2856ef6..dae2b05 100644
--- a/aom_dsp/psnrhvs.c
+++ b/aom_dsp/psnrhvs.c
@@ -17,7 +17,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "aom_dsp/psnr.h"
 #include "aom_dsp/ssim.h"
diff --git a/aom_dsp/quantize.h b/aom_dsp/quantize.h
index eb9077d..56d50b9 100644
--- a/aom_dsp/quantize.h
+++ b/aom_dsp/quantize.h
@@ -12,7 +12,8 @@
 #ifndef AOM_DSP_QUANTIZE_H_
 #define AOM_DSP_QUANTIZE_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_dsp/aom_dsp_common.h"
 
 #ifdef __cplusplus
diff --git a/aom_dsp/sad.c b/aom_dsp/sad.c
index 933b177..a2de008 100644
--- a/aom_dsp/sad.c
+++ b/aom_dsp/sad.c
@@ -11,7 +11,8 @@
 
 #include <stdlib.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 
 #include "aom/aom_integer.h"
diff --git a/aom_dsp/sad_av1.c b/aom_dsp/sad_av1.c
index 27ee643..d56bc66 100644
--- a/aom_dsp/sad_av1.c
+++ b/aom_dsp/sad_av1.c
@@ -11,7 +11,8 @@
 
 #include <stdlib.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 
 #include "aom/aom_integer.h"
diff --git a/aom_dsp/simd/v128_intrinsics_c.h b/aom_dsp/simd/v128_intrinsics_c.h
index 32e7c32..3404f03 100644
--- a/aom_dsp/simd/v128_intrinsics_c.h
+++ b/aom_dsp/simd/v128_intrinsics_c.h
@@ -15,7 +15,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "./v64_intrinsics_c.h"
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
 
 typedef union {
   uint8_t u8[16];
diff --git a/aom_dsp/simd/v256_intrinsics_c.h b/aom_dsp/simd/v256_intrinsics_c.h
index f96ca7f..7520116 100644
--- a/aom_dsp/simd/v256_intrinsics_c.h
+++ b/aom_dsp/simd/v256_intrinsics_c.h
@@ -15,7 +15,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "./v128_intrinsics_c.h"
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
 
 typedef union {
   uint8_t u8[32];
diff --git a/aom_dsp/simd/v64_intrinsics_c.h b/aom_dsp/simd/v64_intrinsics_c.h
index 5032238..b5f8a83 100644
--- a/aom_dsp/simd/v64_intrinsics_c.h
+++ b/aom_dsp/simd/v64_intrinsics_c.h
@@ -17,7 +17,8 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
 
 typedef union {
   uint8_t u8[8];
diff --git a/aom_dsp/ssim.h b/aom_dsp/ssim.h
index a448177..c8a389d 100644
--- a/aom_dsp/ssim.h
+++ b/aom_dsp/ssim.h
@@ -18,7 +18,8 @@
 extern "C" {
 #endif
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_scale/yv12config.h"
 
 // metrics used for calculating ssim, ssim2, dssim, and ssimc
diff --git a/aom_dsp/subtract.c b/aom_dsp/subtract.c
index 6afd49b..8873f93 100644
--- a/aom_dsp/subtract.c
+++ b/aom_dsp/subtract.c
@@ -11,7 +11,8 @@
 
 #include <stdlib.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 
 #include "aom/aom_integer.h"
diff --git a/aom_dsp/variance.c b/aom_dsp/variance.c
index 2cff3a8..47581e8 100644
--- a/aom_dsp/variance.c
+++ b/aom_dsp/variance.c
@@ -12,7 +12,8 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 
 #include "aom/aom_integer.h"
diff --git a/aom_dsp/variance.h b/aom_dsp/variance.h
index f7eb5a8..cbed94f 100644
--- a/aom_dsp/variance.h
+++ b/aom_dsp/variance.h
@@ -12,7 +12,7 @@
 #ifndef AOM_DSP_VARIANCE_H_
 #define AOM_DSP_VARIANCE_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom/aom_integer.h"
 
diff --git a/aom_dsp/x86/aom_asm_stubs.c b/aom_dsp/x86/aom_asm_stubs.c
index 5bb69a9..4b522c7 100644
--- a/aom_dsp/x86/aom_asm_stubs.c
+++ b/aom_dsp/x86/aom_asm_stubs.c
@@ -9,7 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "aom_dsp/x86/convolve.h"
 
diff --git a/aom_dsp/x86/common_avx2.h b/aom_dsp/x86/common_avx2.h
index 5f9596a..3f46420 100644
--- a/aom_dsp/x86/common_avx2.h
+++ b/aom_dsp/x86/common_avx2.h
@@ -14,7 +14,7 @@
 
 #include <immintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 // Note: in and out could have the same value
 static INLINE void mm256_transpose_16x16(const __m256i *in, __m256i *out) {
diff --git a/aom_dsp/x86/convolve.h b/aom_dsp/x86/convolve.h
index 45d429c..36fb196 100644
--- a/aom_dsp/x86/convolve.h
+++ b/aom_dsp/x86/convolve.h
@@ -13,7 +13,8 @@
 
 #include <assert.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 #include "aom_ports/mem.h"
 #include "aom_dsp/aom_convolve.h"
diff --git a/aom_dsp/x86/fwd_txfm_sse2.c b/aom_dsp/x86/fwd_txfm_sse2.c
index 079bcfc..d9f42e2 100644
--- a/aom_dsp/x86/fwd_txfm_sse2.c
+++ b/aom_dsp/x86/fwd_txfm_sse2.c
@@ -11,7 +11,8 @@
 
 #include <emmintrin.h>  // SSE2
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "aom_dsp/aom_dsp_common.h"
 #include "aom_dsp/x86/fwd_txfm_sse2.h"
diff --git a/aom_dsp/x86/halfpix_variance_sse2.c b/aom_dsp/x86/halfpix_variance_sse2.c
index a99c0b4..252ff2f 100644
--- a/aom_dsp/x86/halfpix_variance_sse2.c
+++ b/aom_dsp/x86/halfpix_variance_sse2.c
@@ -11,7 +11,8 @@
 
 #include <assert.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "aom/aom_integer.h"
 
diff --git a/aom_dsp/x86/highbd_subtract_sse2.c b/aom_dsp/x86/highbd_subtract_sse2.c
index 5a2d7f0..c786c71 100644
--- a/aom_dsp/x86/highbd_subtract_sse2.c
+++ b/aom_dsp/x86/highbd_subtract_sse2.c
@@ -13,7 +13,8 @@
 #include <emmintrin.h>
 #include <stddef.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 
 typedef void (*SubtractWxHFuncType)(int16_t *diff, ptrdiff_t diff_stride,
diff --git a/aom_dsp/x86/highbd_variance_sse2.c b/aom_dsp/x86/highbd_variance_sse2.c
index 42edc3b..5447823 100644
--- a/aom_dsp/x86/highbd_variance_sse2.c
+++ b/aom_dsp/x86/highbd_variance_sse2.c
@@ -12,7 +12,8 @@
 #include <assert.h>
 #include <emmintrin.h>  // SSE2
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 
 #include "aom_dsp/x86/synonyms.h"
diff --git a/aom_dsp/x86/highbd_variance_sse4.c b/aom_dsp/x86/highbd_variance_sse4.c
index cc7f528..7e973cf 100644
--- a/aom_dsp/x86/highbd_variance_sse4.c
+++ b/aom_dsp/x86/highbd_variance_sse4.c
@@ -11,7 +11,8 @@
 
 #include <smmintrin.h> /* SSE4.1 */
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 
 #include "aom_dsp/variance.h"
diff --git a/aom_dsp/x86/jnt_sad_ssse3.c b/aom_dsp/x86/jnt_sad_ssse3.c
index 47e8a0b..bd34cb8 100644
--- a/aom_dsp/x86/jnt_sad_ssse3.c
+++ b/aom_dsp/x86/jnt_sad_ssse3.c
@@ -13,7 +13,8 @@
 #include <emmintrin.h>  // SSE2
 #include <tmmintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 
 #include "aom_dsp/x86/synonyms.h"
diff --git a/aom_dsp/x86/jnt_variance_ssse3.c b/aom_dsp/x86/jnt_variance_ssse3.c
index d9bbaa5..35bb60a 100644
--- a/aom_dsp/x86/jnt_variance_ssse3.c
+++ b/aom_dsp/x86/jnt_variance_ssse3.c
@@ -13,7 +13,8 @@
 #include <emmintrin.h>  // SSE2
 #include <tmmintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 
 #include "aom_dsp/x86/synonyms.h"
diff --git a/aom_dsp/x86/lpf_common_sse2.h b/aom_dsp/x86/lpf_common_sse2.h
index ef6ad39..0e3ab41 100644
--- a/aom_dsp/x86/lpf_common_sse2.h
+++ b/aom_dsp/x86/lpf_common_sse2.h
@@ -14,7 +14,7 @@
 
 #include <emmintrin.h>  // SSE2
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 static INLINE void highbd_transpose6x6_sse2(__m128i *x0, __m128i *x1,
                                             __m128i *x2, __m128i *x3,
diff --git a/aom_dsp/x86/masked_sad_intrin_ssse3.c b/aom_dsp/x86/masked_sad_intrin_ssse3.c
index 4e60d4e..284256d 100644
--- a/aom_dsp/x86/masked_sad_intrin_ssse3.c
+++ b/aom_dsp/x86/masked_sad_intrin_ssse3.c
@@ -12,7 +12,8 @@
 #include <stdio.h>
 #include <tmmintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "aom_dsp/blend.h"
 #include "aom/aom_integer.h"
diff --git a/aom_dsp/x86/masked_variance_intrin_ssse3.c b/aom_dsp/x86/masked_variance_intrin_ssse3.c
index 6706b94..4ac9f33 100644
--- a/aom_dsp/x86/masked_variance_intrin_ssse3.c
+++ b/aom_dsp/x86/masked_variance_intrin_ssse3.c
@@ -13,7 +13,8 @@
 #include <string.h>
 #include <tmmintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "aom/aom_integer.h"
 #include "aom_dsp/aom_filter.h"
diff --git a/aom_dsp/x86/masked_variance_intrin_ssse3.h b/aom_dsp/x86/masked_variance_intrin_ssse3.h
index 4d058a1..8b41297 100644
--- a/aom_dsp/x86/masked_variance_intrin_ssse3.h
+++ b/aom_dsp/x86/masked_variance_intrin_ssse3.h
@@ -16,7 +16,8 @@
 #include <string.h>
 #include <tmmintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "aom_dsp/blend.h"
 
diff --git a/aom_dsp/x86/mem_sse2.h b/aom_dsp/x86/mem_sse2.h
index 10a505f..8b69606 100644
--- a/aom_dsp/x86/mem_sse2.h
+++ b/aom_dsp/x86/mem_sse2.h
@@ -14,7 +14,8 @@
 
 #include <emmintrin.h>  // SSE2
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 
 static INLINE __m128i loadh_epi64(const void *const src, const __m128i s) {
diff --git a/aom_dsp/x86/obmc_intrinsic_ssse3.h b/aom_dsp/x86/obmc_intrinsic_ssse3.h
index 73589a3..a3535f9 100644
--- a/aom_dsp/x86/obmc_intrinsic_ssse3.h
+++ b/aom_dsp/x86/obmc_intrinsic_ssse3.h
@@ -14,7 +14,7 @@
 
 #include <immintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 static INLINE int32_t xx_hsum_epi32_si32(__m128i v_d) {
   v_d = _mm_hadd_epi32(v_d, v_d);
diff --git a/aom_dsp/x86/obmc_sad_sse4.c b/aom_dsp/x86/obmc_sad_sse4.c
index b3e5aad..dda9862 100644
--- a/aom_dsp/x86/obmc_sad_sse4.c
+++ b/aom_dsp/x86/obmc_sad_sse4.c
@@ -12,7 +12,8 @@
 #include <assert.h>
 #include <immintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_ports/mem.h"
 #include "aom/aom_integer.h"
 
diff --git a/aom_dsp/x86/obmc_variance_sse4.c b/aom_dsp/x86/obmc_variance_sse4.c
index b44aa0b..571aa77 100644
--- a/aom_dsp/x86/obmc_variance_sse4.c
+++ b/aom_dsp/x86/obmc_variance_sse4.c
@@ -12,7 +12,8 @@
 #include <assert.h>
 #include <immintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_ports/mem.h"
 #include "aom/aom_integer.h"
 
diff --git a/aom_dsp/x86/sad_highbd_avx2.c b/aom_dsp/x86/sad_highbd_avx2.c
index 05757e0..1873385 100644
--- a/aom_dsp/x86/sad_highbd_avx2.c
+++ b/aom_dsp/x86/sad_highbd_avx2.c
@@ -11,7 +11,8 @@
 
 #include <immintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 
 #include "aom/aom_integer.h"
diff --git a/aom_dsp/x86/synonyms.h b/aom_dsp/x86/synonyms.h
index 9945262..d9a53fc 100644
--- a/aom_dsp/x86/synonyms.h
+++ b/aom_dsp/x86/synonyms.h
@@ -14,7 +14,8 @@
 
 #include <immintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 
 /**
diff --git a/aom_dsp/x86/synonyms_avx2.h b/aom_dsp/x86/synonyms_avx2.h
index 4a8e493..39f371f 100644
--- a/aom_dsp/x86/synonyms_avx2.h
+++ b/aom_dsp/x86/synonyms_avx2.h
@@ -14,7 +14,8 @@
 
 #include <immintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 
 /**
diff --git a/aom_dsp/x86/transpose_sse2.h b/aom_dsp/x86/transpose_sse2.h
index 5edfa71..f88a152 100644
--- a/aom_dsp/x86/transpose_sse2.h
+++ b/aom_dsp/x86/transpose_sse2.h
@@ -14,7 +14,7 @@
 
 #include <emmintrin.h>  // SSE2
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 static INLINE __m128i transpose_8bit_4x4(const __m128i *const in) {
   // Unpack 16 bit elements. Goes from:
diff --git a/aom_dsp/x86/variance_sse2.c b/aom_dsp/x86/variance_sse2.c
index 6354687..6bc7bf2 100644
--- a/aom_dsp/x86/variance_sse2.c
+++ b/aom_dsp/x86/variance_sse2.c
@@ -12,7 +12,8 @@
 #include <assert.h>
 #include <emmintrin.h>  // SSE2
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 
 #include "aom_dsp/x86/synonyms.h"
diff --git a/aom_mem/aom_mem.h b/aom_mem/aom_mem.h
index bfa460d..a36ee3e 100644
--- a/aom_mem/aom_mem.h
+++ b/aom_mem/aom_mem.h
@@ -12,8 +12,8 @@
 #ifndef AOM_MEM_AOM_MEM_H_
 #define AOM_MEM_AOM_MEM_H_
 
-#include "aom_config.h"
 #include "aom/aom_integer.h"
+#include "config/aom_config.h"
 
 #if defined(__uClinux__)
 #include <lddk.h>
diff --git a/aom_mem/include/aom_mem_intrnl.h b/aom_mem/include/aom_mem_intrnl.h
index 3cdfbe0..977ebad 100644
--- a/aom_mem/include/aom_mem_intrnl.h
+++ b/aom_mem/include/aom_mem_intrnl.h
@@ -11,7 +11,8 @@
 
 #ifndef AOM_MEM_INCLUDE_AOM_MEM_INTRNL_H_
 #define AOM_MEM_INCLUDE_AOM_MEM_INTRNL_H_
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
 
 #define ADDRESS_STORAGE_SIZE sizeof(size_t)
 
diff --git a/aom_ports/aom_once.h b/aom_ports/aom_once.h
index 3cfd2fd..bb1e213 100644
--- a/aom_ports/aom_once.h
+++ b/aom_ports/aom_once.h
@@ -12,7 +12,7 @@
 #ifndef AOM_PORTS_AOM_ONCE_H_
 #define AOM_PORTS_AOM_ONCE_H_
 
-#include "aom_config.h"
+#include "config/aom_config.h"
 
 /* Implement a function wrapper to guarantee initialization
  * thread-safety for library singletons.
diff --git a/aom_ports/aom_timer.h b/aom_ports/aom_timer.h
index 84b6f93..c719ec6 100644
--- a/aom_ports/aom_timer.h
+++ b/aom_ports/aom_timer.h
@@ -12,7 +12,7 @@
 #ifndef AOM_PORTS_AOM_TIMER_H_
 #define AOM_PORTS_AOM_TIMER_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom/aom_integer.h"
 
diff --git a/aom_ports/arm.h b/aom_ports/arm.h
index 448a70d..a1a2ab7 100644
--- a/aom_ports/arm.h
+++ b/aom_ports/arm.h
@@ -12,7 +12,8 @@
 #ifndef AOM_PORTS_ARM_H_
 #define AOM_PORTS_ARM_H_
 #include <stdlib.h>
-#include "aom_config.h"
+
+#include "config/aom_config.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/aom_ports/arm_cpudetect.c b/aom_ports/arm_cpudetect.c
index 4dd1a1a..fd0805f 100644
--- a/aom_ports/arm_cpudetect.c
+++ b/aom_ports/arm_cpudetect.c
@@ -12,7 +12,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "aom_ports/arm.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #ifdef WINAPI_FAMILY
 #include <winapifamily.h>
diff --git a/aom_ports/mem.h b/aom_ports/mem.h
index 937b79f..0793d82 100644
--- a/aom_ports/mem.h
+++ b/aom_ports/mem.h
@@ -12,8 +12,8 @@
 #ifndef AOM_PORTS_MEM_H_
 #define AOM_PORTS_MEM_H_
 
-#include "aom_config.h"
 #include "aom/aom_integer.h"
+#include "config/aom_config.h"
 
 #if (defined(__GNUC__) && __GNUC__) || defined(__SUNPRO_C)
 #define DECLARE_ALIGNED(n, typ, val) typ val __attribute__((aligned(n)))
diff --git a/aom_ports/mem_ops_aligned.h b/aom_ports/mem_ops_aligned.h
index 8c3ab1c..81fe41a 100644
--- a/aom_ports/mem_ops_aligned.h
+++ b/aom_ports/mem_ops_aligned.h
@@ -91,7 +91,8 @@
     *mem = (uint##sz##_t)raw;                                           \
   }
 
-#include "aom_config.h"
+#include "config/aom_config.h"
+
 #if CONFIG_BIG_ENDIAN
 #define mem_get_be_aligned_generic(sz) mem_get_ne_aligned_generic(be, sz)
 #define mem_get_sbe_aligned_generic(sz) mem_get_sne_aligned_generic(be, sz)
diff --git a/aom_ports/msvc.h b/aom_ports/msvc.h
index cd194ca..7d2b540 100644
--- a/aom_ports/msvc.h
+++ b/aom_ports/msvc.h
@@ -13,7 +13,7 @@
 #define AOM_PORTS_MSVC_H_
 #ifdef _MSC_VER
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #if _MSC_VER < 1900  // VS2015 provides snprintf
 #define snprintf _snprintf
diff --git a/aom_ports/system_state.h b/aom_ports/system_state.h
index 5d40d4c..0f2c3d8 100644
--- a/aom_ports/system_state.h
+++ b/aom_ports/system_state.h
@@ -12,7 +12,7 @@
 #ifndef AOM_PORTS_SYSTEM_STATE_H_
 #define AOM_PORTS_SYSTEM_STATE_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #if ARCH_X86 || ARCH_X86_64
 void aom_reset_mmx_state(void);
diff --git a/aom_ports/x86.h b/aom_ports/x86.h
index 1e3e37d..b642a57 100644
--- a/aom_ports/x86.h
+++ b/aom_ports/x86.h
@@ -17,8 +17,8 @@
 #include <intrin.h> /* For __cpuidex, __rdtsc */
 #endif
 
-#include "aom_config.h"
 #include "aom/aom_integer.h"
+#include "config/aom_config.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/aom_ports/x86_abi_support.asm b/aom_ports/x86_abi_support.asm
index 6aeee60..0e7c262 100644
--- a/aom_ports/x86_abi_support.asm
+++ b/aom_ports/x86_abi_support.asm
@@ -12,7 +12,7 @@
 ;
 
 
-%include "aom_config.asm"
+%include "config/aom_config.asm"
 
 ; 32/64 bit compatibility macros
 ;
diff --git a/aom_scale/aom_scale_rtcd.c b/aom_scale/aom_scale_rtcd.c
index dec2373..3522e1c 100644
--- a/aom_scale/aom_scale_rtcd.c
+++ b/aom_scale/aom_scale_rtcd.c
@@ -8,7 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #define RTCD_C
 #include "./aom_scale_rtcd.h"
 #include "aom_ports/aom_once.h"
diff --git a/aom_scale/generic/yv12extend.c b/aom_scale/generic/yv12extend.c
index e06022f..f0b9186 100644
--- a/aom_scale/generic/yv12extend.c
+++ b/aom_scale/generic/yv12extend.c
@@ -10,7 +10,9 @@
  */
 
 #include <assert.h>
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
+
 #include "./aom_scale_rtcd.h"
 #include "aom/aom_integer.h"
 #include "aom_mem/aom_mem.h"
diff --git a/aom_scale/mips/dspr2/yv12extend_dspr2.c b/aom_scale/mips/dspr2/yv12extend_dspr2.c
index d038848..869e594 100644
--- a/aom_scale/mips/dspr2/yv12extend_dspr2.c
+++ b/aom_scale/mips/dspr2/yv12extend_dspr2.c
@@ -11,7 +11,8 @@
 
 #include <assert.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_scale/yv12config.h"
 #include "aom_mem/aom_mem.h"
 #include "aom_scale/aom_scale.h"
diff --git a/aom_scale/yv12config.h b/aom_scale/yv12config.h
index ca63fed..8f1c600 100644
--- a/aom_scale/yv12config.h
+++ b/aom_scale/yv12config.h
@@ -16,7 +16,8 @@
 extern "C" {
 #endif
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_codec.h"
 #include "aom/aom_frame_buffer.h"
 #include "aom/aom_integer.h"
diff --git a/aom_util/aom_thread.h b/aom_util/aom_thread.h
index e22c4cc..3b22ac7 100644
--- a/aom_util/aom_thread.h
+++ b/aom_util/aom_thread.h
@@ -17,7 +17,7 @@
 #ifndef AOM_THREAD_H_
 #define AOM_THREAD_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/aom_util/debug_util.h b/aom_util/debug_util.h
index bb37bc5..4096801 100644
--- a/aom_util/debug_util.h
+++ b/aom_util/debug_util.h
@@ -12,7 +12,8 @@
 #ifndef AOM_UTIL_DEBUG_UTIL_H_
 #define AOM_UTIL_DEBUG_UTIL_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_dsp/prob.h"
 
 #ifdef __cplusplus
diff --git a/aom_util/endian_inl.h b/aom_util/endian_inl.h
index 17a2386..2d28221 100644
--- a/aom_util/endian_inl.h
+++ b/aom_util/endian_inl.h
@@ -15,7 +15,9 @@
 #define AOM_UTIL_ENDIAN_INL_H_
 
 #include <stdlib.h>
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 
 #if defined(__GNUC__)
diff --git a/apps/aomdec.c b/apps/aomdec.c
index afd2318..a85f729 100644
--- a/apps/aomdec.c
+++ b/apps/aomdec.c
@@ -16,7 +16,7 @@
 #include <string.h>
 #include <limits.h>
 
-#include "aom_config.h"
+#include "config/aom_config.h"
 
 #if CONFIG_OS_SUPPORT
 #if HAVE_UNISTD_H
diff --git a/apps/aomenc.c b/apps/aomenc.c
index 7d5148f..6e081c6 100644
--- a/apps/aomenc.c
+++ b/apps/aomenc.c
@@ -11,7 +11,7 @@
 
 #include "apps/aomenc.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include <assert.h>
 #include <limits.h>
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index a2ed2fd..f144f94 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -11,7 +11,8 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_encoder.h"
 #include "aom_ports/aom_once.h"
 #include "aom_ports/system_state.h"
diff --git a/av1/av1_dx_iface.c b/av1/av1_dx_iface.c
index a91ff61..d3d42ca 100644
--- a/av1/av1_dx_iface.c
+++ b/av1/av1_dx_iface.c
@@ -12,7 +12,8 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_version.h"
 
 #include "aom/internal/aom_codec_internal.h"
diff --git a/av1/common/alloccommon.c b/av1/common/alloccommon.c
index 6266dde..b4fff4d 100644
--- a/av1/common/alloccommon.c
+++ b/av1/common/alloccommon.c
@@ -10,7 +10,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_mem/aom_mem.h"
 
 #include "av1/common/alloccommon.h"
diff --git a/av1/common/arm/jnt_convolve_neon.c b/av1/common/arm/jnt_convolve_neon.c
index 72d3a67..debfa14 100644
--- a/av1/common/arm/jnt_convolve_neon.c
+++ b/av1/common/arm/jnt_convolve_neon.c
@@ -12,7 +12,7 @@
 #include <arm_neon.h>
 #include <assert.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./av1_rtcd.h"
 #include "aom_dsp/txfm_common.h"
 #include "aom_ports/mem.h"
diff --git a/av1/common/arm/wiener_convolve_neon.c b/av1/common/arm/wiener_convolve_neon.c
index a8f4338..82ef2bb 100644
--- a/av1/common/arm/wiener_convolve_neon.c
+++ b/av1/common/arm/wiener_convolve_neon.c
@@ -12,7 +12,8 @@
 #include <arm_neon.h>
 #include <assert.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./av1_rtcd.h"
 #include "aom_dsp/txfm_common.h"
 #include "aom_ports/mem.h"
diff --git a/av1/common/av1_loopfilter.c b/av1/common/av1_loopfilter.c
index b516ef1..c356efe 100644
--- a/av1/common/av1_loopfilter.c
+++ b/av1/common/av1_loopfilter.c
@@ -11,7 +11,8 @@
 
 #include <math.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "aom_dsp/aom_dsp_common.h"
 #include "aom_mem/aom_mem.h"
diff --git a/av1/common/av1_loopfilter.h b/av1/common/av1_loopfilter.h
index 005258c..c35c3b2 100644
--- a/av1/common/av1_loopfilter.h
+++ b/av1/common/av1_loopfilter.h
@@ -12,9 +12,9 @@
 #ifndef AV1_COMMON_LOOPFILTER_H_
 #define AV1_COMMON_LOOPFILTER_H_
 
-#include "aom_ports/mem.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
+#include "aom_ports/mem.h"
 #include "av1/common/blockd.h"
 #include "av1/common/seg_common.h"
 
diff --git a/av1/common/av1_rtcd.c b/av1/common/av1_rtcd.c
index f9ccd19..7cdb2bf 100644
--- a/av1/common/av1_rtcd.c
+++ b/av1/common/av1_rtcd.c
@@ -8,7 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #define RTCD_C
 #include "./av1_rtcd.h"
 #include "aom_ports/aom_once.h"
diff --git a/av1/common/av1_txfm.h b/av1/common/av1_txfm.h
index fea10f2..5db3233 100644
--- a/av1/common/av1_txfm.h
+++ b/av1/common/av1_txfm.h
@@ -16,7 +16,8 @@
 #include <math.h>
 #include <stdio.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "av1/common/enums.h"
 #include "av1/common/blockd.h"
 #include "aom/aom_integer.h"
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index c579d98..766bf45 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -12,7 +12,7 @@
 #ifndef AV1_COMMON_BLOCKD_H_
 #define AV1_COMMON_BLOCKD_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom_dsp/aom_dsp_common.h"
 #include "aom_ports/mem.h"
diff --git a/av1/common/cdef.h b/av1/common/cdef.h
index c739b21..092230d 100644
--- a/av1/common/cdef.h
+++ b/av1/common/cdef.h
@@ -16,7 +16,8 @@
 #define CDEF_PRI_STRENGTHS 16
 #define CDEF_SEC_STRENGTHS 4
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 #include "aom_ports/mem.h"
 #include "av1/common/cdef_block.h"
diff --git a/av1/common/common.h b/av1/common/common.h
index e8eea7b..72c6d3a 100644
--- a/av1/common/common.h
+++ b/av1/common/common.h
@@ -20,7 +20,7 @@
 #include "aom_mem/aom_mem.h"
 #include "aom/aom_integer.h"
 #include "aom_ports/bitops.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index 7cea0ff..4f95ef6 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -9,7 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 #include "aom_mem/aom_mem.h"
 #include "av1/common/blockd.h"
diff --git a/av1/common/entropy.h b/av1/common/entropy.h
index 656901f..32566ea 100644
--- a/av1/common/entropy.h
+++ b/av1/common/entropy.h
@@ -12,7 +12,8 @@
 #ifndef AV1_COMMON_ENTROPY_H_
 #define AV1_COMMON_ENTROPY_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 #include "aom_dsp/prob.h"
 
diff --git a/av1/common/entropymv.h b/av1/common/entropymv.h
index aeb815a..ca9b4b1 100644
--- a/av1/common/entropymv.h
+++ b/av1/common/entropymv.h
@@ -12,7 +12,7 @@
 #ifndef AV1_COMMON_ENTROPYMV_H_
 #define AV1_COMMON_ENTROPYMV_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom_dsp/prob.h"
 
diff --git a/av1/common/enums.h b/av1/common/enums.h
index a82000b..1e66495 100644
--- a/av1/common/enums.h
+++ b/av1/common/enums.h
@@ -12,7 +12,8 @@
 #ifndef AV1_COMMON_ENUMS_H_
 #define AV1_COMMON_ENUMS_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_codec.h"
 #include "aom/aom_integer.h"
 
diff --git a/av1/common/filter.h b/av1/common/filter.h
index 9019180..e576949 100644
--- a/av1/common/filter.h
+++ b/av1/common/filter.h
@@ -14,7 +14,8 @@
 
 #include <assert.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 #include "aom_dsp/aom_filter.h"
 #include "aom_ports/mem.h"
diff --git a/av1/common/idct.h b/av1/common/idct.h
index 0fc6575..50032a1 100644
--- a/av1/common/idct.h
+++ b/av1/common/idct.h
@@ -12,7 +12,8 @@
 #ifndef AV1_COMMON_IDCT_H_
 #define AV1_COMMON_IDCT_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "av1/common/blockd.h"
 #include "av1/common/common.h"
 #include "av1/common/enums.h"
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index 4bd87f2..54889e3 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -12,7 +12,8 @@
 #ifndef AV1_COMMON_ONYXC_INT_H_
 #define AV1_COMMON_ONYXC_INT_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./av1_rtcd.h"
 #include "aom/internal/aom_codec_internal.h"
 #include "aom_util/aom_thread.h"
diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c
index fb47218..bb842c0 100644
--- a/av1/common/reconinter.c
+++ b/av1/common/reconinter.c
@@ -15,7 +15,7 @@
 
 #include "./aom_scale_rtcd.h"
 #include "./aom_dsp_rtcd.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom/aom_integer.h"
 #include "aom_dsp/blend.h"
diff --git a/av1/common/reconintra.c b/av1/common/reconintra.c
index 0f436e1..73f4783 100644
--- a/av1/common/reconintra.c
+++ b/av1/common/reconintra.c
@@ -12,7 +12,8 @@
 #include <math.h>
 
 #include "./av1_rtcd.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "aom_dsp/aom_dsp_common.h"
 #include "aom_mem/aom_mem.h"
diff --git a/av1/common/resize.c b/av1/common/resize.c
index 9baad8c..be564ab 100644
--- a/av1/common/resize.c
+++ b/av1/common/resize.c
@@ -16,7 +16,8 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_dsp/aom_dsp_common.h"
 #include "aom_ports/mem.h"
 #include "aom_scale/aom_scale.h"
diff --git a/av1/common/restoration.c b/av1/common/restoration.c
index 9fef48e..39a10c7 100644
--- a/av1/common/restoration.c
+++ b/av1/common/restoration.c
@@ -12,7 +12,8 @@
 
 #include <math.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "./aom_scale_rtcd.h"
 #include "aom_mem/aom_mem.h"
diff --git a/av1/common/restoration.h b/av1/common/restoration.h
index 538d748..f3a2b56 100644
--- a/av1/common/restoration.h
+++ b/av1/common/restoration.h
@@ -13,7 +13,7 @@
 #define AV1_COMMON_RESTORATION_H_
 
 #include "aom_ports/mem.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "av1/common/blockd.h"
 #include "av1/common/enums.h"
diff --git a/av1/common/thread_common.c b/av1/common/thread_common.c
index 094a1aa..de97478 100644
--- a/av1/common/thread_common.c
+++ b/av1/common/thread_common.c
@@ -9,7 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_dsp/aom_dsp_common.h"
 #include "aom_mem/aom_mem.h"
 #include "av1/common/av1_loopfilter.h"
diff --git a/av1/common/thread_common.h b/av1/common/thread_common.h
index 2fd5bd3..1327251 100644
--- a/av1/common/thread_common.h
+++ b/av1/common/thread_common.h
@@ -11,7 +11,9 @@
 
 #ifndef AV1_COMMON_LOOPFILTER_THREAD_H_
 #define AV1_COMMON_LOOPFILTER_THREAD_H_
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
+
 #include "av1/common/av1_loopfilter.h"
 #include "aom_util/aom_thread.h"
 
diff --git a/av1/common/tile_common.h b/av1/common/tile_common.h
index 3b178f6..be037fb 100644
--- a/av1/common/tile_common.h
+++ b/av1/common/tile_common.h
@@ -16,7 +16,7 @@
 extern "C" {
 #endif
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 struct AV1Common;
 
diff --git a/av1/common/token_cdfs.h b/av1/common/token_cdfs.h
index cd16687..bbbbd4d 100644
--- a/av1/common/token_cdfs.h
+++ b/av1/common/token_cdfs.h
@@ -9,7 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "av1/common/entropy.h"
 
 static const aom_cdf_prob
diff --git a/av1/common/warped_motion.h b/av1/common/warped_motion.h
index 9235409..f5da36b 100644
--- a/av1/common/warped_motion.h
+++ b/av1/common/warped_motion.h
@@ -18,7 +18,8 @@
 #include <math.h>
 #include <assert.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_ports/mem.h"
 #include "aom_dsp/aom_dsp_common.h"
 #include "av1/common/mv.h"
diff --git a/av1/common/x86/av1_inv_txfm_avx2.c b/av1/common/x86/av1_inv_txfm_avx2.c
index ed763c3..8f36bdb 100644
--- a/av1/common/x86/av1_inv_txfm_avx2.c
+++ b/av1/common/x86/av1_inv_txfm_avx2.c
@@ -9,7 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./av1_rtcd.h"
 #include "av1/common/av1_inv_txfm1d_cfg.h"
 #include "av1/common/x86/av1_txfm_sse2.h"
diff --git a/av1/common/x86/av1_inv_txfm_avx2.h b/av1/common/x86/av1_inv_txfm_avx2.h
index 4e65216..eaeaa59 100644
--- a/av1/common/x86/av1_inv_txfm_avx2.h
+++ b/av1/common/x86/av1_inv_txfm_avx2.h
@@ -13,7 +13,8 @@
 
 #include <immintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./av1_rtcd.h"
 #include "aom/aom_integer.h"
 #include "aom_dsp/x86/transpose_sse2.h"
diff --git a/av1/common/x86/av1_inv_txfm_ssse3.c b/av1/common/x86/av1_inv_txfm_ssse3.c
index 20c3bce..391f7b1 100644
--- a/av1/common/x86/av1_inv_txfm_ssse3.c
+++ b/av1/common/x86/av1_inv_txfm_ssse3.c
@@ -9,7 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./av1_rtcd.h"
 #include "av1/common/av1_inv_txfm1d_cfg.h"
 #include "av1/common/x86/av1_inv_txfm_ssse3.h"
diff --git a/av1/common/x86/av1_inv_txfm_ssse3.h b/av1/common/x86/av1_inv_txfm_ssse3.h
index 384145a..fd23c52 100644
--- a/av1/common/x86/av1_inv_txfm_ssse3.h
+++ b/av1/common/x86/av1_inv_txfm_ssse3.h
@@ -14,7 +14,8 @@
 #include <emmintrin.h>  // SSE2
 #include <tmmintrin.h>  // SSSE3
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./av1_rtcd.h"
 #include "aom/aom_integer.h"
 #include "aom_dsp/x86/transpose_sse2.h"
diff --git a/av1/common/x86/av1_txfm_sse2.h b/av1/common/x86/av1_txfm_sse2.h
index f6a5591..649f05f 100644
--- a/av1/common/x86/av1_txfm_sse2.h
+++ b/av1/common/x86/av1_txfm_sse2.h
@@ -13,7 +13,8 @@
 
 #include <emmintrin.h>  // SSE2
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./av1_rtcd.h"
 #include "aom/aom_integer.h"
 #include "aom_dsp/x86/transpose_sse2.h"
diff --git a/av1/common/x86/highbd_inv_txfm_avx2.c b/av1/common/x86/highbd_inv_txfm_avx2.c
index 20204ba..e88ea50 100644
--- a/av1/common/x86/highbd_inv_txfm_avx2.c
+++ b/av1/common/x86/highbd_inv_txfm_avx2.c
@@ -12,7 +12,8 @@
 #include <immintrin.h>
 
 #include "./av1_rtcd.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "av1/common/av1_inv_txfm1d_cfg.h"
 
 // Note:
diff --git a/av1/common/x86/highbd_inv_txfm_sse4.c b/av1/common/x86/highbd_inv_txfm_sse4.c
index 3b48309..5c11b19 100644
--- a/av1/common/x86/highbd_inv_txfm_sse4.c
+++ b/av1/common/x86/highbd_inv_txfm_sse4.c
@@ -12,7 +12,8 @@
 #include <smmintrin.h> /* SSE4.1 */
 
 #include "./av1_rtcd.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "av1/common/av1_inv_txfm1d_cfg.h"
 #include "av1/common/x86/highbd_txfm_utility_sse4.h"
 
diff --git a/av1/common/x86/intra_edge_sse4.c b/av1/common/x86/intra_edge_sse4.c
index 182c981..0833c84 100644
--- a/av1/common/x86/intra_edge_sse4.c
+++ b/av1/common/x86/intra_edge_sse4.c
@@ -12,7 +12,8 @@
 #include <assert.h>
 #include <smmintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./av1_rtcd.h"
 
 void av1_filter_intra_edge_sse4_1(uint8_t *p, int sz, int strength) {
diff --git a/av1/common/x86/selfguided_avx2.c b/av1/common/x86/selfguided_avx2.c
index 9d185cc..9f9478a 100644
--- a/av1/common/x86/selfguided_avx2.c
+++ b/av1/common/x86/selfguided_avx2.c
@@ -11,7 +11,8 @@
 
 #include <immintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./av1_rtcd.h"
 #include "av1/common/restoration.h"
 #include "aom_dsp/x86/synonyms.h"
diff --git a/av1/common/x86/selfguided_sse4.c b/av1/common/x86/selfguided_sse4.c
index de788d7..90cc530 100644
--- a/av1/common/x86/selfguided_sse4.c
+++ b/av1/common/x86/selfguided_sse4.c
@@ -1,6 +1,7 @@
 #include <smmintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./av1_rtcd.h"
 #include "av1/common/restoration.h"
 #include "aom_dsp/x86/synonyms.h"
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 2e286c1..d0315c7 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -12,7 +12,8 @@
 #include <assert.h>
 #include <stddef.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "./aom_scale_rtcd.h"
 #include "./av1_rtcd.h"
diff --git a/av1/decoder/decoder.h b/av1/decoder/decoder.h
index def7b1e..67554e0 100644
--- a/av1/decoder/decoder.h
+++ b/av1/decoder/decoder.h
@@ -12,7 +12,7 @@
 #ifndef AV1_DECODER_DECODER_H_
 #define AV1_DECODER_DECODER_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom/aom_codec.h"
 #include "aom_dsp/bitreader.h"
diff --git a/av1/decoder/decodetxb.h b/av1/decoder/decodetxb.h
index fb0b19f..101dde1 100644
--- a/av1/decoder/decodetxb.h
+++ b/av1/decoder/decodetxb.h
@@ -12,7 +12,8 @@
 #ifndef DECODETXB_H_
 #define DECODETXB_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "av1/common/blockd.h"
 #include "av1/common/onyxc_int.h"
 #include "av1/common/txb_common.h"
diff --git a/av1/decoder/detokenize.c b/av1/decoder/detokenize.c
index 2677055..9552543 100644
--- a/av1/decoder/detokenize.c
+++ b/av1/decoder/detokenize.c
@@ -9,7 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_mem/aom_mem.h"
 #include "aom_ports/mem.h"
 #include "av1/common/blockd.h"
diff --git a/av1/decoder/detokenize.h b/av1/decoder/detokenize.h
index fa6320a..ec85bf7e 100644
--- a/av1/decoder/detokenize.h
+++ b/av1/decoder/detokenize.h
@@ -12,7 +12,8 @@
 #ifndef AV1_DECODER_DETOKENIZE_H_
 #define AV1_DECODER_DETOKENIZE_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "av1/common/scan.h"
 #include "av1/decoder/decoder.h"
 
diff --git a/av1/decoder/dthread.c b/av1/decoder/dthread.c
index 253c0a8..ff03502 100644
--- a/av1/decoder/dthread.c
+++ b/av1/decoder/dthread.c
@@ -9,7 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_mem/aom_mem.h"
 #include "av1/common/reconinter.h"
 #include "av1/decoder/dthread.h"
diff --git a/av1/decoder/dthread.h b/av1/decoder/dthread.h
index 8b671e3..336a001 100644
--- a/av1/decoder/dthread.h
+++ b/av1/decoder/dthread.h
@@ -12,7 +12,8 @@
 #ifndef AV1_DECODER_DTHREAD_H_
 #define AV1_DECODER_DTHREAD_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_util/aom_thread.h"
 #include "aom/internal/aom_codec_internal.h"
 
diff --git a/av1/decoder/obu.c b/av1/decoder/obu.c
index 2775c0d..f3e3e28 100644
--- a/av1/decoder/obu.c
+++ b/av1/decoder/obu.c
@@ -11,7 +11,7 @@
 
 #include <assert.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom/aom_codec.h"
 #include "aom_dsp/bitreader_buffer.h"
diff --git a/av1/encoder/av1_quantize.h b/av1/encoder/av1_quantize.h
index 91bf429..eaf8374 100644
--- a/av1/encoder/av1_quantize.h
+++ b/av1/encoder/av1_quantize.h
@@ -12,7 +12,8 @@
 #ifndef AV1_ENCODER_QUANTIZE_H_
 #define AV1_ENCODER_QUANTIZE_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "av1/common/quant_common.h"
 #include "av1/common/scan.h"
 #include "av1/encoder/block.h"
diff --git a/av1/encoder/blockiness.c b/av1/encoder/blockiness.c
index 113ceb2..89ea004 100644
--- a/av1/encoder/blockiness.c
+++ b/av1/encoder/blockiness.c
@@ -10,7 +10,8 @@
  */
 
 #include "./av1_rtcd.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./aom_dsp_rtcd.h"
 #include "av1/common/common.h"
 #include "av1/common/filter.h"
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index deb39ec..1caec61 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -15,7 +15,7 @@
 
 #include "./av1_rtcd.h"
 #include "./aom_dsp_rtcd.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom_dsp/aom_dsp_common.h"
 #include "aom_dsp/binary_codes_writer.h"
diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c
index 0ec4ff6..e57b271 100644
--- a/av1/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -10,7 +10,7 @@
  */
 
 #include "./av1_rtcd.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
 
 #include "aom_dsp/bitwriter.h"
diff --git a/av1/encoder/encodemb.h b/av1/encoder/encodemb.h
index c8b9204..45f8699 100644
--- a/av1/encoder/encodemb.h
+++ b/av1/encoder/encodemb.h
@@ -12,7 +12,8 @@
 #ifndef AV1_ENCODER_ENCODEMB_H_
 #define AV1_ENCODER_ENCODEMB_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "av1/common/onyxc_int.h"
 #include "av1/encoder/block.h"
 #include "av1/encoder/tokenize.h"
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index fe748a9..d96eb05 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -13,7 +13,7 @@
 #include <math.h>
 #include <stdio.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "av1/common/alloccommon.h"
 #include "av1/common/cdef.h"
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 6b3c54b..023ed5a 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -14,7 +14,8 @@
 
 #include <stdio.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aomcx.h"
 
 #include "av1/common/alloccommon.h"
diff --git a/av1/encoder/encodetxb.h b/av1/encoder/encodetxb.h
index 5d41d19..8eba04d 100644
--- a/av1/encoder/encodetxb.h
+++ b/av1/encoder/encodetxb.h
@@ -12,7 +12,8 @@
 #ifndef ENCODETXB_H_
 #define ENCODETXB_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "av1/common/blockd.h"
 #include "av1/common/onyxc_int.h"
 #include "av1/common/txb_common.h"
diff --git a/av1/encoder/hash.h b/av1/encoder/hash.h
index b7454c2..8b62275 100644
--- a/av1/encoder/hash.h
+++ b/av1/encoder/hash.h
@@ -12,7 +12,8 @@
 #ifndef AV1_ENCODER_HASH_H_
 #define AV1_ENCODER_HASH_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 
 #ifdef __cplusplus
diff --git a/av1/encoder/hash_motion.h b/av1/encoder/hash_motion.h
index 9f0c4a8..8deb92e 100644
--- a/av1/encoder/hash_motion.h
+++ b/av1/encoder/hash_motion.h
@@ -12,7 +12,8 @@
 #ifndef AV1_ENCODER_HASH_MOTION_H_
 #define AV1_ENCODER_HASH_MOTION_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 #include "aom_scale/yv12config.h"
 #include "third_party/vector/vector.h"
diff --git a/av1/encoder/hybrid_fwd_txfm.c b/av1/encoder/hybrid_fwd_txfm.c
index b2185d3..92fad59 100644
--- a/av1/encoder/hybrid_fwd_txfm.c
+++ b/av1/encoder/hybrid_fwd_txfm.c
@@ -10,7 +10,7 @@
  */
 
 #include "./av1_rtcd.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
 
 #include "av1/common/idct.h"
diff --git a/av1/encoder/hybrid_fwd_txfm.h b/av1/encoder/hybrid_fwd_txfm.h
index b25ffb8..6155b25 100644
--- a/av1/encoder/hybrid_fwd_txfm.h
+++ b/av1/encoder/hybrid_fwd_txfm.h
@@ -12,7 +12,7 @@
 #ifndef AV1_ENCODER_HYBRID_FWD_TXFM_H_
 #define AV1_ENCODER_HYBRID_FWD_TXFM_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/av1/encoder/lookahead.c b/av1/encoder/lookahead.c
index 2dd631a..1bf8ecba 100644
--- a/av1/encoder/lookahead.c
+++ b/av1/encoder/lookahead.c
@@ -11,10 +11,9 @@
 #include <assert.h>
 #include <stdlib.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "av1/common/common.h"
-
 #include "av1/encoder/encoder.h"
 #include "av1/encoder/extend.h"
 #include "av1/encoder/lookahead.h"
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c
index 6c46400..44406b5 100644
--- a/av1/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -13,7 +13,7 @@
 #include <math.h>
 #include <stdio.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
 
 #include "aom_dsp/aom_dsp_common.h"
diff --git a/av1/encoder/temporal_filter.c b/av1/encoder/temporal_filter.c
index 03f751e..250feab 100644
--- a/av1/encoder/temporal_filter.c
+++ b/av1/encoder/temporal_filter.c
@@ -12,7 +12,8 @@
 #include <math.h>
 #include <limits.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "av1/common/alloccommon.h"
 #include "av1/common/onyxc_int.h"
 #include "av1/common/quant_common.h"
diff --git a/av1/encoder/x86/av1_fwd_txfm_sse2.h b/av1/encoder/x86/av1_fwd_txfm_sse2.h
index 228ea5f..d1e8f78 100644
--- a/av1/encoder/x86/av1_fwd_txfm_sse2.h
+++ b/av1/encoder/x86/av1_fwd_txfm_sse2.h
@@ -13,7 +13,8 @@
 
 #include <immintrin.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./av1_rtcd.h"
 #include "aom/aom_integer.h"
 #include "aom_dsp/x86/transpose_sse2.h"
diff --git a/av1/encoder/x86/highbd_fwd_txfm_sse4.c b/av1/encoder/x86/highbd_fwd_txfm_sse4.c
index db7e15d..1742476 100644
--- a/av1/encoder/x86/highbd_fwd_txfm_sse4.c
+++ b/av1/encoder/x86/highbd_fwd_txfm_sse4.c
@@ -12,7 +12,8 @@
 #include <smmintrin.h> /* SSE4.1 */
 
 #include "./av1_rtcd.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "av1/common/av1_txfm.h"
 #include "av1/common/x86/highbd_txfm_utility_sse4.h"
 #include "av1/encoder/av1_fwd_txfm1d_cfg.h"
diff --git a/build/cmake/aom_configure.cmake b/build/cmake/aom_configure.cmake
index 9220a32..662c405 100644
--- a/build/cmake/aom_configure.cmake
+++ b/build/cmake/aom_configure.cmake
@@ -309,16 +309,18 @@
 endif()
 
 # Generate aom_config templates.
-set(aom_config_asm_template "${AOM_CONFIG_DIR}/aom_config.asm.cmake")
-set(aom_config_h_template "${AOM_CONFIG_DIR}/aom_config.h.cmake")
+set(aom_config_asm_template "${AOM_CONFIG_DIR}/config/aom_config.asm.cmake")
+set(aom_config_h_template "${AOM_CONFIG_DIR}/config/aom_config.h.cmake")
 execute_process(COMMAND
                   ${CMAKE_COMMAND} -DAOM_CONFIG_DIR=${AOM_CONFIG_DIR}
                   -DAOM_ROOT=${AOM_ROOT} -P
                   "${AOM_ROOT}/build/cmake/generate_aom_config_templates.cmake")
 
 # Generate aom_config.{asm,h}.
-configure_file("${aom_config_asm_template}" "${AOM_CONFIG_DIR}/aom_config.asm")
-configure_file("${aom_config_h_template}" "${AOM_CONFIG_DIR}/aom_config.h")
+configure_file("${aom_config_asm_template}"
+               "${AOM_CONFIG_DIR}/config/aom_config.asm")
+configure_file("${aom_config_h_template}"
+               "${AOM_CONFIG_DIR}/config/aom_config.h")
 
 # Read the current git hash.
 find_package(Git)
@@ -327,7 +329,7 @@
 endif()
 
 configure_file("${AOM_ROOT}/build/cmake/aom_config.c.template"
-               "${AOM_CONFIG_DIR}/aom_config.c")
+               "${AOM_CONFIG_DIR}/config/aom_config.c")
 
 # Find Perl and generate the RTCD sources.
 find_package(Perl)
diff --git a/build/cmake/generate_aom_config_templates.cmake b/build/cmake/generate_aom_config_templates.cmake
index eef5eb8..6ea0229 100644
--- a/build/cmake/generate_aom_config_templates.cmake
+++ b/build/cmake/generate_aom_config_templates.cmake
@@ -80,7 +80,7 @@
 include("${AOM_ROOT}/build/cmake/aom_config_defaults.cmake")
 get_cmake_property(cmake_cache_vars CACHE_VARIABLES)
 
-set(aom_config_h_template "${AOM_CONFIG_DIR}/aom_config.h.cmake")
+set(aom_config_h_template "${AOM_CONFIG_DIR}/config/aom_config.h.cmake")
 file(WRITE "${aom_config_h_template}" ${h_file_header_block})
 foreach(cache_var ${cmake_cache_vars})
   if(NOT "${cache_var}" MATCHES "AOM_CONFIG_DIR\|AOM_ROOT\|^CMAKE_")
@@ -90,7 +90,7 @@
 endforeach()
 file(APPEND "${aom_config_h_template}" "\#endif  /* AOM_CONFIG_H_ */")
 
-set(aom_asm_config_template "${AOM_CONFIG_DIR}/aom_config.asm.cmake")
+set(aom_asm_config_template "${AOM_CONFIG_DIR}/config/aom_config.asm.cmake")
 file(WRITE "${aom_asm_config_template}" ${asm_file_header_block})
 foreach(cache_var ${cmake_cache_vars})
   if(NOT "${cache_var}" MATCHES "AOM_CONFIG_DIR\|AOM_ROOT\|^CMAKE_\|INLINE")
diff --git a/build/make/rtcd.pl b/build/make/rtcd.pl
index e0dfe54..7c85e42 100755
--- a/build/make/rtcd.pl
+++ b/build/make/rtcd.pl
@@ -297,7 +297,7 @@
 
   common_top;
   print <<EOF;
-#include "aom_config.h"
+#include "config/aom_config.h"
 
 #ifdef RTCD_C
 #include "aom_ports/arm.h"
@@ -323,7 +323,7 @@
   common_top;
 
   print <<EOF;
-#include "aom_config.h"
+#include "config/aom_config.h"
 
 #ifdef RTCD_C
 static void setup_rtcd_internal(void)
@@ -348,7 +348,7 @@
   common_top;
 
   print <<EOF;
-#include "aom_config.h"
+#include "config/aom_config.h"
 
 #ifdef RTCD_C
 static void setup_rtcd_internal(void)
@@ -368,7 +368,7 @@
   determine_indirection "c";
   common_top;
   print <<EOF;
-#include "aom_config.h"
+#include "config/aom_config.h"
 
 #ifdef RTCD_C
 static void setup_rtcd_internal(void)
diff --git a/common/tools_common.h b/common/tools_common.h
index 860c1ce..904054b 100644
--- a/common/tools_common.h
+++ b/common/tools_common.h
@@ -13,7 +13,8 @@
 
 #include <stdio.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_codec.h"
 #include "aom/aom_image.h"
 #include "aom/aom_integer.h"
diff --git a/examples/inspect.c b/examples/inspect.c
index 3c9cba5..2b459e1 100644
--- a/examples/inspect.c
+++ b/examples/inspect.c
@@ -25,7 +25,7 @@
 #define EMSCRIPTEN_KEEPALIVE
 #endif
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom/aom_decoder.h"
 #include "aom/aomdx.h"
diff --git a/test/aq_segment_test.cc b/test/aq_segment_test.cc
index c72d9ae..bbb5027 100644
--- a/test/aq_segment_test.cc
+++ b/test/aq_segment_test.cc
@@ -9,7 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 #include "test/codec_factory.h"
 #include "test/encode_test_driver.h"
diff --git a/test/av1_quantize_test.cc b/test/av1_quantize_test.cc
index e6bd3d6..e379eb6 100644
--- a/test/av1_quantize_test.cc
+++ b/test/av1_quantize_test.cc
@@ -12,8 +12,9 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./av1_rtcd.h"
+
 #include "test/acm_random.h"
 #include "test/clear_system_state.h"
 #include "test/register_state_check.h"
diff --git a/test/av1_wedge_utils_test.cc b/test/av1_wedge_utils_test.cc
index d4b560f..79f3b40 100644
--- a/test/av1_wedge_utils_test.cc
+++ b/test/av1_wedge_utils_test.cc
@@ -11,8 +11,7 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
-
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
 #include "./av1_rtcd.h"
 
diff --git a/test/avg_test.cc b/test/avg_test.cc
index c3c6a03..a89b9b1 100644
--- a/test/avg_test.cc
+++ b/test/avg_test.cc
@@ -15,7 +15,7 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
 
 #include "test/acm_random.h"
diff --git a/test/binary_codes_test.cc b/test/binary_codes_test.cc
index 7203966..45660cf 100644
--- a/test/binary_codes_test.cc
+++ b/test/binary_codes_test.cc
@@ -15,7 +15,8 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "test/acm_random.h"
 #include "aom/aom_integer.h"
 #include "aom_dsp/bitreader.h"
diff --git a/test/blend_a64_mask_1d_test.cc b/test/blend_a64_mask_1d_test.cc
index e8e9556..417a02e 100644
--- a/test/blend_a64_mask_1d_test.cc
+++ b/test/blend_a64_mask_1d_test.cc
@@ -17,8 +17,9 @@
 #include "test/register_state_check.h"
 #include "test/function_equivalence_test.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "aom/aom_integer.h"
 
 #include "./av1_rtcd.h"
diff --git a/test/blend_a64_mask_test.cc b/test/blend_a64_mask_test.cc
index 519f854..3a2fa4e 100644
--- a/test/blend_a64_mask_test.cc
+++ b/test/blend_a64_mask_test.cc
@@ -17,8 +17,9 @@
 #include "test/register_state_check.h"
 #include "test/function_equivalence_test.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "aom/aom_integer.h"
 
 #include "./av1_rtcd.h"
diff --git a/test/cdef_test.cc b/test/cdef_test.cc
index d15f8d7..d51a2f4 100644
--- a/test/cdef_test.cc
+++ b/test/cdef_test.cc
@@ -14,8 +14,9 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./av1_rtcd.h"
+
 #include "aom_ports/aom_timer.h"
 #include "av1/common/cdef_block.h"
 #include "test/acm_random.h"
diff --git a/test/clear_system_state.h b/test/clear_system_state.h
index 4f3c1ee..7aa7824 100644
--- a/test/clear_system_state.h
+++ b/test/clear_system_state.h
@@ -11,7 +11,8 @@
 #ifndef TEST_CLEAR_SYSTEM_STATE_H_
 #define TEST_CLEAR_SYSTEM_STATE_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #if ARCH_X86 || ARCH_X86_64
 #include "aom_ports/x86.h"
 #endif
diff --git a/test/codec_factory.h b/test/codec_factory.h
index 700960a..dee25a8 100644
--- a/test/codec_factory.h
+++ b/test/codec_factory.h
@@ -11,7 +11,8 @@
 #ifndef TEST_CODEC_FACTORY_H_
 #define TEST_CODEC_FACTORY_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom/aom_decoder.h"
 #include "aom/aom_encoder.h"
 #if CONFIG_AV1_ENCODER
diff --git a/test/coding_path_sync.cc b/test/coding_path_sync.cc
index 8171cf1..51a5060 100644
--- a/test/coding_path_sync.cc
+++ b/test/coding_path_sync.cc
@@ -13,7 +13,7 @@
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 #include "test/acm_random.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 
 #include "aom_ports/mem.h"  // ROUND_POWER_OF_TWO
 #include "aom/aomcx.h"
diff --git a/test/comp_mask_variance_test.cc b/test/comp_mask_variance_test.cc
index 0b5c5b7..38e8187 100644
--- a/test/comp_mask_variance_test.cc
+++ b/test/comp_mask_variance_test.cc
@@ -12,8 +12,9 @@
 #include <cstdlib>
 #include <new>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "aom/aom_codec.h"
 #include "aom/aom_integer.h"
 #include "aom_dsp/variance.h"
diff --git a/test/convolve_test.cc b/test/convolve_test.cc
index ae4c438..cd1a4b4 100644
--- a/test/convolve_test.cc
+++ b/test/convolve_test.cc
@@ -13,8 +13,9 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "aom_dsp/aom_dsp_common.h"
 #include "aom_dsp/aom_filter.h"
 #include "aom_mem/aom_mem.h"
diff --git a/test/datarate_test.cc b/test/datarate_test.cc
index 4ad3101..1588d3c 100644
--- a/test/datarate_test.cc
+++ b/test/datarate_test.cc
@@ -9,7 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 #include "test/codec_factory.h"
 #include "test/encode_test_driver.h"
diff --git a/test/decode_api_test.cc b/test/decode_api_test.cc
index 7a96a67..97cbd06 100644
--- a/test/decode_api_test.cc
+++ b/test/decode_api_test.cc
@@ -11,7 +11,8 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "test/util.h"
 #include "aom/aomdx.h"
 #include "aom/aom_decoder.h"
diff --git a/test/decode_test_driver.h b/test/decode_test_driver.h
index f473bc7..916efda 100644
--- a/test/decode_test_driver.h
+++ b/test/decode_test_driver.h
@@ -13,7 +13,9 @@
 #define TEST_DECODE_TEST_DRIVER_H_
 #include <cstring>
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
+
 #include "aom/aom_decoder.h"
 
 namespace libaom_test {
diff --git a/test/encode_api_test.cc b/test/encode_api_test.cc
index 32eb554..c469d08 100644
--- a/test/encode_api_test.cc
+++ b/test/encode_api_test.cc
@@ -11,7 +11,8 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "test/util.h"
 #include "aom/aomcx.h"
 #include "aom/aom_encoder.h"
diff --git a/test/encode_perf_test.cc b/test/encode_perf_test.cc
index 9f3d753..dc30daa 100644
--- a/test/encode_perf_test.cc
+++ b/test/encode_perf_test.cc
@@ -11,7 +11,9 @@
 
 #include <string>
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
+
 #include "./aom_version.h"
 #include "test/codec_factory.h"
 #include "test/encode_test_driver.h"
diff --git a/test/encode_test_driver.cc b/test/encode_test_driver.cc
index 7b6a86c..b75d7be 100644
--- a/test/encode_test_driver.cc
+++ b/test/encode_test_driver.cc
@@ -13,7 +13,8 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_ports/mem.h"
 #include "test/codec_factory.h"
 #include "test/decode_test_driver.h"
diff --git a/test/encode_test_driver.h b/test/encode_test_driver.h
index 89ea607..138cd6a 100644
--- a/test/encode_test_driver.h
+++ b/test/encode_test_driver.h
@@ -16,7 +16,8 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #if CONFIG_AV1_ENCODER
 #include "aom/aomcx.h"
 #endif
diff --git a/test/encodetxb_test.cc b/test/encodetxb_test.cc
index 6a4f3cf..d7a0334 100644
--- a/test/encodetxb_test.cc
+++ b/test/encodetxb_test.cc
@@ -15,8 +15,9 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./av1_rtcd.h"
+
 #include "aom_ports/aom_timer.h"
 #include "aom_ports/mem.h"
 #include "av1/common/idct.h"
diff --git a/test/error_block_test.cc b/test/error_block_test.cc
index 345c6cc..867aded 100644
--- a/test/error_block_test.cc
+++ b/test/error_block_test.cc
@@ -15,8 +15,9 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./av1_rtcd.h"
+
 #include "test/acm_random.h"
 #include "test/clear_system_state.h"
 #include "test/register_state_check.h"
diff --git a/test/hash_test.cc b/test/hash_test.cc
index ebd4a0e..0f6905a 100644
--- a/test/hash_test.cc
+++ b/test/hash_test.cc
@@ -12,8 +12,9 @@
 #include <cstdlib>
 #include <new>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./av1_rtcd.h"
+
 #include "aom_ports/aom_timer.h"
 #include "av1/encoder/hash.h"
 #include "test/acm_random.h"
diff --git a/test/hbd_metrics_test.cc b/test/hbd_metrics_test.cc
index 60c101e..09df9bd 100644
--- a/test/hbd_metrics_test.cc
+++ b/test/hbd_metrics_test.cc
@@ -16,7 +16,9 @@
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 #include "test/acm_random.h"
 #include "test/util.h"
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
+
 #include "aom_dsp/psnr.h"
 #include "aom_dsp/ssim.h"
 #include "aom_ports/mem.h"
diff --git a/test/intra_edge_test.cc b/test/intra_edge_test.cc
index 5a8fff4..ab5a3c9 100644
--- a/test/intra_edge_test.cc
+++ b/test/intra_edge_test.cc
@@ -17,8 +17,9 @@
 #include "test/register_state_check.h"
 #include "test/function_equivalence_test.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "aom/aom_integer.h"
 
 #include "./av1_rtcd.h"
diff --git a/test/intrabc_test.cc b/test/intrabc_test.cc
index a1ff337..3ea4217 100644
--- a/test/intrabc_test.cc
+++ b/test/intrabc_test.cc
@@ -11,7 +11,8 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "av1/common/blockd.h"
 #include "av1/common/enums.h"
 #include "av1/common/mv.h"
diff --git a/test/intrapred_test.cc b/test/intrapred_test.cc
index 055165b..6ff09d7 100644
--- a/test/intrapred_test.cc
+++ b/test/intrapred_test.cc
@@ -13,8 +13,9 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "test/acm_random.h"
 #include "test/clear_system_state.h"
 #include "test/register_state_check.h"
diff --git a/test/lossless_test.cc b/test/lossless_test.cc
index 2e1aca6..3f8e89c 100644
--- a/test/lossless_test.cc
+++ b/test/lossless_test.cc
@@ -11,7 +11,8 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "test/codec_factory.h"
 #include "test/encode_test_driver.h"
 #include "test/i420_video_source.h"
diff --git a/test/lpf_test.cc b/test/lpf_test.cc
index 198bd1f..94a4b00 100644
--- a/test/lpf_test.cc
+++ b/test/lpf_test.cc
@@ -15,8 +15,9 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "test/acm_random.h"
 #include "test/clear_system_state.h"
 #include "test/register_state_check.h"
diff --git a/test/masked_sad_test.cc b/test/masked_sad_test.cc
index 3651b36..d3dbedb 100644
--- a/test/masked_sad_test.cc
+++ b/test/masked_sad_test.cc
@@ -18,8 +18,9 @@
 #include "test/register_state_check.h"
 #include "test/util.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "aom/aom_integer.h"
 
 using libaom_test::ACMRandom;
diff --git a/test/masked_variance_test.cc b/test/masked_variance_test.cc
index b1eb352..ee71246 100644
--- a/test/masked_variance_test.cc
+++ b/test/masked_variance_test.cc
@@ -19,8 +19,9 @@
 #include "test/register_state_check.h"
 #include "test/util.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "aom/aom_codec.h"
 #include "aom/aom_integer.h"
 #include "aom_dsp/aom_filter.h"
diff --git a/test/obmc_sad_test.cc b/test/obmc_sad_test.cc
index 64fd81d..4679ccc 100644
--- a/test/obmc_sad_test.cc
+++ b/test/obmc_sad_test.cc
@@ -14,8 +14,9 @@
 #include "test/function_equivalence_test.h"
 #include "test/register_state_check.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "aom/aom_integer.h"
 
 #define MAX_SB_SQUARE (MAX_SB_SIZE * MAX_SB_SIZE)
diff --git a/test/obmc_variance_test.cc b/test/obmc_variance_test.cc
index 5fc1e9c..45c051a 100644
--- a/test/obmc_variance_test.cc
+++ b/test/obmc_variance_test.cc
@@ -15,8 +15,9 @@
 #include "test/function_equivalence_test.h"
 #include "test/register_state_check.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "aom/aom_integer.h"
 
 #define MAX_SB_SQUARE (MAX_SB_SIZE * MAX_SB_SIZE)
diff --git a/test/qm_test.cc b/test/qm_test.cc
index b3731d9..c87506b 100644
--- a/test/qm_test.cc
+++ b/test/qm_test.cc
@@ -8,7 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 #include "test/codec_factory.h"
 #include "test/encode_test_driver.h"
diff --git a/test/quantize_func_test.cc b/test/quantize_func_test.cc
index 6ce8c07..ea8553f 100644
--- a/test/quantize_func_test.cc
+++ b/test/quantize_func_test.cc
@@ -11,9 +11,10 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
 #include "./av1_rtcd.h"
+
 #include "aom/aom_codec.h"
 #include "aom_ports/aom_timer.h"
 #include "av1/encoder/encoder.h"
diff --git a/test/reconinter_test.cc b/test/reconinter_test.cc
index 1161943..58d04f5 100644
--- a/test/reconinter_test.cc
+++ b/test/reconinter_test.cc
@@ -13,8 +13,9 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./av1_rtcd.h"
+
 #include "aom_ports/mem.h"
 #include "av1/common/scan.h"
 #include "av1/common/txb_common.h"
diff --git a/test/register_state_check.h b/test/register_state_check.h
index bb43769..800d297 100644
--- a/test/register_state_check.h
+++ b/test/register_state_check.h
@@ -13,7 +13,9 @@
 #define TEST_REGISTER_STATE_CHECK_H_
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
+
 #include "aom/aom_integer.h"
 
 // ASM_REGISTER_STATE_CHECK(asm_function)
diff --git a/test/sad_test.cc b/test/sad_test.cc
index 3959e24..092a42d 100644
--- a/test/sad_test.cc
+++ b/test/sad_test.cc
@@ -15,8 +15,9 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "test/acm_random.h"
 #include "test/clear_system_state.h"
 #include "test/register_state_check.h"
diff --git a/test/subtract_test.cc b/test/subtract_test.cc
index e218aab..a990f27 100644
--- a/test/subtract_test.cc
+++ b/test/subtract_test.cc
@@ -11,8 +11,9 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "test/acm_random.h"
 #include "test/clear_system_state.h"
 #include "test/register_state_check.h"
diff --git a/test/sum_squares_test.cc b/test/sum_squares_test.cc
index d455c01..6138a8b 100644
--- a/test/sum_squares_test.cc
+++ b/test/sum_squares_test.cc
@@ -15,8 +15,9 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "aom_ports/mem.h"
 #include "test/acm_random.h"
 #include "test/clear_system_state.h"
diff --git a/test/test_libaom.cc b/test/test_libaom.cc
index c490588..92d40b5 100644
--- a/test/test_libaom.cc
+++ b/test/test_libaom.cc
@@ -15,7 +15,8 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #if ARCH_X86 || ARCH_X86_64
 #include "aom_ports/x86.h"
 #endif
diff --git a/test/tools_common.sh b/test/tools_common.sh
index c34cf3a..d159e8f 100755
--- a/test/tools_common.sh
+++ b/test/tools_common.sh
@@ -144,7 +144,7 @@
 # is available.
 aom_config_option_enabled() {
   aom_config_option="${1}"
-  aom_config_file="${LIBAOM_CONFIG_PATH}/aom_config.h"
+  aom_config_file="${LIBAOM_CONFIG_PATH}/config/aom_config.h"
   config_line=$(grep "${aom_config_option}" "${aom_config_file}")
   if echo "${config_line}" | egrep -q '1$'; then
     echo yes
diff --git a/test/transform_test_base.h b/test/transform_test_base.h
index 16d003d..67e8faf 100644
--- a/test/transform_test_base.h
+++ b/test/transform_test_base.h
@@ -12,7 +12,8 @@
 #ifndef TEST_TRANSFORM_TEST_BASE_H_
 #define TEST_TRANSFORM_TEST_BASE_H_
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "aom_mem/aom_mem.h"
 #include "aom/aom_codec.h"
 #include "aom_dsp/txfm_common.h"
diff --git a/test/variance_test.cc b/test/variance_test.cc
index ddbdddf..97ea5ad 100644
--- a/test/variance_test.cc
+++ b/test/variance_test.cc
@@ -14,8 +14,9 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
 #include "./aom_dsp_rtcd.h"
+
 #include "test/acm_random.h"
 #include "test/clear_system_state.h"
 #include "test/register_state_check.h"
diff --git a/test/y4m_test.cc b/test/y4m_test.cc
index ad901d9..e8848fe 100644
--- a/test/y4m_test.cc
+++ b/test/y4m_test.cc
@@ -13,7 +13,8 @@
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./y4menc.h"
 #include "test/md5_helper.h"
 #include "test/util.h"
diff --git a/third_party/x86inc/x86inc.asm b/third_party/x86inc/x86inc.asm
index cfee99c7..adaf2d9 100644
--- a/third_party/x86inc/x86inc.asm
+++ b/third_party/x86inc/x86inc.asm
@@ -34,7 +34,7 @@
 ; as this feature might be useful for others as well.  Send patches or ideas
 ; to x264-devel@videolan.org .
 
-%include "aom_config.asm"
+%include "config/aom_config.asm"
 
 %ifndef private_prefix
     %define private_prefix aom
diff --git a/tools/aom_entropy_optimizer.c b/tools/aom_entropy_optimizer.c
index f438ea5..551adf4 100644
--- a/tools/aom_entropy_optimizer.c
+++ b/tools/aom_entropy_optimizer.c
@@ -25,7 +25,9 @@
 
 #include <assert.h>
 #include <stdio.h>
-#include "./aom_config.h"
+
+#include "config/aom_config.h"
+
 #include "av1/encoder/encoder.h"
 
 #define SPACES_PER_TAB 2
diff --git a/tools/dump_obu.cc b/tools/dump_obu.cc
index 02c1890..69e39c7 100644
--- a/tools/dump_obu.cc
+++ b/tools/dump_obu.cc
@@ -15,7 +15,8 @@
 #include <memory>
 #include <string>
 
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
 #include "./ivfdec.h"
 #include "./obudec.h"
 #include "tools/obu_parser.h"
diff --git a/tools/obu_parser.cc b/tools/obu_parser.cc
index e07763c..de5c5c8 100644
--- a/tools/obu_parser.cc
+++ b/tools/obu_parser.cc
@@ -12,11 +12,6 @@
 #include <cstdio>
 #include <string>
 
-// TODO(tomfinegan): Remove the aom_config.h include as soon as possible. At
-// present it's required because aom_config.h determines if the library writes
-// OBUs.
-#include "./aom_config.h"
-
 #include "aom/aom_codec.h"
 #include "aom/aom_integer.h"
 #include "aom_ports/mem_ops.h"