common.am 1.01 KB
Newer Older
1 2 3 4 5 6 7
# Common code for VLC modules/.../Makefile.am
#
# Copyright (C) 2005-2007 the VideoLAN team
# Copyright (C) 2005-2008 Rémi Denis-Courmont
#
# Authors: Sam Hocevar <sam@zoy.org>

8 9
AUTOMAKE_OPTIONS = subdir-objects

10
NULL =
11
pluginsdir = $(vlclibdir)/plugins
12
BUILT_SOURCES =
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
13
CLEANFILES = $(BUILT_SOURCES)
14

15
LTLIBVLCCORE = $(top_builddir)/src/libvlccore.la
16

17
# Module name from object or executable file name.
Thomas Guillem's avatar
Thomas Guillem committed
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)\"
Rafaël Carré's avatar
Rafaël Carré committed
21
if HAVE_DYNAMIC_PLUGINS
22
AM_CPPFLAGS += -D__PLUGIN__
23 24
else
AM_CPPFLAGS += -DMODULE_NAME=$(MODULE_NAME)
25
endif
26 27 28
AM_CFLAGS =
AM_CXXFLAGS =
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 37
AM_LDFLAGS += $(top_builddir)/modules/module.rc.lo \
              -Wc,--static -Wc,-static-libgcc
38
endif
39

40
SUFFIXES =