From a8e360a9c4eda23015e749110cc75c44f6925875 Mon Sep 17 00:00:00 2001 From: Andrea Bastoni Date: Sun, 13 Dec 2009 13:42:28 -0500 Subject: Update Makefile e SConstruct for liblitmus 2010 - add all-32, all-64 targets in Makefile (cross compilation for x86) - update SConstruct kernel search path - add architecture dependent include dirs in search path --- Makefile | 12 +++++++++--- SConstruct | 18 +++++++++++++----- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index cc62b52..409067e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,13 @@ -all: - echo "Legacy warning: Building is done with scons." - scons +.PHONY: all-32 all-64 clean purge +all-32: + echo "Legacy warning: Building is done with scons." + ARCH=x86 scons +all-64: + ARCH=x86_64 scons clean: echo "Legacy warning: Building is now done with scons." scons -c + +purge: clean + rm -rf .sconf_temp .sconsign.dblite diff --git a/SConstruct b/SConstruct index 224b226..8e6981a 100644 --- a/SConstruct +++ b/SConstruct @@ -1,6 +1,6 @@ # ##################################################################### # User configuration. -LITMUS_KERNEL = '../litmus2008' +LITMUS_KERNEL = '../litmus2010' # ##################################################################### # Internal configuration. @@ -10,10 +10,9 @@ X86_32_FLAGS = '-m32' X86_64_FLAGS = '-m64' V9_FLAGS = '-mcpu=v9 -m64' SUPPORTED_ARCHS = { - 'sparc64' : V9_FLAGS, - 'i686' : X86_32_FLAGS, - 'i386' : X86_32_FLAGS, - 'x86_64' : X86_64_FLAGS, + 'sparc64' : V9_FLAGS, + 'x86' : X86_32_FLAGS, + 'x86_64' : X86_64_FLAGS, } KERNEL_INCLUDE = '%s/include/' % LITMUS_KERNEL @@ -58,6 +57,11 @@ if arch not in SUPPORTED_ARCHS: else: arch_flags = Split(SUPPORTED_ARCHS[arch]) +# add architecture dependent include search path +KERNEL_ARCH_INCLUDE = '%s/arch/%s/include' % (LITMUS_KERNEL, arch) +INCLUDE_DIRS = INCLUDE_DIRS + ' ' + KERNEL_ARCH_INCLUDE + +# Set Environment env = Environment( CC = 'gcc', CPPPATH = Split(INCLUDE_DIRS), @@ -71,11 +75,15 @@ if not env.GetOption('clean'): # Check for kernel headers. conf = Configure(env, custom_tests = {'CheckASMLink' : CheckASMLink}) if not conf.CheckCHeader('litmus/rt_param.h'): + print 'Env CCFLAGS = %s' % env['CCFLAGS'] + print 'Env CPPPATH = %s' % env['CPPPATH'] print "Error: Canot find kernel headers in '%s'." % LITMUS_KERNEL print "Please ensure that LITMUS_KERNEL in SConstruct", \ "contains a valid path." Exit(1) if not conf.CheckASMLink(): + print 'Env CCFLAGS = %s' % env['CCFLAGS'] + print 'Env CPPPATH = %s' % env['CPPPATH'] print "Error: The LITMUS^RT syscall numbers are not available." print "Please ensure sure that the kernel in '%s' is configured." \ % LITMUS_KERNEL -- cgit v1.2.2