[x264-devel] [PATCH] Fix Makefile for mingw cross-compiles.
Nathan Caldwell
saintdev at gmail.com
Tue Aug 21 09:32:56 CEST 2007
Pretty trivial, the install rule in the Makefile wants to build a x264
executable when there is already an x264.exe. This results in a lot of
undefined references, and the build fails.
$ make
===snip===
mingw32-gcc -o x264.exe x264.o matroska.o muxers.o libx264.a -lvfw32 -s
$ make install
mingw32-gcc -lvfw32 -s x264.o -o x264
x264.o:x264.c:(.text+0x904): undefined reference to `_x264_encoder_encode'
x264.o:x264.c:(.text+0x947): undefined reference to `_x264_nal_encode'
x264.o:x264.c:(.text+0x9ae): undefined reference to `_x264_free'
x264.o:x264.c:(.text+0x9bb): undefined reference to `_x264_malloc'
x264.o:x264.c:(.text+0xa70): undefined reference to `_x264_param_default'
x264.o:x264.c:(.text+0xa8a): undefined reference to `_read_frame_yuv'
===snip===
x264.o:x264.c:(.text+0x14ff): undefined reference to `_x264_encoder_close'
x264.o:x264.c:(.text+0x16d4): undefined reference to `_x264_mdate'
collect2: ld returned 1 exit status
make: *** [x264] Error 1
Index: Makefile
===================================================================
--- Makefile (revision 671)
+++ Makefile (working copy)
@@ -146,13 +146,13 @@
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
$(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so)
$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
_______________________________________________
x264-devel mailing list
x264-devel at videolan.org
http://mailman.videolan.org/listinfo/x264-devel
More information about the x264-devel
mailing list