Fixed compile errors caused by combining plugins
[gst-davinci.git] / ti_plugins / davinci / common / as-libtool.mak
blobdabbecfd703c8997ad76544077730bf340a39ca8
1 # some Makefile.am snippets to fix libtool's breakage w.r.t. DLL
2 # building
5 # define AS_LIBTOOL_LIB before calling. Sorry, only one lib per
6 # directory
10 # add this to EXTRA_DIST
11 as_libtool_EXTRA_DIST = $(AS_LIBTOOL_LIB).def
13 if AS_LIBTOOL_WIN32
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
29 else
31 as-libtool-install-data-local:
32 as-libtool-uninstall-local:
34 endif
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 | \
43 grep ^0 | \
44 awk '{ print $$3 }' | \
45 sed 's/^/ /' >>$(AS_LIBTOOL_LIB).def.tmp
46 mv $(AS_LIBTOOL_LIB).def.tmp $(AS_LIBTOOL_LIB).def