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

Yuji Mano yuji.mano at am.sony.com
Thu Sep 11 04:38:39 EST 2008


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>

---
v2:
 - change $(srcdir) to $(builddir)

 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 = $(builddir)/../lib/libmars.a
 
 mars_kernel_SOURCES = \
 	mars_kernel.c \





More information about the cbe-oss-dev mailing list