Example #1
0
includepaths = generator.test_includepaths()

test_cases = [
  'bind', 'foundation'
]
if target.is_ios() or target.is_android():
  #Build one fat binary with all test cases
  test_resources = []
  test_extrasources = []
  test_cases += ['all']
  if target.is_ios():
    test_resources = [s.path.join('all', 'ios', item) for item in ['test-all.plist', 'Images.xcassets', 'test-all.xib']]
  elif target.is_android():
    test_resources = [os.path.join('all', 'android', item) for item in [
      'AndroidManifest.xml', os.path.join('layout', 'main.xml'), os.path.join('values', 'strings.xml'),
      os.path.join('drawable-ldpi', 'icon.png'), os.path.join('drawable-mdpi', 'icon.png'), os.path.join('drawable-hdpi', 'icon.png'),
      os.path.join('drawable-xhdpi', 'icon.png'), os.path.join('drawable-xxhdpi', 'icon.png'), os.path.join('drawable-xxxhdpi', 'icon.png')
    ]]
    test_extrasources = [os.path.join('all', 'android', 'java', 'com', 'rampantpixels', 'foundation', 'test', item) for item in [
      'TestActivity.java'
    ]]
  if target.is_pnacl():
    generator.bin(module = '', sources = [os.path.join(module, 'main.c') for module in test_cases] + test_extrasources, binname = 'test-all', basepath = 'test', implicit_deps = [lua_lib], libs = ['test', 'lua', 'luajit'] + dependlibs, resources = test_resources, includepaths = includepaths)
  else:
    generator.app(module = '', sources = [os.path.join(module, 'main.c') for module in test_cases] + test_extrasources, binname = 'test-all', basepath = 'test', implicit_deps = [lua_lib], libs = ['test', 'lua', 'luajit'] + dependlibs, resources = test_resources, includepaths = includepaths)
else:
  #Build one binary per test case
  generator.bin(module = 'all', sources = ['main.c'], binname = 'test-all', basepath = 'test', implicit_deps = [lua_lib], libs = ['lua'] + dependlibs, includepaths = includepaths)
  for test in test_cases:
    generator.bin(module = test, sources = ['main.c'], binname = 'test-' + test, basepath = 'test', implicit_deps = [lua_lib], libs = ['test', 'lua', 'luajit'] + dependlibs, includepaths = includepaths)
Example #2
0
  test_cases += ['all']
  if target.is_ios():
    test_resources = [os.path.join('all', 'ios', item) for item in ['test-all.plist', 'Images.xcassets', 'test-all.xib']]
    test_extrasources = [os.path.join('all', 'ios', 'viewcontroller.m')]
  elif target.is_android():
    test_resources = [os.path.join('all', 'android', item) for item in [
      'AndroidManifest.xml', os.path.join('layout', 'main.xml'), os.path.join('values', 'strings.xml'),
      os.path.join('drawable-ldpi', 'icon.png'), os.path.join('drawable-mdpi', 'icon.png'), os.path.join('drawable-hdpi', 'icon.png'),
      os.path.join('drawable-xhdpi', 'icon.png'), os.path.join('drawable-xxhdpi', 'icon.png'), os.path.join('drawable-xxxhdpi', 'icon.png')
    ]]
    test_extrasources = [os.path.join('all', 'android', 'java', 'com', 'rampantpixels', 'obj', 'test', item) for item in [
      'TestActivity.java'
    ]]
  elif target.is_tizen():
    test_resources = [os.path.join('all', 'tizen', item) for item in [
      'tizen-manifest.xml', os.path.join('res', 'tizenapp.png')
    ]]
  if target.is_macos() or target.is_ios() or target.is_android() or target.is_tizen():
    generator.app(module = '', sources = [os.path.join(module, 'main.c') for module in test_cases] + test_extrasources, binname = 'test-all', basepath = 'test', implicit_deps = [obj_lib], libs = linklibs, resources = test_resources, includepaths = includepaths)
  else:
    generator.bin(module = '', sources = [os.path.join(module, 'main.c') for module in test_cases] + test_extrasources, binname = 'test-all', basepath = 'test', implicit_deps = [obj_lib], libs = linklibs, resources = test_resources, includepaths = includepaths)
else:
  #Build one binary per test case
  generator.bin(module = 'all', sources = ['main.c'], binname = 'test-all', basepath = 'test', implicit_deps = [obj_lib], libs = ['obj'] + dependlibs, includepaths = includepaths)
  for test in test_cases:
    if target.is_macos():
      test_resources = [os.path.join('osx', item) for item in ['test-' + test + '.plist', 'Images.xcassets', 'test-' + test + '.xib']]
      generator.app(module = test, sources = ['main.c' ], binname = 'test-' + test, basepath = 'test', implicit_deps = [obj_lib], libs = linklibs, resources = test_resources, includepaths = includepaths)
    else:
      generator.bin(module = test, sources = ['main.c' ], binname = 'test-' + test, basepath = 'test', implicit_deps = [obj_lib], libs = linklibs, includepaths = includepaths)
Example #3
0
        test_resources = [
            os.path.join('all', 'tizen', item) for item in
            ['tizen-manifest.xml',
             os.path.join('res', 'tizenapp.png')]
        ]
    sources = [os.path.join(module, 'main.c')
               for module in test_cases] + test_extrasources
    variables = None
    if target.is_macos():
        variables = {"support_lua": True}
    if target.is_ios() or target.is_android() or target.is_tizen():
        generator.app(module='',
                      sources=sources,
                      binname='test-all',
                      basepath='test',
                      implicit_deps=[foundation_lib, test_lib, mock_lib],
                      libs=['test', 'foundation', 'mock'],
                      resources=test_resources,
                      includepaths=includepaths,
                      variables=variables)
    else:
        generator.bin(module='',
                      sources=sources,
                      binname='test-all',
                      basepath='test',
                      implicit_deps=[foundation_lib, test_lib, mock_lib],
                      libs=['test', 'foundation', 'mock'],
                      includepaths=includepaths,
                      variables=variables)
else:
    sources = ['main.c']
Example #4
0
            os.path.join('drawable-xhdpi', 'icon.png'),
            os.path.join('drawable-xxhdpi', 'icon.png'),
            os.path.join('drawable-xxxhdpi', 'icon.png')
        ]
    ]
    appsources = [
        os.path.join('test', 'all', 'android', 'java', 'com', 'rampantpixels',
                     'foundation', 'test', item)
        for item in ['TestActivity.java']
    ]
    variables = {}
    generator.app(module='',
                  sources=appsources,
                  binname='benchmark-rpmalloc',
                  basepath='',
                  implicit_deps=[benchmark_lib, test_lib],
                  libs=['benchmark', 'test'],
                  resources=resources,
                  includepaths=includepaths,
                  variables=variables)

generator.bin(module='crt',
              sources=['benchmark.c'],
              binname='benchmark-crt',
              basepath='benchmark',
              implicit_deps=[benchmark_lib, test_lib],
              libs=['benchmark', 'test'],
              includepaths=includepaths)
if not target.is_android():
    generator.bin(module='nedmalloc',
                  sources=['benchmark.c', 'nedmalloc.c'],
Example #5
0
         os.path.join('all', 'android', 'java', 'com', 'rampantpixels',
                      'foundation', 'test', item)
         for item in ['TestActivity.java']
     ]
 elif target.is_tizen():
     test_resources = [
         os.path.join('all', 'tizen', item) for item in
         ['tizen-manifest.xml',
          os.path.join('res', 'tizenapp.png')]
     ]
 if target.is_ios() or target.is_android() or target.is_tizen():
     generator.app(
         module='',
         sources=[os.path.join(module, 'main.c')
                  for module in test_cases] + test_extrasources,
         binname='test-all',
         basepath='test',
         implicit_deps=[foundation_lib, test_lib],
         libs=['test', 'foundation'],
         resources=test_resources,
         includepaths=includepaths)
 else:
     generator.bin(
         module='',
         sources=[os.path.join(module, 'main.c')
                  for module in test_cases] + test_extrasources,
         binname='test-all',
         basepath='test',
         implicit_deps=[foundation_lib, test_lib],
         libs=['test', 'foundation'],
         resources=test_resources,
         includepaths=includepaths)
Example #6
0
  test_cases += ['all']
  if target.is_ios():
    test_resources = [os.path.join('all', 'ios', item) for item in ['test-all.plist', 'Images.xcassets', 'test-all.xib']]
    test_extrasources = [os.path.join('all', 'ios', 'viewcontroller.m')]
  elif target.is_android():
    test_resources = [os.path.join('all', 'android', item) for item in [
      'AndroidManifest.xml', os.path.join('layout', 'main.xml'), os.path.join('values', 'strings.xml'),
      os.path.join('drawable-ldpi', 'icon.png'), os.path.join('drawable-mdpi', 'icon.png'), os.path.join('drawable-hdpi', 'icon.png'),
      os.path.join('drawable-xhdpi', 'icon.png'), os.path.join('drawable-xxhdpi', 'icon.png'), os.path.join('drawable-xxxhdpi', 'icon.png')
    ]]
    test_extrasources = [ os.path.join('test', 'all', 'android', 'java', 'com', 'rampantpixels', 'task', 'test', item) for item in [
      'TestActivity.java'
    ]]
  elif target.is_tizen():
    test_resources = [os.path.join('all', 'tizen', item) for item in [
      'tizen-manifest.xml', os.path.join('res', 'tizenapp.png')
    ] ]
  if target.is_macos() or target.is_ios() or target.is_android() or target.is_tizen():
    generator.app(module = '', sources = [os.path.join(module, 'main.c') for module in test_cases] + test_extrasources, binname = 'test-all', basepath = 'test', implicit_deps = [task_lib], libs = ['test', 'task', 'foundation'], resources = test_resources, includepaths = includepaths)
  else:
    generator.bin(module = '', sources = [os.path.join(module, 'main.c') for module in test_cases] + test_extrasources, binname = 'test-all', basepath = 'test', implicit_deps = [task_lib], libs = ['test', 'task', 'foundation'], resources = test_resources, includepaths = includepaths)
else:
  #Build one binary per test case
  generator.bin(module = 'all', sources = ['main.c'], binname = 'test-all', basepath = 'test', implicit_deps = [task_lib], libs = dependlibs, includepaths = includepaths)
  for test in test_cases:
    if target.is_macos():
      test_resources = [os.path.join('osx', item) for item in ['test-' + test + '.plist', 'Images.xcassets', 'test-' + test + '.xib']]
      generator.app(module = test, sources = ['main.c'], binname = 'test-' + test, basepath = 'test', implicit_deps = [task_lib], libs = linklibs, resources = test_resources, includepaths = includepaths)
    else:
      generator.bin(module = test, sources = ['main.c'], binname = 'test-' + test, basepath = 'test', implicit_deps = [task_lib], libs = linklibs, includepaths = includepaths)
Example #7
0
    test_extrasources = [os.path.join('all', 'ios', item) for item in [
      'viewcontroller.m'
    ]]
  elif target.is_android():
    test_resources = [os.path.join('all', 'android', item) for item in [
      'AndroidManifest.xml', os.path.join('layout', 'main.xml'), os.path.join('values', 'strings.xml'),
      os.path.join('drawable-ldpi', 'icon.png'), os.path.join('drawable-mdpi', 'icon.png'), os.path.join('drawable-hdpi', 'icon.png'),
      os.path.join('drawable-xhdpi', 'icon.png'), os.path.join('drawable-xxhdpi', 'icon.png'), os.path.join('drawable-xxxhdpi', 'icon.png')
    ]]
    test_extrasources = [os.path.join('test', 'all', 'android', 'java', 'com', 'rampantpixels', 'memory', 'test', item) for item in [
      'TestActivity.java'
    ]]
  elif target.is_tizen():
    test_resources = [os.path.join('all', 'tizen', item) for item in [
      'tizen-manifest.xml', os.path.join('res', 'tizenapp.png')
    ]]
  sources = [os.path.join(module, 'main.c') for module in test_cases] + test_extrasources
  if target.is_ios() or target.is_android() or target.is_tizen():
    generator.app(module = '', sources = sources, binname = 'test-all', basepath = 'test', implicit_deps = [memory_lib], libs = ['test', 'memory', 'foundation'], resources = test_resources, includepaths = includepaths)
  else:
    generator.bin(module = '', sources = sources, binname = 'test-all', basepath = 'test', implicit_deps = [memory_lib], libs = ['test', 'memory', 'foundation'], includepaths = includepaths)
else:
  sources = ['main.c']
  #Build one binary per test case
  generator.bin(module = 'all', sources = sources, binname = 'test-all', basepath = 'test', implicit_deps = [memory_lib], libs = ['memory', 'foundation'], includepaths = includepaths)
  for test in test_cases:
    generator.bin(module = test, sources = sources, binname = 'test-' + test, basepath = 'test', implicit_deps = [memory_lib], libs = ['test', 'memory', 'foundation'], includepaths = includepaths)

  sources = ['main.c']
  generator.bin(module = 'alloc', sources = sources, binname = 'benchmark-alloc', basepath = 'benchmark', implicit_deps = [memory_lib], libs = ['memory', 'foundation'], includepaths = includepaths)
Example #8
0
         for item in ['TestActivity.java']
     ]
 elif target.is_tizen():
     test_resources = [
         os.path.join('all', 'tizen', item) for item in
         ['tizen-manifest.xml',
          os.path.join('res', 'tizenapp.png')]
     ]
 if target.is_macos() or target.is_ios() or target.is_android(
 ) or target.is_tizen():
     generator.app(
         module='',
         sources=[os.path.join(module, 'main.c')
                  for module in test_cases] + test_extrasources,
         binname='test-all',
         basepath='test',
         implicit_deps=[window_lib],
         libs=['test', 'window', 'foundation'] + gllibs,
         frameworks=glframeworks,
         resources=test_resources,
         includepaths=includepaths)
 else:
     generator.bin(
         module='',
         sources=[os.path.join(module, 'main.c')
                  for module in test_cases] + test_extrasources,
         binname='test-all',
         basepath='test',
         implicit_deps=[window_lib],
         libs=['test', 'window', 'foundation'] + gllibs,
         frameworks=glframeworks,
Example #9
0
  test_cases += ['all']
  if target.is_ios():
    test_resources = [os.path.join( 'all', 'ios', item) for item in ['test-all.plist', 'Images.xcassets', 'test-all.xib']]
    test_extrasources = [os.path.join('all', 'ios', 'viewcontroller.m')]
  elif target.is_android():
    test_resources = [os.path.join('all', 'android', item) for item in [
      'AndroidManifest.xml', os.path.join('layout', 'main.xml'), os.path.join('values', 'strings.xml'),
      os.path.join('drawable-ldpi', 'icon.png'), os.path.join('drawable-mdpi', 'icon.png'), os.path.join('drawable-hdpi', 'icon.png'),
      os.path.join('drawable-xhdpi', 'icon.png'), os.path.join('drawable-xxhdpi', 'icon.png'), os.path.join('drawable-xxxhdpi', 'icon.png')
    ]]
    test_extrasources = [os.path.join('all', 'android', 'java', 'com', 'rampantpixels', 'window', 'test', item) for item in [
      'TestActivity.java'
    ]]
  elif target.is_tizen():
    test_resources = [os.path.join('all', 'tizen', item) for item in [
      'tizen-manifest.xml', os.path.join( 'res', 'tizenapp.png')
    ]]
  if target.is_macosx() or target.is_ios() or target.is_android() or target.is_tizen():
    generator.app(module = '', sources = [os.path.join(module, 'main.c') for module in test_cases] + test_extrasources, binname = 'test-all', basepath = 'test', implicit_deps = [window_lib], libs = ['test', 'window', 'foundation'] + gllibs, frameworks = glframeworks, resources = test_resources, includepaths = includepaths)
  else:
    generator.bin(module = '', sources = [os.path.join(module, 'main.c') for module in test_cases] + test_extrasources, binname = 'test-all', basepath = 'test', implicit_deps = [window_lib], libs = ['test', 'window', 'foundation'] + gllibs, frameworks = glframeworks, resources = test_resources, includepaths = includepaths)
else:
  #Build one binary per test case
  generator.bin(module = 'all', sources = ['main.c'], binname = 'test-all', basepath = 'test', implicit_deps = [window_lib], libs = ['window', 'foundation'], includepaths = includepaths)
  for test in test_cases:
    if target.is_macosx():
      test_resources = [os.path.join('osx', item) for item in ['test-' + test + '.plist', 'Images.xcassets', 'test-' + test + '.xib']]
      generator.app(module = test, sources = ['main.c'], binname = 'test-' + test, basepath = 'test', implicit_deps = [window_lib], libs = ['test', 'window', 'foundation'] + gllibs, frameworks = glframeworks, resources = test_resources, includepaths = includepaths)
    else:
      generator.bin(module = test, sources = ['main.c'], binname = 'test-' + test, basepath = 'test', implicit_deps = [window_lib], libs = ['test', 'window', 'foundation'] + gllibs, frameworks = glframeworks, includepaths = includepaths)
Example #10
0
  gllibs = ['Xxf86vm', 'Xext', 'X11', 'GL']

test_cases = [
  'bind', 'foundation', 'network', 'render', 'resource', 'window'
]
if target.is_ios() or target.is_android():
  #Build one fat binary with all test cases
  test_resources = []
  test_extrasources = []
  test_cases += ['all']
  if target.is_ios():
    test_resources = [os.path.join('all', 'ios', item) for item in ['test-all.plist', 'Images.xcassets', 'test-all.xib']]
  elif target.is_android():
    test_resources = [os.path.join('all', 'android', item) for item in [
      'AndroidManifest.xml', os.path.join('layout', 'main.xml'), os.path.join('values', 'strings.xml'),
      os.path.join('drawable-ldpi', 'icon.png'), os.path.join('drawable-mdpi', 'icon.png'), os.path.join('drawable-hdpi', 'icon.png'),
      os.path.join('drawable-xhdpi', 'icon.png'), os.path.join('drawable-xxhdpi', 'icon.png'), os.path.join('drawable-xxxhdpi', 'icon.png')
    ]]
    test_extrasources = [os.path.join('all', 'android', 'java', 'com', 'rampantpixels', 'foundation', 'test', item) for item in [
      'TestActivity.java'
    ]]
  if target.is_macos() or target.is_ios() or target.is_android() or target.is_tizen():
    generator.app(module = '', sources = [os.path.join(module, 'main.c') for module in test_cases] + test_extrasources, binname = 'test-all', basepath = 'test', implicit_deps = [lua_lib], libs = ['test', 'luajit'] + dependlibs + extralibs + gllibs, frameworks = glframeworks, resources = test_resources, includepaths = includepaths, variables = extravariables)
  else:
    generator.bin(module = '', sources = [os.path.join(module, 'main.c') for module in test_cases] + test_extrasources, binname = 'test-all', basepath = 'test', implicit_deps = [lua_lib], libs = ['test', 'luajit'] + dependlibs + extralibs + gllibs, frameworks = glframeworks, resources = test_resources, includepaths = includepaths, variables = extravariables)
else:
  #Build one binary per test case
  generator.bin(module = 'all', sources = ['main.c'], binname = 'test-all', basepath = 'test', implicit_deps = [lua_lib], libs = dependlibs + extralibs, includepaths = includepaths)
  for test in test_cases:
    generator.bin(module = test, sources = ['main.c'], binname = 'test-' + test, basepath = 'test', implicit_deps = [lua_lib], libs = ['test', 'luajit'] + dependlibs + extralibs + gllibs, frameworks = glframeworks, includepaths = includepaths, variables = extravariables)
Example #11
0
                os.path.join('drawable-xhdpi', 'icon.png'),
                os.path.join('drawable-xxhdpi', 'icon.png'),
                os.path.join('drawable-xxxhdpi', 'icon.png')
            ]
        ]
        extrasources = [
            os.path.join('android', 'java', 'com', 'rampantpixels',
                         'foundation', 'example', item)
            for item in ['ExampleActivity.java']
        ]
    elif generator.target.is_tizen():
        resources = [
            os.path.join('tizen', item) for item in
            ['tizen-manifest.xml',
             os.path.join('res', 'tizenapp.png')]
        ]
    generator.app(module=project,
                  sources=sources + extrasources,
                  binname=project,
                  libs=libs,
                  resources=resources,
                  includepaths=includepaths,
                  libpaths=libpaths)
else:
    generator.bin(module=project,
                  sources=sources,
                  binname=project,
                  libs=libs,
                  includepaths=includepaths,
                  libpaths=libpaths)
Example #12
0
                         'image', 'test', item)
            for item in ['TestActivity.java']
        ]
    elif target.is_tizen():
        test_resources = [
            os.path.join('all', 'tizen', item) for item in
            ['tizen-manifest.xml',
             os.path.join('res', 'tizenapp.png')]
        ]
    sources = [os.path.join(module, 'main.c')
               for module in test_cases] + test_extrasources
    if target.is_ios() or target.is_android() or target.is_tizen():
        generator.app(module='',
                      sources=sources,
                      binname='test-all',
                      basepath='test',
                      implicit_deps=[image_lib],
                      libs=['test'] + dependlibs,
                      resources=test_resources,
                      includepaths=includepaths)
    else:
        generator.bin(module='',
                      sources=sources,
                      binname='test-all',
                      basepath='test',
                      implicit_deps=[image_lib],
                      libs=['test'] + dependlibs,
                      includepaths=includepaths)
else:
    sources = ['main.c']
    #Build one binary per test case
    generator.bin(module='all',
Example #13
0
if toolchain.is_monolithic() or target.is_ios() or target.is_android() or target.is_tizen() or target.is_pnacl():
  #Build one fat binary with all test cases
  test_resources = []
  test_extrasources = []
  test_cases += ['all']
  if target.is_ios():
    test_resources = [os.path.join('all', 'ios', item) for item in ['test-all.plist', 'Images.xcassets', 'test-all.xib']]
    test_extrasources = [os.path.join('all', 'ios', 'viewcontroller.m')]
  elif target.is_android():
    test_resources = [os.path.join('all', 'android', item) for item in [
      'AndroidManifest.xml', os.path.join('layout', 'main.xml'), os.path.join('values', 'strings.xml'),
      os.path.join('drawable-ldpi', 'icon.png'), os.path.join('drawable-mdpi', 'icon.png'), os.path.join('drawable-hdpi', 'icon.png'),
      os.path.join('drawable-xhdpi', 'icon.png'), os.path.join('drawable-xxhdpi', 'icon.png'), os.path.join('drawable-xxxhdpi', 'icon.png')
    ]]
    test_extrasources = [os.path.join('all', 'android', 'java', 'com', 'rampantpixels', 'vector', 'test', item) for item in [
      'TestActivity.java'
    ]]
  elif target.is_tizen():
    test_resources = [os.path.join('all', 'tizen', item) for item in [
      'tizen-manifest.xml', os.path.join('res', 'tizenapp.png')
    ]]
  if target.is_ios() or target.is_android() or target.is_tizen():
    generator.app(module = '', sources = [os.path.join(module, 'main.c') for module in test_cases] + test_extrasources, binname = 'test-all', basepath = 'test', implicit_deps = [vector_lib], libs = ['test', 'vector'] + dependlibs, resources = test_resources, includepaths = includepaths)
  else:
    generator.bin(module = '', sources = [os.path.join(module, 'main.c') for module in test_cases] + test_extrasources, binname = 'test-all', basepath = 'test', implicit_deps = [vector_lib], libs = ['test', 'vector'] + dependlibs, resources = test_resources, includepaths = includepaths)
else:
  #Build one binary per test case
  generator.bin(module = 'all', sources = ['main.c'], binname = 'test-all', basepath = 'test', implicit_deps = [vector_lib], libs = ['vector'] + dependlibs, includepaths = includepaths)
  for test in test_cases:
    generator.bin(module = test, sources = ['main.c'], binname = 'test-' + test, basepath = 'test', implicit_deps = [vector_lib], libs = ['test', 'vector'] + dependlibs, includepaths = includepaths)
Example #14
0
writer = generator.writer
toolchain = generator.toolchain

window_lib = generator.lib( module = 'window', sources = [
  'event.c', 'window.c', 'window_android.c', 'window_ios.m', 'window_linux.c', 'window_osx.m', 'window_windows.c' ] )

#if not target.is_ios() and not target.is_android():
#  configs = [ config for config in toolchain.configs if config not in [ 'profile', 'deploy' ] ]
#  if not configs == []:
#    generator.bin( 'blast', [ 'main.c', 'client.c', 'server.c' ], 'blast', basepath = 'tools', implicit_deps = [ window_lib ], libs = [ 'network' ], configs = configs )

includepaths = generator.test_includepaths()

test_cases = [
  'window'
]
if target.is_ios() or target.is_android():
  #Build one fat binary with all test cases
  test_resources = None
  test_cases += [ 'all' ]
  if target.is_ios():
    test_resources = [ 'all/ios/test-all.plist', 'all/ios/Images.xcassets', 'all/ios/test-all.xib' ]
    generator.app( module = '', sources = [ os.path.join( module, 'main.c' ) for module in test_cases ], binname = 'test-all', basepath = 'test', implicit_deps = [ window_lib ], libs = [ 'test', 'window', 'foundation' ], resources = test_resources, includepaths = includepaths )
  else:
    generator.bin( module = '', sources = [ os.path.join( module, 'main.c' ) for module in test_cases ], binname = 'test-all', basepath = 'test', implicit_deps = [ window_lib ], libs = [ 'test', 'window', 'foundation' ], resources = test_resources, includepaths = includepaths )
else:
  #Build one binary per test case
  generator.bin( module = 'all', sources = [ 'main.c' ], binname = 'test-all', basepath = 'test', implicit_deps = [ window_lib ], libs = [ 'window', 'foundation' ], includepaths = includepaths )
  for test in test_cases:
    generator.bin( module = test, sources = [ 'main.c' ], binname = 'test-' + test, basepath = 'test', implicit_deps = [ window_lib ], libs = [ 'test', 'window', 'foundation' ], includepaths = includepaths )
Example #15
0
libpaths = ['..'] # For foundation library

generator = generator.Generator(project = project, variables = [('bundleidentifier', 'com.rampantpixels.foundation.$(binname)')])

if generator.target.is_macosx() or generator.target.is_ios() or generator.target.is_android() or generator.target.is_tizen() or generator.target.is_pnacl():
  resources = []
  extrasources = []
  if generator.target.is_ios():
    resources = [os.path.join('ios', item) for item in [
      'example.plist', 'Images.xcassets', 'example.xib'
    ]]
    extrasources = [os.path.join('ios', item) for item in [
      'viewcontroller.m'
    ]]
  elif generator.target.is_android():
    resources = [os.path.join('android', item) for item in [
      'AndroidManifest.xml', os.path.join('layout', 'main.xml'), os.path.join('values', 'strings.xml'),
      os.path.join('drawable-ldpi', 'icon.png'), os.path.join('drawable-mdpi', 'icon.png'), os.path.join('drawable-hdpi', 'icon.png'),
      os.path.join('drawable-xhdpi', 'icon.png'), os.path.join('drawable-xxhdpi', 'icon.png'), os.path.join('drawable-xxxhdpi', 'icon.png')
    ]]
    extrasources = [os.path.join('android', 'java', 'com', 'rampantpixels', 'foundation', 'example', item) for item in [
      'ExampleActivity.java'
    ]]
  elif generator.target.is_tizen():
    resources = [os.path.join('tizen', item) for item in [
      'tizen-manifest.xml', os.path.join('res', 'tizenapp.png')
    ]]
  generator.app(module = project, sources = sources + extrasources, binname = project, libs = libs, resources = resources, includepaths = includepaths, libpaths = libpaths)
else:
  generator.bin(module = project, sources = sources, binname = project, libs = libs, includepaths = includepaths, libpaths = libpaths)