[vlc-devel] [PATCH 4/9] Fit a DLL name longer than 8 characters to 8.3 limit on OS/2

KO Myung-Hun komh78 at gmail.com
Sat Nov 26 07:05:24 CET 2011


---
 modules/3dnow/Modules.am  |    1 +
 modules/genmf             |   12 +++++++++++-
 modules/mmx/Modules.am    |    4 ++++
 modules/mmxext/Modules.am |    1 +
 modules/sse2/Modules.am   |    3 +++
 5 files changed, 20 insertions(+), 1 deletions(-)
 mode change 100755 => 100644 modules/genmf

diff --git a/modules/3dnow/Modules.am b/modules/3dnow/Modules.am
index 6ab1660..d26a582 100644
--- a/modules/3dnow/Modules.am
+++ b/modules/3dnow/Modules.am
@@ -1,6 +1,7 @@
 libmemcpy3dn_plugin_la_SOURCES = memcpy.c ../mmx/fastmemcpy.h
 libmemcpy3dn_plugin_la_CFLAGS = $(AM_CFLAGS)
 libmemcpy3dn_plugin_la_LIBADD = $(AM_LIBADD)
+libmemcpy3dn_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname mc3dn
 libmemcpy3dn_plugin_la_DEPENDENCIES =
 
 libvlc_LTLIBRARIES += \
diff --git a/modules/genmf b/modules/genmf
old mode 100755
new mode 100644
index aefd560..5f1c740
--- a/modules/genmf
+++ b/modules/genmf
@@ -9,6 +9,8 @@
 
 cd $(dirname "$0")/.. || exit 1
 
+system_name=$(uname -s)
+
 while test "$1"
 do
   dir="$1"
@@ -49,6 +51,14 @@ include \$(top_srcdir)/modules/common.am
 EOF
   for mod in $mods
   do
+    shortname_flag=
+    if test "$system_name" = "OS/2"; then
+        shortname="`echo $mod | sed -e s/access_/a_/ -e s/output_/o_/ -e s/memcpy/mc/ -e s/packetizer_/p_/ -e s/stream_/s_/ -e s/filter_/f_/ -e s/out_/o_/ -e s/i420_/i0_/ -e s/i422_/i2_/ -e s/yuy2_/y2_/ -e s/ymga_/ym_/ -e s/converter_/c_/ -e s/audiobargraph/abg/`"
+        if test "$mod" != "$shortname"; then
+            shortname_flag="-shortname `echo ${shortname}_plugin | cut -b -8`"
+        fi
+    fi
+
     cat >> "${makf}" << EOF
 # The ${mod} plugin
 lib${mod}_plugin_la_SOURCES = \$(SOURCES_${mod})
@@ -60,7 +70,7 @@ lib${mod}_plugin_la_CXXFLAGS = \$(AM_CXXFLAGS) \$(CXXFLAGS_${mod})
 lib${mod}_plugin_la_OBJCFLAGS = \$(AM_OBJCFLAGS) \$(OBJCFLAGS_${mod})
 # Set LIBADD and DEPENDENCIES manually:
 lib${mod}_plugin_la_LIBADD = \$(AM_LIBADD) \$(LIBS_${mod})
-lib${mod}_plugin_la_LDFLAGS = \$(AM_LDFLAGS) \$(LDFLAGS_${mod})
+lib${mod}_plugin_la_LDFLAGS = \$(AM_LDFLAGS) \$(LDFLAGS_${mod}) $shortname_flag
 lib${mod}_plugin_la_DEPENDENCIES =
 
 EOF
diff --git a/modules/mmx/Modules.am b/modules/mmx/Modules.am
index cfbf17d..ece24c8 100644
--- a/modules/mmx/Modules.am
+++ b/modules/mmx/Modules.am
@@ -1,6 +1,7 @@
 libmemcpymmx_plugin_la_SOURCES = memcpy.c fastmemcpy.h
 libmemcpymmx_plugin_la_CFLAGS = $(AM_CFLAGS)
 libmemcpymmx_plugin_la_LIBADD = $(AM_LIBADD)
+libmemcpymmx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname mcmmx
 libmemcpymmx_plugin_la_DEPENDENCIES =
 
 libi420_rgb_mmx_plugin_la_SOURCES = \
@@ -10,6 +11,7 @@ libi420_rgb_mmx_plugin_la_SOURCES = \
         i420_rgb_mmx.h
 libi420_rgb_mmx_plugin_la_CFLAGS = $(AM_CFLAGS)
 libi420_rgb_mmx_plugin_la_LIBADD = $(AM_LIBADD)
+libi420_rgb_mmx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname i0_r_mx
 libi420_rgb_mmx_plugin_la_DEPENDENCIES =
 
 libi420_yuy2_mmx_plugin_la_SOURCES = \
@@ -17,6 +19,7 @@ libi420_yuy2_mmx_plugin_la_SOURCES = \
 	../video_chroma/i420_yuy2.h
 libi420_yuy2_mmx_plugin_la_CFLAGS = $(AM_CFLAGS)
 libi420_yuy2_mmx_plugin_la_LIBADD = $(AM_LIBADD)
+libi420_yuy2_mmx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname i0_y2_mx
 libi420_yuy2_mmx_plugin_la_DEPENDENCIES =
 
 libi422_yuy2_mmx_plugin_la_SOURCES = \
@@ -24,6 +27,7 @@ libi422_yuy2_mmx_plugin_la_SOURCES = \
 	../video_chroma/i422_yuy2.h
 libi422_yuy2_mmx_plugin_la_CFLAGS = $(AM_CFLAGS)
 libi422_yuy2_mmx_plugin_la_LIBADD = $(AM_LIBADD)
+libi422_yuy2_mmx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname i2_y2_mx
 libi422_yuy2_mmx_plugin_la_DEPENDENCIES =
 
 libvlc_LTLIBRARIES += \
diff --git a/modules/mmxext/Modules.am b/modules/mmxext/Modules.am
index 42c0088..70242c4 100644
--- a/modules/mmxext/Modules.am
+++ b/modules/mmxext/Modules.am
@@ -1,6 +1,7 @@
 libmemcpymmxext_plugin_la_SOURCES = memcpy.c ../mmx/fastmemcpy.h
 libmemcpymmxext_plugin_la_CFLAGS = $(AM_CFLAGS)
 libmemcpymmxext_plugin_la_LIBADD = $(AM_LIBADD)
+libmemcpymmxext_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname mcmmxext
 libmemcpymmxext_plugin_la_DEPENDENCIES =
 
 libvlc_LTLIBRARIES += \
diff --git a/modules/sse2/Modules.am b/modules/sse2/Modules.am
index ac9223f..e098e57 100644
--- a/modules/sse2/Modules.am
+++ b/modules/sse2/Modules.am
@@ -5,6 +5,7 @@ libi420_rgb_sse2_plugin_la_SOURCES = \
         ../mmx/i420_rgb_mmx.h
 libi420_rgb_sse2_plugin_la_CFLAGS = $(AM_CFLAGS)
 libi420_rgb_sse2_plugin_la_LIBADD = $(AM_LIBADD)
+libi420_rgb_sse2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname i0_r_s2
 libi420_rgb_sse2_plugin_la_DEPENDENCIES =
 
 libi420_yuy2_sse2_plugin_la_SOURCES = \
@@ -12,6 +13,7 @@ libi420_yuy2_sse2_plugin_la_SOURCES = \
 	../video_chroma/i420_yuy2.h
 libi420_yuy2_sse2_plugin_la_CFLAGS = $(AM_CFLAGS)
 libi420_yuy2_sse2_plugin_la_LIBADD = $(AM_LIBADD)
+libi420_yuy2_sse2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname i0_y2_s2
 libi420_yuy2_sse2_plugin_la_DEPENDENCIES =
 
 libi422_yuy2_sse2_plugin_la_SOURCES = \
@@ -19,6 +21,7 @@ libi422_yuy2_sse2_plugin_la_SOURCES = \
 	../video_chroma/i422_yuy2.h
 libi422_yuy2_sse2_plugin_la_CFLAGS = $(AM_CFLAGS)
 libi422_yuy2_sse2_plugin_la_LIBADD = $(AM_LIBADD)
+libi422_yuy2_sse2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -shortname i2_y2_s2
 libi422_yuy2_sse2_plugin_la_DEPENDENCIES =
 
 libvlc_LTLIBRARIES += \
-- 
1.7.3.2




More information about the vlc-devel mailing list