diff --git a/components/SConscript b/components/SConscript new file mode 100644 index 0000000000000000000000000000000000000000..0f0065d8f48e64c507fc0c55d43b3dc6a238aaef --- /dev/null +++ b/components/SConscript @@ -0,0 +1,10 @@ +# for module compile +Import('env') +Import('rtconfig') + +# build each components + +# build each modules +SConscript('hello/SConscript') +SConscript('thread/SConscript') + diff --git a/components/hello/SConscript b/components/hello/SConscript index 5c3eccd149394a5acb07a346c0c8b8ec1f2293a9..215c4eb4cbc5c752ed33ef6a37ab78623f09c59b 100644 --- a/components/hello/SConscript +++ b/components/hello/SConscript @@ -1,8 +1,10 @@ Import('env') -src = ('hello.c') +target = 'hello.mo' -obj = env.Object(src) +module_env = env.Clone(CPPDEFINE = 'RT_MODULE') +module_env.Replace(LINKFLAGS = ' -r -d -e rtm_main -nostdlib') -Return('obj') +src_local = Glob('*.c') +module_env.Program(target, src_local) diff --git a/components/hello/mk.bat b/components/hello/mk.bat deleted file mode 100644 index 8f906a3af741a32de239ac9f705edfac1903bc69..0000000000000000000000000000000000000000 --- a/components/hello/mk.bat +++ /dev/null @@ -1,3 +0,0 @@ -set PATH="E:\Program Files\CodeSourcery\Sourcery G++ Lite\bin";%PATH% -arm-none-eabi-gcc -c hello.c -o hello.o -DRT_MODULE "-I..\..\include" "-I..\..\bsp\mini2440" -arm-none-eabi-gcc -o hello.mo -r -d -e rtm_main -nostdlib hello.o \ No newline at end of file diff --git a/components/thread/SConscript b/components/thread/SConscript new file mode 100644 index 0000000000000000000000000000000000000000..8ce2fcead525327a424a0c0653a5658a96e9765a --- /dev/null +++ b/components/thread/SConscript @@ -0,0 +1,10 @@ +Import('env') + +target = 'thread.mo' + +module_env = env.Clone(CPPDEFINE = 'RT_MODULE') +module_env.Replace(LINKFLAGS = ' -r -d -e rtm_main -nostdlib') + +src_local = Glob('*.c') + +module_env.Program(target, src_local) diff --git a/components/thread/mk.bat b/components/thread/mk.bat deleted file mode 100644 index 2eaedccc6ffd89f48f49569bfc3a5397bda61402..0000000000000000000000000000000000000000 --- a/components/thread/mk.bat +++ /dev/null @@ -1,3 +0,0 @@ -set PATH="E:\Program Files\CodeSourcery\Sourcery G++ Lite\bin";%PATH% -arm-none-eabi-gcc -c module_thread_dynamic.c -o module_thread_dynamic.o -DRT_MODULE "-I..\..\include" "-I..\..\bsp\mini2440" -arm-none-eabi-gcc -o dynamic.mo -r -d -e rtm_main -nostdlib module_thread_dynamic.o \ No newline at end of file