Hi,
Using EU::MM-6.36.
On Win32, I've been doing stuff in a Makefile.PL like:
===========================
.
.
# If we're using an MS compiler we need to additionally link
# to MinGW's libgcc.a (for this particular module).
if($Config{cc} eq 'cl') {
$hash{OBJECT} = '/full/path/to/libgcc.a';
}
WriteMakefile(%hash);
===========================
Unfortunately running 'nmake realclean' will now clean up libgcc.a ... which
is not what I really wanted to happen.
I want 'realclean' to simply clean up all of the "derived files" - as per
the documentation. I deduce that 'OBJECT' is therefore reserved for "derived
files" and that there must be a better way to conditionally link to
pre-existing libraries that have an extension that differs from
$Config{lib_ext}.
How *should* I be doing it ?
Doing it with 'LIBS' is probably not all that straightforward as
'-L/full/path/to -lgcc' will look for '/full/path/to/libgcc.lib' and fail to
find '/full/path/to/libgcc.a'. (Note that $Config{lib_ext} is usually '.lib'
when Sconfig{cc} is 'cl'.)
Cheers,
Rob