use ExtUtils::MakeMaker; WriteMakefile( NAME => 'My', VERSION_FROM => 'lib/My.pm', LIBS => ['-lpthread'], );