Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. #
  2. # This file is the default set of rules to compile a Pebble project.
  3. #
  4. # Feel free to customize this to your needs.
  5. #
  6.  
  7. import os.path
  8.  
  9. top = '.'
  10. out = 'build'
  11.  
  12. def options(ctx):
  13. ctx.load('pebble_sdk')
  14.  
  15. def configure(ctx):
  16. ctx.load('pebble_sdk')
  17.  
  18. def build(ctx):
  19. ctx.load('pebble_sdk')
  20.  
  21. build_worker = os.path.exists('worker_src')
  22. binaries = []
  23.  
  24. for p in ctx.env.TARGET_PLATFORMS:
  25. ctx.set_env(ctx.all_envs[p])
  26. ctx.set_group(ctx.env.PLATFORM_NAME)
  27. app_elf='{}/pebble-app.elf'.format(ctx.env.BUILD_DIR)
  28. ctx.pbl_program(source=ctx.path.ant_glob('src/**/*.c') + ctx.path.ant_glob('../lignite/**/*.c'),
  29. includes='../lignite/'
  30. target=app_elf)
  31.  
  32. if build_worker:
  33. worker_elf='{}/pebble-worker.elf'.format(ctx.env.BUILD_DIR)
  34. binaries.append({'platform': p, 'app_elf': app_elf, 'worker_elf': worker_elf})
  35. ctx.pbl_worker(source=ctx.path.ant_glob('worker_src/**/*.c'),
  36. target=worker_elf)
  37. else:
  38. binaries.append({'platform': p, 'app_elf': app_elf})
  39.  
  40. ctx.set_group('bundle')
  41. ctx.pbl_bundle(binaries=binaries, js=ctx.path.ant_glob('src/js/**/*.js'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement