Skip to content

Commit

Permalink
fix naming of .dll on mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
zuxy authored and pengvado committed Mar 30, 2008
1 parent a09f8f5 commit ae3d8b1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ae3d8b1

Please sign in to comment.