Commit 75532d5c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Move MODULE_* predefined constants from vlc-config to Makefile

parent ab0944e9
......@@ -13,7 +13,14 @@ CLEANFILES = $(BUILT_SOURCES)
LTLIBVLCCORE = $(top_builddir)/src/libvlccore.la
AM_CPPFLAGS = -D__PLUGIN__
# Module name from object or executable file name.
MODULE_NAME = `p="$@"; p="$${p\#\#*/}"; p="$${p\#lib}"; echo "$${p%_plugin*}"`
AM_CPPFLAGS = \
-DMODULE_NAME=$(MODULE_NAME) \
-DMODULE_NAME_IS_$(MODULE_NAME) \
-DMODULE_STRING=\"$(MODULE_NAME)\"
-D__PLUGIN__
AM_CFLAGS = `$(VLC_CONFIG) --cflags plugin $@`
AM_CXXFLAGS = `$(VLC_CONFIG) --cxxflags plugin $@`
AM_OBJCFLAGS = `$(VLC_CONFIG) --objcflags plugin $@`
......
......@@ -223,6 +223,7 @@ libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc
libvlc_la_SOURCES = $(SOURCES_libvlc_control)
libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` \
libvlccore.la ../compat/libcompat.la
libvlc_la_CPPFLAGS = -DMODULE_STRING=\"libvlc\"
libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
libvlc_la_LDFLAGS = $(AM_LDFLAGS) `$(VLC_CONFIG) --ldflags libvlc` \
-version-info 6:0:1 \
......
......@@ -128,13 +128,6 @@ while test $# -gt 0; do
shift
done
#
# If a module was requested, use its name
#
if test -n "${module}"; then
cppflags="${cppflags} -DMODULE_NAME=${module} -DMODULE_NAME_IS_${module} -DMODULE_STRING=\"${module}\""
fi
#
# Output what we were asked
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment