<?xml?>

<gwbuild>

  <project name="aqhome" version="0.0.1" so_current="0" so_age="0" so_revision="0" write_config_h="TRUE">
    <setVar name="package">$(project_name)</setVar>
    <setVar name="version">
      $(project_vmajor).$(project_vminor).$(project_vpatchlevel)
    </setVar>
    <define name="PACKAGE" value="$(package)"  quoted="TRUE" />



    <!-- version -->
    <setVar name="AQHOME_VERSION_MAJOR">$(project_vmajor)</setVar>
    <setVar name="AQHOME_VERSION_MINOR">$(project_vminor)</setVar>
    <setVar name="AQHOME_VERSION_PATCHLEVEL">$(project_vpatchlevel)</setVar>
    <setVar name="AQHOME_VERSION_BUILD">$(project_vbuild)</setVar>
    <setVar name="AQHOME_VERSION_TAG">$(project_vtag)</setVar>
    <setVar name="AQHOME_SO_CURRENT">$(project_so_current)</setVar>
    <setVar name="AQHOME_SO_REVISION">$(project_so_revision)</setVar>
    <setVar name="AQHOME_SO_AGE">$(project_so_age)</setVar>
    <setVar name="AQHOME_SO_EFFECTIVE">$(project_so_effective)</setVar>
    <setVar name="AQHOME_VERSION_STRING">
      $(project_vmajor).$(project_vminor).$(project_vpatchlevel)
    </setVar>
    <setVar name="AQHOME_VERSION_FULL_STRING">
      $(project_vmajor).$(project_vminor).$(project_vpatchlevel).$(project_vbuild)$(project_vtag)
    </setVar>



    <!-- prefix handling -->
    <option id="prefix" type="string">
      <default>/usr/local</default>
    </option>
    <setVar name="prefix">$(option_prefix)</setVar>
    <setVar name="exec_prefix">$(option_prefix)/bin</setVar>
    <setVar name="sysconfdir">$(option_prefix)/etc</setVar>
    <setVar name="bindir">$(option_prefix)/bin</setVar>
    <setVar name="libdir">$(option_prefix)/lib</setVar>
    <setVar name="includedir">$(option_prefix)/include</setVar>
    <setVar name="datarootdir">$(option_prefix)/share</setVar>
    <setVar name="datadir">$(option_prefix)/share</setVar>
    <setVar name="localedir">$(option_prefix)/share/locale</setVar>

    <setVar name="pkglibdir">$(libdir)/$(package)</setVar>
    <setVar name="pkgincludedir">$(includedir)/aqbanking6/$(package)</setVar>
    <setVar name="pkgdatadir">$(datadir)/$(package)</setVar>



    <checkProgs>
      <prog cmd="avrdude" id="avrdude" />
    </checkProgs>



    <dependencies>
      <dep id="gwenhywfar" name="gwenhywfar" minversion="5.8.2.1" required="TRUE" >
        <variables>plugindir gwengui-fox16</variables>
      </dep>
    </dependencies>



    <!-- symbol visibility -->
    <checkCompiler>
      <arg name="has_symbol_visibility">-fvisibility=hidden</arg>
    </checkCompiler>
    
    <ifVarMatches name="has_symbol_visibility" value="TRUE" >
      <setVar name="visibility_cflags">-fvisibility=hidden</setVar>
      <define name="GCC_WITH_VISIBILITY_ATTRIBUTE" />
    </ifVarMatches>



    <subdirs>
      avr
      aqhome
    </subdirs>



    <!-- build with "gwbuild -B flash" -->
    <ifVarMatches name="avrdude_EXISTS" value="TRUE" >
      <buildFiles name="flash" auto="FALSE" >
        <!-- TODO: input does not see built files! -->
        <input>
          <files match="*.hex" />
        </input>
        
        <output>
        </output>

        <cmd tool="$(avrdude)" checkDates="FALSE"  >
          -p t84 -c stk500 -P /dev/ttyACM0 -B16 -U flash:w:avr/aqhomeavr.hex
        </cmd>

        <buildMessage>
          Flashing hex file to AVR.
        </buildMessage>
      </buildFiles>
    </ifVarMatches>
        


  </project>

</gwbuild>
