From b000425e5283ef50d73ebe52395cde78bbbf7b7f Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 4 Sep 2014 11:43:41 -0600 Subject: [PATCH] In the kernel build, only the user libraries should be exported. --- FlatLibs.mk | 6 ++++++ KernelLibs.mk | 6 ++++++ Makefile.unix | 13 +++++++++++-- Makefile.win | 13 +++++++++++-- ProtectedLibs.mk | 6 ++++++ 5 files changed, 40 insertions(+), 4 deletions(-) diff --git a/FlatLibs.mk b/FlatLibs.mk index 58f443a523..5bac59aedb 100644 --- a/FlatLibs.mk +++ b/FlatLibs.mk @@ -39,6 +39,8 @@ # is disabled. # USERLIBS is the list of libraries used to build the final user-space # application +# EXPORTLIBS is the list of libraries that should be exported by +# 'make export' is NUTTXLIBS = lib$(DELIM)libsched$(LIBEXT) USERLIBS = @@ -102,3 +104,7 @@ endif ifeq ($(CONFIG_AUDIO),y) NUTTXLIBS += lib$(DELIM)libaudio$(LIBEXT) endif + +# Export all libraries + +EXPORTLIBS = $(NUTTXLIBS) diff --git a/KernelLibs.mk b/KernelLibs.mk index 8d7c35920b..2f18704933 100644 --- a/KernelLibs.mk +++ b/KernelLibs.mk @@ -39,6 +39,8 @@ # is disabled. # USERLIBS is the list of libraries used to build the final user-space # application +# EXPORTLIBS is the list of libraries that should be exported by +# 'make export' is NUTTXLIBS = lib$(DELIM)libsched$(LIBEXT) USERLIBS = @@ -97,3 +99,7 @@ endif ifeq ($(CONFIG_AUDIO),y) NUTTXLIBS += lib$(DELIM)libaudio$(LIBEXT) endif + +# Export only the user libraries + +EXPORTLIBS = $(USERLIBS) diff --git a/Makefile.unix b/Makefile.unix index 5f64360fd7..959cabfd19 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -123,6 +123,15 @@ EXTRA_OBJS += $(CONFIG_PASS1_OBJECT) endif # Library build selections +# +# NUTTXLIBS is the list of NuttX libraries that is passed to the +# processor-specific Makefile to build the final NuttX target. +# Libraries in FSDIRS are excluded if file descriptor support +# is disabled. +# USERLIBS is the list of libraries used to build the final user-space +# application +# EXPORTLIBS is the list of libraries that should be exported by +# 'make export' is ifeq ($(CONFIG_BUILD_PROTECTED),y) include ProtectedLibs.mk @@ -135,7 +144,7 @@ endif endif # LINKLIBS derives from NUTTXLIBS and is simply the same list with the -# subdirectory removed +# subdirectory removed LINKLIBS = $(patsubst lib/%,%,$(NUTTXLIBS)) @@ -616,7 +625,7 @@ gconfig: # that the archiver is 'ar' export: pass2deps - $(Q) tools/mkexport.sh -w$(WINTOOL) -t "$(TOPDIR)" -l "$(NUTTXLIBS)" + $(Q) tools/mkexport.sh -w$(WINTOOL) -t "$(TOPDIR)" -l "$(EXPORTLIBS)" # General housekeeping targets: dependencies, cleaning, etc. # diff --git a/Makefile.win b/Makefile.win index 2cd9a0b84c..0efec094fc 100644 --- a/Makefile.win +++ b/Makefile.win @@ -116,6 +116,15 @@ EXTRA_OBJS += $(CONFIG_PASS1_OBJECT) endif # Library build selections +# +# NUTTXLIBS is the list of NuttX libraries that is passed to the +# processor-specific Makefile to build the final NuttX target. +# Libraries in FSDIRS are excluded if file descriptor support +# is disabled. +# USERLIBS is the list of libraries used to build the final user-space +# application +# EXPORTLIBS is the list of libraries that should be exported by +# 'make export' is ifeq ($(CONFIG_BUILD_PROTECTED),y) include ProtectedLibs.mk @@ -128,7 +137,7 @@ endif endif # LINKLIBS derives from NUTTXLIBS and is simply the same list with the -# subdirectory removed +# subdirectory removed LINKLIBS = $(patsubst lib\\%,%,$(NUTTXLIBS)) @@ -613,7 +622,7 @@ menuconfig: configenv # that the archiver is 'ar' export: pass2deps - $(Q) tools\mkexport.sh -w$(WINTOOL) -t "$(TOPDIR)" -l "$(NUTTXLIBS)" + $(Q) tools\mkexport.sh -w$(WINTOOL) -t "$(TOPDIR)" -l "$(EXPORTLIBS)" # General housekeeping targets: dependencies, cleaning, etc. # diff --git a/ProtectedLibs.mk b/ProtectedLibs.mk index 1a7a35fcf3..c5d688db1d 100644 --- a/ProtectedLibs.mk +++ b/ProtectedLibs.mk @@ -39,6 +39,8 @@ # is disabled. # USERLIBS is the list of libraries used to build the final user-space # application +# EXPORTLIBS is the list of libraries that should be exported by +# 'make export' is NUTTXLIBS = lib$(DELIM)libsched$(LIBEXT) USERLIBS = @@ -107,3 +109,7 @@ endif ifeq ($(CONFIG_AUDIO),y) NUTTXLIBS += lib$(DELIM)libaudio$(LIBEXT) endif + +# Export only the user libraries + +EXPORTLIBS = $(USERLIBS)