aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2009-12-13 13:42:28 -0500
committerAndrea Bastoni <bastoni@cs.unc.edu>2009-12-13 13:42:28 -0500
commita8e360a9c4eda23015e749110cc75c44f6925875 (patch)
tree655fcd81a9a00841716dc95a41c7508f0b64ee0d
parent05d7c26fbe8ce8edc2e3cb43268d567bdbecae81 (diff)
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
-rw-r--r--Makefile12
-rw-r--r--SConstruct18
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 @@
1all: 1.PHONY: all-32 all-64 clean purge
2 echo "Legacy warning: Building is done with scons."
3 scons
4 2
3all-32:
4 echo "Legacy warning: Building is done with scons."
5 ARCH=x86 scons
6all-64:
7 ARCH=x86_64 scons
5clean: 8clean:
6 echo "Legacy warning: Building is now done with scons." 9 echo "Legacy warning: Building is now done with scons."
7 scons -c 10 scons -c
11
12purge: clean
13 rm -rf .sconf_temp .sconsign.dblite
diff --git a/SConstruct b/SConstruct
index 224b226..8e6981a 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1,6 +1,6 @@
1# ##################################################################### 1# #####################################################################
2# User configuration. 2# User configuration.
3LITMUS_KERNEL = '../litmus2008' 3LITMUS_KERNEL = '../litmus2010'
4 4
5# ##################################################################### 5# #####################################################################
6# Internal configuration. 6# Internal configuration.
@@ -10,10 +10,9 @@ X86_32_FLAGS = '-m32'
10X86_64_FLAGS = '-m64' 10X86_64_FLAGS = '-m64'
11V9_FLAGS = '-mcpu=v9 -m64' 11V9_FLAGS = '-mcpu=v9 -m64'
12SUPPORTED_ARCHS = { 12SUPPORTED_ARCHS = {
13 'sparc64' : V9_FLAGS, 13 'sparc64' : V9_FLAGS,
14 'i686' : X86_32_FLAGS, 14 'x86' : X86_32_FLAGS,
15 'i386' : X86_32_FLAGS, 15 'x86_64' : X86_64_FLAGS,
16 'x86_64' : X86_64_FLAGS,
17} 16}
18 17
19KERNEL_INCLUDE = '%s/include/' % LITMUS_KERNEL 18KERNEL_INCLUDE = '%s/include/' % LITMUS_KERNEL
@@ -58,6 +57,11 @@ if arch not in SUPPORTED_ARCHS:
58else: 57else:
59 arch_flags = Split(SUPPORTED_ARCHS[arch]) 58 arch_flags = Split(SUPPORTED_ARCHS[arch])
60 59
60# add architecture dependent include search path
61KERNEL_ARCH_INCLUDE = '%s/arch/%s/include' % (LITMUS_KERNEL, arch)
62INCLUDE_DIRS = INCLUDE_DIRS + ' ' + KERNEL_ARCH_INCLUDE
63
64# Set Environment
61env = Environment( 65env = Environment(
62 CC = 'gcc', 66 CC = 'gcc',
63 CPPPATH = Split(INCLUDE_DIRS), 67 CPPPATH = Split(INCLUDE_DIRS),
@@ -71,11 +75,15 @@ if not env.GetOption('clean'):
71 # Check for kernel headers. 75 # Check for kernel headers.
72 conf = Configure(env, custom_tests = {'CheckASMLink' : CheckASMLink}) 76 conf = Configure(env, custom_tests = {'CheckASMLink' : CheckASMLink})
73 if not conf.CheckCHeader('litmus/rt_param.h'): 77 if not conf.CheckCHeader('litmus/rt_param.h'):
78 print 'Env CCFLAGS = %s' % env['CCFLAGS']
79 print 'Env CPPPATH = %s' % env['CPPPATH']
74 print "Error: Canot find kernel headers in '%s'." % LITMUS_KERNEL 80 print "Error: Canot find kernel headers in '%s'." % LITMUS_KERNEL
75 print "Please ensure that LITMUS_KERNEL in SConstruct", \ 81 print "Please ensure that LITMUS_KERNEL in SConstruct", \
76 "contains a valid path." 82 "contains a valid path."
77 Exit(1) 83 Exit(1)
78 if not conf.CheckASMLink(): 84 if not conf.CheckASMLink():
85 print 'Env CCFLAGS = %s' % env['CCFLAGS']
86 print 'Env CPPPATH = %s' % env['CPPPATH']
79 print "Error: The LITMUS^RT syscall numbers are not available." 87 print "Error: The LITMUS^RT syscall numbers are not available."
80 print "Please ensure sure that the kernel in '%s' is configured." \ 88 print "Please ensure sure that the kernel in '%s' is configured." \
81 % LITMUS_KERNEL 89 % LITMUS_KERNEL