<?xml?>

<GwenBuilder name="SharedLib">

  <inputFiles>
    <acceptedInputTypes>object</acceptedInputTypes>
    <acceptedInputFiles>*.o</acceptedInputFiles>
  </inputFiles>

  <outputFiles>
    <file type="sharedlib" install="target" >
      lib$(target_name)-$(target_so_effective).dll
    </file>
  </outputFiles>
  
  <targetLinkSpecs>
    -L$(folder) -l$(target_name)-$(target_so_effective)
  </targetLinkSpecs>
  
  <buildCommands deleteOutFileFirst="TRUE" checkDates="TRUE" checkDepends="TRUE" >

    <cmd tool="$(GWBUILD_TOOL_CC)" >
      <args>
        <fixed>-shared -fPIC -Wl,-no-undefined -Wl,-soname,lib$(target_name)-$(target_so_effective).dll</fixed>
        <blank/>
        <fixed>$(local/ldflags)</fixed>
        <blank/>
        <inputFiles match="*.o" />
        <blank/>
        <fixed>-o</fixed>
        <blank/>
        <outputFiles index="0" />
        <blank/>
        <ifHasSubTargetLibs>
          <fixed>-Wl,--whole-archive</fixed>
          <blank/>
          <subTargetLibs/>
          <blank/>
        </ifHasSubTargetLibs>
        <ifHasLibraries>
          <fixed>-Wl,--no-whole-archive</fixed>
          <blank/>
          <libraries/>
        </ifHasLibraries>
      </args>
      <buildMessage>
        Linking 'lib$(target_name)-$(target_so_effective).dll'
      </buildMessage>
    </cmd>

  </buildCommands>


</GwenBuilder>
