Description
I'm building a project, there are more than one libraries, so I move your example lib files to its subdirectory like following
lib
├── Kconfig
├── log_print
│ ├── Kconfig
│ ├── list_debug.c
│ ├── log_print.c
│ └── Makefile
└── Makefile
cat lib/Makefile
lib-$(CONFIG_ENABLE_LOGGING) += log_print/
cat lib/Kconfig
source "lib/log_print/Kconfig"
cat lib/log_print/Makefile
lib-$(CONFIG_ENABLE_LOGGING) += log_print.o
lib-$(CONFIG_DEBUG_LIST) += list_debug.o
lib/log_print/Kconfig stays the same as original lib/Kconfig
lib/log_print/Makefile stays the same as original lib/Makefile
but error occurs when making, need your help, thanks
AR lib/lib.a
ar: lib/log_print/: file format not recognized
make[1]: *** [scripts/Makefile.build:237: lib/lib.a] Error 1
make: *** [Makefile:369: lib] Error 2