1 # some Makefile.am snippets to fix libtool's breakage w.r.t. DLL
5 # define AS_LIBTOOL_LIB before calling. Sorry, only one lib per
10 # add this to EXTRA_DIST
11 as_libtool_EXTRA_DIST
= $(AS_LIBTOOL_LIB
).def
15 as_libtool_noinst_DATA_files
= $(AS_LIBTOOL_LIB
).lib
17 as_libtool_LDFLAGS
= -no-undefined
19 # depend on this in install-data-local
20 as-libtool-install-data-local
:
21 $(INSTALL
) $(AS_LIBTOOL_LIB
).lib
$(DESTDIR
)$(libdir)
22 $(INSTALL
) $(AS_LIBTOOL_LIB
).def
$(DESTDIR
)$(libdir)
24 # depend on this in uninstall-local
25 as-libtool-uninstall-local
:
26 -rm $(DESTDIR
)$(libdir)/$(AS_LIBTOOL_LIB
).lib
27 -rm $(DESTDIR
)$(libdir)/$(AS_LIBTOOL_LIB
).def
31 as-libtool-install-data-local
:
32 as-libtool-uninstall-local
:
36 $(AS_LIBTOOL_LIB
).lib
: $(AS_LIBTOOL_LIB
).la
$(AS_LIBTOOL_LIB
).def
37 dlltool
-S
$(CC
) -f
"-c" --export-all-symbols
--input-def \
38 $(srcdir)/$(AS_LIBTOOL_LIB
).def
--output-lib
$@
40 $(AS_LIBTOOL_LIB
).def
:
41 echo EXPORTS
>$(AS_LIBTOOL_LIB
).def.tmp
42 nm
--defined-only
-g .libs
/$(AS_LIBTOOL_LIB
).a | \
44 awk
'{ print $$3 }' | \
45 sed
's/^/ /' >>$(AS_LIBTOOL_LIB
).def.tmp
46 mv
$(AS_LIBTOOL_LIB
).def.tmp
$(AS_LIBTOOL_LIB
).def