Hello,

could someone help me with the following problem please?

I have some Makefile.am which uses feature of "renaming objects". It works fine with gcc etal. but fails with MSVC `cl' because of ``-c -o'' doesn't work. Here is a simple example:

---------------------
AM_CPPFLAGS        = ...

bin_PROGRAMS       = myprog-vX myprog-vY

myprog_vX_CPPFLAGS = $(AM_CPPFLAGS) -DXXX
myprog_vX_SOURCES  = myprog.c

myprog_vY_CPPFLAGS = $(AM_CPPFLAGS) -DYYY
myprog_vY_SOURCES  = myprog.c
---------------------

Then Makefile tries `cl ... -c -o myprog_vX-myprog.obj myprog.c' which generates 'myprog.obj' instead of 'myprog_vX-myprog.obj' and fails later when tries to link 'myprog_vX-myprog.obj' which cannot be found.

I used both AC_PROG_CC_C_O and AM_PROG_CC_C_O but it didn't help.

When I need to build libraries and using Libtool it's OK because Libtool does something like `cl ... -c myprog.c' and `mv -f myprog.obj ...'

Can I resolve this problems simply unless I have to write my own "rules"?

Thanks for any advice,

Milan Tichy
--
 Department of Computer Science       http://www.cs.tcd.ie/Milan.Tichy
 Trinity College Dublin               e-mail: [EMAIL PROTECTED]
 Westland Row 14.1.7                  phone:  +353-1-6083126
 Dublin, D2, Ireland                  fax:    +353-1-6772204




Reply via email to