[Harbour] msvc makefile.vc

Teo Fonrouge teo at windtelsoft.com
Mon Nov 5 15:38:26 GMT 2007


On Sunday 04 November 2007 05:37:53 am Szakáts Viktor wrote:
> Hi Teo,
>
> Thanks for your commit.
>
> As for bakefile, it looks good, but I wouldn't introduce
> this tool dependency for Harbour this time. My reasons are:
> 1) this is a tool to be installed (not just an executable)
> since it uses Python 2) this is another tool syntax to be
> used and learned in Harbour and 3) last but least in Harbour
> the GNU-make system is favored since it is supported all
> over the project consistently. To ease the support of BC/VC
> makefiles in contrib (that's where we have these repetitions),
> we might add central lib making templates in /contrib/,
> and use a more minimal local VC/BC makefile in each contrib
> by including the central template. (it's worth noting though
> that in case of contribs, maintenance of make files is
> up to the contrib developers, at least in theory)
>
> Marek is the master of makefiles, so maybe he can also help
> in this separation of logic.
>
> I've linked an example (work in progress) for libct. (it
> doesn't work for VC, with an error I couldn't figure. Also,
> proper, generic CLEAN should be added, and redundancy is
> almost 100% yet.)
>
> http://www.syenar.hu/harbour/libct_generic_bcvc_make.zip

Hello Viktor,

Attached are the makefiles generated from the bakefile xml script below, the 
compilers covered are:

* gnumake
* borland
* mingw (gcc)
* msvc

This is the bakefile script nedded to build the CT lib:

<?xml version="1.0" ?>
<makefile>

  <include file="../config/tmpl_hrb.bkl"/>

  <lib id="ct">
    <sources>
      $(fileList("*.prg"))
      $(fileList("*.c"))
      $(fileList("*.cpp"))
    </sources>
    <install-to>$(LIBDIR)</install-to>
  </lib>

</makefile>

However, I agree with Marek that this was primary intended to build some 
simple contrib lib's, but maybe the simpleness of the scripts and the syntax 
helps to build more complicated & combined targets, for example, the 
following bakefile xml script is the one that I use to build a win/linux 
application and produce gnumakefile/makefile.vc:

<?xml version="1.0" ?>
<makefile>

  <include file="config/tmpl_hrb.bkl"/>

  <set-srcdir>src</set-srcdir>

  <exe id="Arel">
    <app-type>gui</app-type>
    <if cond="PLATFORM_WIN32=='1'">
      <exename>ArelW</exename>
      <lib-path>C:\Harbour\lib</lib-path>
    </if>
    <if cond="PLATFORM_UNIX=='1'">
      <exename>ArelX</exename>
    </if>
    <sources>
      $(fileList("arelxdos/*"))
      $(fileList("bancos/*"))
      $(fileList("clases/*"))
      $(fileList("clipro/*"))
      $(fileList("compras/*"))
      $(fileList("contab/*"))
      $(fileList("cuentasxpc/*"))
      $(fileList("helpsys/*"))
      $(fileList("inventario/*"))
      $(fileList("prod/*"))
      $(fileList("prod2/*"))
      $(fileList("rqdb/*"))
      $(fileList("rtcomp/*"))
      $(fileList("system/*"))
      $(fileList("tools/*"))
      $(fileList("tui/*"))
      $(fileList("vtascomp/*"))
      $(fileList("xh_compat/*"))
    </sources>
    <warnings>max</warnings>
    <precomp-headers>on</precomp-headers>
    <optimize>
      speed
    </optimize>
    <dirname>.</dirname>
  </exe>

</makefile>


best regards

Teo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GNUmakefile.zip
Type: application/x-zip
Size: 2194 bytes
Desc: not available
Url : http://lists.harbour-project.org/pipermail/harbour/attachments/20071105/fd3df425/GNUmakefile-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile.bcc.zip
Type: application/x-zip
Size: 2247 bytes
Desc: not available
Url : http://lists.harbour-project.org/pipermail/harbour/attachments/20071105/fd3df425/makefile.bcc-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile.gcc.zip
Type: application/x-zip
Size: 2176 bytes
Desc: not available
Url : http://lists.harbour-project.org/pipermail/harbour/attachments/20071105/fd3df425/makefile.gcc-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile.vc.zip
Type: application/x-zip
Size: 2198 bytes
Desc: not available
Url : http://lists.harbour-project.org/pipermail/harbour/attachments/20071105/fd3df425/makefile.vc-0001.bin


More information about the Harbour mailing list