1
mirror of https://code.videolan.org/videolan/vlc synced 2024-10-07 03:56:28 +02:00

Fix the x264 patch so it works again under Mac OS X

This commit is contained in:
Derk-Jan Hartman 2005-12-03 17:00:55 +00:00
parent 0b62586c9e
commit 4e02106b18

View File

@ -1,48 +1,37 @@
Index: encoder/ratecontrol.c
Index: x264/Makefile
===================================================================
--- encoder/ratecontrol.c (revision 291)
+++ encoder/ratecontrol.c (working copy)
@@ -40,7 +40,7 @@
#if defined(SYS_FREEBSD) || defined(SYS_BEOS) || defined(SYS_NETBSD)
#define exp2f(x) powf( 2, (x) )
#endif
-#if defined(_MSC_VER) || defined(SYS_SunOS)
+#if defined(_MSC_VER) || defined(SYS_SunOS) || defined(SYS_MACOSX)
#define exp2f(x) pow( 2, (x) )
#define sqrtf sqrt
#endif
Index: Makefile
===================================================================
--- Makefile (revision 291)
+++ Makefile (working copy)
@@ -53,7 +53,7 @@
OBJS = $(SRCS:%.c=%.o)
--- x264/Makefile (revision 381)
+++ x264/Makefile (working copy)
@@ -60,7 +60,7 @@
DEP = depend
.PHONY: default fprofiled clean distclean install uninstall
-default: $(DEP) x264$(EXE)
+default: $(DEP)
+default: $(DEP) libx264.a
libx264.a: .depend $(OBJS) $(OBJASM)
ar rc libx264.a $(OBJS) $(OBJASM)
@@ -74,7 +74,7 @@
@@ -82,7 +82,7 @@
.depend: config.mak config.h
rm -f .depend
# Hacky - because gcc 2.9x doesn't have -MT
- $(foreach SRC, $(SRCS) x264.c matroska.c, ( echo -n "`dirname $(SRC)`/" && $(CC) $(CFLAGS) $(SRC) -MM -g0 ) 1>> .depend;)
+ $(foreach SRC, $(SRCS), ( echo -n "`dirname $(SRC)`/" && $(CC) $(CFLAGS) $(SRC) -MM -g0 ) 1>> .depend;)
+ $(foreach SRC, $(SRCS), (echo -n "`dirname $(SRC)`/" && $(CC) $(CFLAGS) $(SRC) -MM -g0 ) 1>> .depend;)
config.h: $(wildcard .svn/entries */.svn/entries */*/.svn/entries)
./version.sh
@@ -91,11 +91,10 @@
@@ -128,13 +128,12 @@
distclean: clean
rm -f config.mak vfw/build/cygwin/config.mak
rm -f config.mak vfw/build/cygwin/config.mak x264.pc
-install: x264
+install: libx264.a
install -d $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
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)
ranlib $(DESTDIR)$(libdir)/libx264.a
etags: TAGS
uninstall: