Commit 8d8f3ea4 authored by Zuxy Meng's avatar Zuxy Meng Committed by Loren Merritt
Browse files

fix naming of .dll on mingw

parent 7e3ef7ce
......@@ -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))
$(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/
$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
$(if $(IMPLIBNAME), install -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir))
install-gtk: libx264gtk.a
$(MAKE) -C gtk install
......@@ -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 "$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
echo "$API" >> config.mak
echo 'SOFLAGS=-Wl,soname,$(SONAME)' >> config.mak
echo 'default: $(SONAME)' >> config.mak
if [ "$gtk" = "yes" ]; then
echo "$API" >> gtk/config.mak
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