-/* $Id$
-
-This file is part of builder
-Copyright © 2007-2009 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
#include <msp/io/print.h>
#include <msp/strings/utils.h>
#include "binarypackage.h"
if(!i->compare(0, 2, "-I"))
binfo.incpath.push_back(i->substr(2));
else if(!i->compare(0, 2, "-D"))
- binfo.defines.push_back(i->substr(2));
+ {
+ string::size_type equals = i->find('=');
+ if(equals!=string::npos)
+ binfo.defines[i->substr(2, equals-2)] = i->substr(equals+1);
+ else
+ binfo.defines[i->substr(2)] = string();
+ }
else if(!i->compare(0, 2, "-L"))
binfo.libpath.push_back(i->substr(2));
else if(!i->compare(0, 2, "-l"))
binfo.libs.push_back(i->substr(2));
+ else if(*i=="-pthread")
+ binfo.threads = true;
}
return pkg;