def create_build_rules
      platform_flags_fixup(search_libs(@settings))

      incs = inc_dirs
      # map object to source file and make it dependent on creation of all object directories
      rule /#{build_dir}\/.*\.o/ => [ proc {|tn| obj_to_source(tn, src_dir, build_dir)}] + obj_dirs do |t|
        if t.name =~ /\/tests\//
          # test framework additions
          incs << @test_inc_dirs unless incs.include?(@test_inc_dirs)
          @settings['ADD_CXXFLAGS'] += @test_fw.cflags
          @settings['ADD_CFLAGS'] += @test_fw.cflags
        end

        tc.obj(:source => t.source,
               :object => t.name,
               :settings => @settings,
               :includes => incs.uniq)
      end

      # map dependency to source file and make it dependent on creation of all object directories
      rule /#{build_dir}\/.*\.d/ => [ proc {|tn| dep_to_source(tn, src_dir, build_dir)}] + obj_dirs do |t|
        # don't generate dependencies for assembler files XXX DS: use tc.file_extensions[:as_sources]
        if (t.source.end_with?('.S') || t.source.end_with?('.s'))
          tc.touch(t.name)
          next
        end

        if t.name =~ /\/tests\//
          # test framework additions
          incs << @test_inc_dirs unless incs.include?(@test_inc_dirs)
          @settings['ADD_CXXFLAGS'] += @test_fw.cflags
          @settings['ADD_CFLAGS'] += @test_fw.cflags
        end

        tc.dep(:source => t.source,
               :dep => t.name,
               :settings => @settings,
               :includes => incs.uniq)
      end

      # make moc source file dependent on corresponding header file, XXX DS: only if project uses QT
      rule /#{src_dir}\/.*moc_.*#{Regexp.escape(tc.moc_source)}$/ => [ proc {|tn| tn.gsub(/moc_/, '').ext(tc.moc_header_extension) } ] do |t|
        tc.moc(:source => t.source,
               :moc => t.name,
               :settings => @settings)
      end
    end
def create_build_rules
      platform_flags_fixup(search_libs(@settings))

      incs = inc_dirs
      # map object to source file and make it dependent on creation of all object directories
      rule /#{build_dir}\/.*\.o/ => [ proc {|tn| obj_to_source(tn, src_dir, build_dir)}] + obj_dirs do |t|
        if t.name =~ /\/tests\//
          # test framework additions
          incs << @test_inc_dirs unless incs.include?(@test_inc_dirs)
          @settings['ADD_CXXFLAGS'] += @test_fw.cflags
          @settings['ADD_CFLAGS'] += @test_fw.cflags
        end

        tc.obj(:source => t.source,
               :object => t.name,
               :settings => @settings,
               :includes => incs.uniq)
      end

      # map dependency to source file and make it dependent on creation of all object directories
      rule /#{build_dir}\/.*\.d/ => [ proc {|tn| dep_to_source(tn, src_dir, build_dir)}] + obj_dirs do |t|
        # don't generate dependencies for assembler files XXX DS: use tc.file_extensions[:as_sources]
        if (t.source.end_with?('.S') || t.source.end_with?('.s'))
          tc.touch(t.name)
          next
        end

        if t.name =~ /\/tests\//
          # test framework additions
          incs << @test_inc_dirs unless incs.include?(@test_inc_dirs)
          @settings['ADD_CXXFLAGS'] += @test_fw.cflags
          @settings['ADD_CFLAGS'] += @test_fw.cflags
        end

        tc.dep(:source => t.source,
               :dep => t.name,
               :settings => @settings,
               :includes => incs.uniq)
      end

      # make moc source file dependent on corresponding header file, XXX DS: only if project uses QT
      rule /#{src_dir}\/.*moc_.*#{Regexp.escape(tc.moc_source)}$/ => [ proc {|tn| tn.gsub(/moc_/, '').ext(tc.moc_header_extension) } ] do |t|
        tc.moc(:source => t.source,
               :moc => t.name,
               :settings => @settings)
      end
    end
Create build rules for generating an object. Dependency to corresponding source file is made via proc
 object