def captureLink(self, x):
    self.link_command = x[0]
    x = x[1:]
    i = x.index('-o')
    self.library = x[(i + 1)]
    del x[i]
    del x[i]
    self.objects = [i for i in x if i.endswith('.o')]
    self.link_options = [i for i in x if (not i.endswith('.o'))]
    u = self.objects[0].split('/')
    self.build_dir = '/'.join(u[:2])
def captureLink(self, x):
    self.link_command = x[0]
    x = x[1:]
    i = x.index('-o')
    self.library = x[(i + 1)]
    del x[i]
    del x[i]
    self.objects = [i for i in x if i.endswith('.o')]
    self.link_options = [i for i in x if (not i.endswith('.o'))]
    u = self.objects[0].split('/')
    self.build_dir = '/'.join(u[:2])