[Cbe-oss-dev] [PATCH 1/2]MARS: fix makefile kernel lib build order

Kazunori Asayama asayama at sm.sony.co.jp
Wed Sep 10 11:52:36 EST 2008


Yuji Mano wrote:
> This fixes a bug in the Makefile that would build the kernel before the lib
> which the kernel is dependent on.
> 
> This also makes sure the kernel links the lib in the build source and not just
> any libmars.a it finds in the library search path.
> 
> Signed-off-by: Yuji Mano <yuji.mano at am.sony.com>
> 
> ---
>  src/mpu/Makefile.am        |    2 +-
>  src/mpu/kernel/Makefile.am |    3 +--
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> --- a/src/mpu/Makefile.am
> +++ b/src/mpu/Makefile.am
> @@ -36,7 +36,7 @@
>  #  LIBRARY OR THE USE OR OTHER DEALINGS IN THE LIBRARY.
>  #
>  
> -SUBDIRS = kernel lib
> +SUBDIRS = lib kernel
>  
>  EXTRA_DIST = \
>  	bootstrap \
> --- a/src/mpu/kernel/Makefile.am
> +++ b/src/mpu/kernel/Makefile.am
> @@ -54,13 +54,12 @@ mars_kernel_CFLAGS = \
>  	-Wmissing-declarations
>  
>  mars_kernel_LDFLAGS = \
> -	-L../lib \
>  	-Wl,--defsym=__stack=0x0fff0 \
>  	-Wl,-gc-sections \
>  	-Wl,-N \
>  	-Wl,-s
>  
> -mars_kernel_LDADD = -lmars
> +mars_kernel_LDADD = $(srcdir)/../lib/libmars.a

I think $(builddir) should be used here instead of $(srcdir).

>  
>  mars_kernel_SOURCES = \
>  	mars_kernel.c \
> 
> 
> 

-- 
(ASAYAMA Kazunori
  (asayama at sm.sony.co.jp))
t



More information about the cbe-oss-dev mailing list