diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am index 09c489ca7..d97a29574 100644 --- a/src/cli/Makefile.am +++ b/src/cli/Makefile.am @@ -108,10 +108,15 @@ include $(abs_top_nlbuild_autotools_dir)/automake/pre.am # Unless and until these libraries do not "accidently" suck in # a "flavored" header file somewhere. -lib_LIBRARIES = \ - libopenthread-cli-mtd.a \ - libopenthread-cli-ftd.a \ - $(NULL) +lib_LIBRARIES = $(NULL) + +if OPENTHREAD_ENABLE_FTD +lib_LIBRARIES += libopenthread-cli-ftd.a +endif + +if OPENTHREAD_ENABLE_MTD +lib_LIBRARIES += libopenthread-cli-mtd.a +endif CPPFLAGS_COMMON = \ -I$(top_srcdir)/include \ diff --git a/src/ncp/Makefile.am b/src/ncp/Makefile.am index f17f9ba6d..f01b41fdd 100644 --- a/src/ncp/Makefile.am +++ b/src/ncp/Makefile.am @@ -34,12 +34,19 @@ EXTRA_DIST = \ # Pull in the sources that comprise the OpenThread NCP library. -lib_LIBRARIES = \ - libopenthread-ncp-mtd.a \ - libopenthread-ncp-ftd.a \ - libopenthread-ncp-radio.a \ - $(NULL) +lib_LIBRARIES = $(NULL) +if OPENTHREAD_ENABLE_FTD +lib_LIBRARIES += libopenthread-ncp-ftd.a +endif + +if OPENTHREAD_ENABLE_MTD +lib_LIBRARIES += libopenthread-ncp-mtd.a +endif + +if OPENTHREAD_ENABLE_RADIO_ONLY +lib_LIBRARIES += libopenthread-ncp-radio.a +endif COMMON_CPPFLAGS = \ -I$(top_srcdir)/include \