[x264-devel] commit: fix naming of .dll on mingw (Zuxy Meng )

git version control git at videolan.org
Mon Mar 31 02:52:25 CEST 2008


x264 | branch: master | Zuxy Meng <zuxy.meng at gmail.com> | Sat Mar 29 18:04:23 2008 -0600| [ae3d8b1d6b15f4d2118438dc7d9338686490cf28]

fix naming of .dll on mingw

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=ae3d8b1d6b15f4d2118438dc7d9338686490cf28
---

 Makefile  |   11 ++++++++---
 configure |    9 ++++++++-
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 081a450..81c0505 100644
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,7 @@ libx264.a: .depend $(OBJS) $(OBJASM)
 	ranlib libx264.a
 
 $(SONAME): .depend $(OBJS) $(OBJASM)
-	$(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS)
+	$(CC) -shared -o $@ $(OBJS) $(OBJASM) $(SOFLAGS) $(LDFLAGS)
 
 x264$(EXE): $(OBJCLI) libx264.a 
 	$(CC) -o $@ $+ $(LDFLAGS)
@@ -148,16 +148,21 @@ distclean: clean
 	rm -rf test/
 	$(MAKE) -C gtk distclean
 
-install: x264 $(SONAME)
+install: x264$(EXE) $(SONAME)
 	install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
 	install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
 	install -m 644 x264.h $(DESTDIR)$(includedir)
 	install -m 644 libx264.a $(DESTDIR)$(libdir)
 	install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
-	install x264 $(DESTDIR)$(bindir)
+	install x264$(EXE) $(DESTDIR)$(bindir)
 	ranlib $(DESTDIR)$(libdir)/libx264.a
+ifeq ($(SYS),MINGW)
+	$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(bindir))
+else
 	$(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so)
 	$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
+endif
+	$(if $(IMPLIBNAME), install -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir))
 
 install-gtk: libx264gtk.a
 	$(MAKE) -C gtk install
diff --git a/configure b/configure
index 8bbfcb3..d1fa222 100755
--- a/configure
+++ b/configure
@@ -459,7 +459,14 @@ cp config.mak gtk/config.mak
 
 if [ "$shared" = "yes" ]; then
     API=$(grep '#define X264_BUILD' < x264.h | cut -f 3 -d ' ')
-    echo "SONAME=libx264.so.$API" >> config.mak
+    if [ "$SYS" = "MINGW" ]; then
+        echo "SONAME=libx264-$API.dll" >> config.mak
+        echo 'IMPLIBNAME=libx264.dll.a' >> config.mak
+        echo 'SOFLAGS=-Wl,--out-implib,$(IMPLIBNAME) -Wl,--enable-auto-image-base' >> config.mak
+    else
+        echo "SONAME=libx264.so.$API" >> config.mak
+        echo 'SOFLAGS=-Wl,soname,$(SONAME)' >> config.mak
+    fi
     echo 'default: $(SONAME)' >> config.mak
     if [ "$gtk" = "yes" ]; then
         echo "SONAMEGTK=libx264gtk.so.$API" >> gtk/config.mak



More information about the x264-devel mailing list