SConscript 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. Import('env')
  2. Import('projects')
  3. Import('RTT_ROOT')
  4. Import('rtconfig')
  5. Import('TARGET')
  6. RTMLINKER = RTT_ROOT + '/tools/rtmlinker.exe '
  7. # group definitions
  8. group = {}
  9. group['CCFLAGS'] = ''
  10. group['CPPPATH'] = [RTT_ROOT + '/include',
  11. RTT_ROOT + '/examples/module',
  12. RTT_ROOT + '/components/rtgui/include',
  13. RTT_ROOT + '/components/rgtui/common',
  14. RTT_ROOT + '/components/rtgui/server',
  15. RTT_ROOT + '/components/rtgui/widgets']
  16. group['CPPDEFINES'] = ''
  17. target = 'tetris.so'
  18. POST_ACTION = RTMLINKER + ' -l ' + TARGET + ' -o tetris.mo ' + '$TARGET'
  19. # add group to project list
  20. projects.append(group)
  21. src_local = Split("""
  22. application.c
  23. tetris_ui.c
  24. tetris_modal.c
  25. tetris_view.c
  26. """)
  27. env.Append(CCFLAGS = group['CCFLAGS'])
  28. env.Append(CPPPATH = group['CPPPATH'])
  29. env.Append(CPPDEFINES = group['CPPDEFINES'])
  30. module_env = env.Clone(CCFLAGS = ' -mcpu=arm920t -O0 -fPIC')
  31. module_env.Replace(LINKFLAGS = '-z max-page-size=0x4 -shared -fPIC -e rt_application_init -nostdlib -s')
  32. module_env.Program(target, src_local)
  33. module_env.AddPostAction(target, POST_ACTION)