writer = generator.writer toolchain = generator.toolchain extrasources = [] includepaths = [] obj_sources = [ 'obj.c', 'version.c' ] obj_lib = generator.lib(module = 'obj', sources = obj_sources + extrasources) #obj_so = generator.sharedlib(module = 'obj', sources = obj_sources + extrasources) if not target.is_ios() and not target.is_android() and not target.is_tizen(): configs = [config for config in toolchain.configs if config not in ['profile', 'deploy']] #No test cases if we're a submodule if generator.is_subninja(): sys.exit() includepaths = generator.test_includepaths() linklibs = ['test'] + dependlibs test_cases = [] if toolchain.is_monolithic() or target.is_ios() or target.is_android() or target.is_tizen(): #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')]
sys.path.insert(0, os.path.join('build', 'ninja')) import generator dependlibs = ['task', 'foundation'] generator = generator.Generator(project = 'task', dependlibs = dependlibs, variables = [('bundleidentifier', 'com.rampantpixels.task.$(binname)')]) target = generator.target writer = generator.writer toolchain = generator.toolchain task_lib = generator.lib(module = 'task', sources =[ 'scheduler.c', 'task.c', 'version.c']) #No test cases if we're a submodule if generator.is_subninja(): sys.exit() includepaths = generator.test_includepaths() linklibs = ['test'] test_cases = [ 'task' ] 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():