win32: Use -static rather than undocumented --static when linking
[vlc.git] / modules / common.am
1 # Common code for VLC modules/.../Makefile.am
2 #
3 # Copyright (C) 2005-2007 the VideoLAN team
4 # Copyright (C) 2005-2008 RĂ©mi Denis-Courmont
5 #
6 # Authors: Sam Hocevar <sam@zoy.org>
7
8 AUTOMAKE_OPTIONS = subdir-objects
9
10 NULL =
11 pluginsdir = $(vlclibdir)/plugins
12 BUILT_SOURCES =
13 CLEANFILES = $(BUILT_SOURCES)
14
15 LTLIBVLCCORE = $(top_builddir)/src/libvlccore.la
16
17 # Module name from object or executable file name.
18 MODULE_NAME = $$(p="$@"; p="$${p\#\#*/}"; p="$${p\#lib}"; p="$${p%_plugin*}"; p=$$(echo "$$p"|sed 's/-/_/g'); p="$${p%.lo}"; echo "$$p")
19
20 AM_CPPFLAGS = -DMODULE_STRING=\"$(MODULE_NAME)\"
21 if HAVE_DYNAMIC_PLUGINS
22 AM_CPPFLAGS += -D__PLUGIN__
23 else
24 AM_CPPFLAGS += -DMODULE_NAME=$(MODULE_NAME)
25 endif
26 AM_CFLAGS =
27 AM_CXXFLAGS =
28 AM_OBJCFLAGS =
29 AM_LDFLAGS = \
30         -avoid-version -module \
31         -export-symbols-regex ^vlc_entry \
32         -shrext $(LIBEXT) \
33         -no-undefined \
34         $(top_builddir)/compat/libcompat.la $(LTLIBVLCCORE) 
35 if HAVE_WIN32
36 AM_LDFLAGS += $(top_builddir)/modules/module.rc.lo -Wc,-static
37 endif
38
39 SUFFIXES =