pkgsrc/multimedia/x264-devel/patches/patch-ab
adam ce356bfc9b Changes 20151227:
* ppc: Add detection of AltiVec support for FreeBSD
* Don't assume 16-byte stack alignment by default on x86-32
* Fix a few static analyzer performance hints
* Revise the row VBV algorithm
* Fix high bit depth lookahead cost compensation algorithm
* Correctly update the intra row predictor in B-frames
* Change the predictors update algorithm
2015-12-28 11:37:03 +00:00

125 lines
4 KiB
Text

$NetBSD: patch-ab,v 1.23 2015/12/28 11:37:03 adam Exp $
--- Makefile.orig 2015-10-24 20:45:04.000000000 +0000
+++ Makefile
@@ -34,7 +34,7 @@ OBJS =
OBJSO =
OBJCLI =
-OBJCHK = tools/checkasm.o
+OBJCHK = tools/checkasm.lo
OBJEXAMPLE = example.o
@@ -99,9 +99,9 @@ endif
ifdef ARCH_X86
SRCS += common/x86/mc-c.c common/x86/predict-c.c
-OBJASM = $(ASMSRC:%.asm=%.o)
+OBJASM = $(ASMSRC:%.asm=%.lo)
$(OBJASM): common/x86/x86inc.asm common/x86/x86util.asm
-OBJCHK += tools/checkasm-a.o
+OBJCHK += tools/checkasm-a.lo
endif
endif
@@ -121,8 +121,8 @@ ASMSRC += common/arm/cpu-a.S common/arm/
common/arm/dct-a.S common/arm/quant-a.S common/arm/deblock-a.S \
common/arm/predict-a.S common/arm/bitstream-a.S
SRCS += common/arm/mc-c.c common/arm/predict-c.c
-OBJASM = $(ASMSRC:%.S=%.o)
-OBJCHK += tools/checkasm-arm.o
+OBJASM = $(ASMSRC:%.S=%.lo)
+OBJCHK += tools/checkasm-arm.lo
endif
endif
@@ -140,8 +140,8 @@ ASMSRC += common/aarch64/bitstream-a.S \
SRCS += common/aarch64/asm-offsets.c \
common/aarch64/mc-c.c \
common/aarch64/predict-c.c
-OBJASM = $(ASMSRC:%.S=%.o)
-OBJCHK += tools/checkasm-aarch64.o
+OBJASM = $(ASMSRC:%.S=%.lo)
+OBJCHK += tools/checkasm-aarch64.lo
endif
endif
@@ -173,20 +173,23 @@ GENERATED += common/oclobj.h
SRCS += common/opencl.c encoder/slicetype-cl.c
endif
-OBJS += $(SRCS:%.c=%.o)
-OBJCLI += $(SRCCLI:%.c=%.o)
+OBJS += $(SRCS:%.c=%.lo)
+OBJCLI += $(SRCCLI:%.c=%.lo)
OBJSO += $(SRCSO:%.c=%.o)
.PHONY: all default fprofiled clean distclean install install-* uninstall cli lib-* etags
+%.lo: %.c
+ ${LIBTOOL} --mode=compile ${CC} -c ${CFLAGS} ${PICFLAG} -o $@ $<
+
cli: x264$(EXE)
-lib-static: $(LIBX264)
+lib-static: libx264.la
lib-shared: $(SONAME)
-$(LIBX264): $(GENERATED) .depend $(OBJS) $(OBJASM)
- rm -f $(LIBX264)
- $(AR)$@ $(OBJS) $(OBJASM)
- $(if $(RANLIB), $(RANLIB) $@)
+libx264.la: $(GENERATED) .depend $(OBJS) $(OBJASM)
+ ${LIBTOOL} --mode=link \
+ ${CC} -o libx264.la -rpath ${PREFIX}/lib -version-info 0 \
+ $(OBJS) $(OBJASM) ${LDFLAGS}
$(SONAME): $(GENERATED) .depend $(OBJS) $(OBJASM) $(OBJSO)
$(LD)$@ $(OBJS) $(OBJASM) $(OBJSO) $(SOFLAGS) $(LDFLAGS)
@@ -198,20 +201,19 @@ checkasm: checkasm$(EXE)
example: example$(EXE)
endif
-x264$(EXE): $(GENERATED) .depend $(OBJCLI) $(CLI_LIBX264)
- $(LD)$@ $(OBJCLI) $(CLI_LIBX264) $(LDFLAGSCLI) $(LDFLAGS)
+x264$(EXE): $(GENERATED) .depend $(OBJCLI) libx264.la
+ ${LIBTOOL} --mode=link $(LD)$@ $(OBJCLI) libx264.la $(LDFLAGSCLI) $(LDFLAGS)
-checkasm$(EXE): $(GENERATED) .depend $(OBJCHK) $(LIBX264)
- $(LD)$@ $(OBJCHK) $(LIBX264) $(LDFLAGS)
+checkasm$(EXE): $(GENERATED) .depend $(OBJCHK) libx264.la
+ ${LIBTOOL} --mode=link $(LD)$@ $+ $(LDFLAGS)
example$(EXE): $(GENERATED) .depend $(OBJEXAMPLE) $(LIBX264)
$(LD)$@ $(OBJEXAMPLE) $(LIBX264) $(LDFLAGS)
$(OBJS) $(OBJASM) $(OBJSO) $(OBJCLI) $(OBJCHK) $(OBJEXAMPLE): .depend
-%.o: %.asm common/x86/x86inc.asm common/x86/x86util.asm
- $(AS) $(ASFLAGS) -o $@ $<
- -@ $(if $(STRIP), $(STRIP) -x $@) # delete local/anonymous symbols, so they don't show up in oprofile
+%.lo: %.asm common/x86/x86inc.asm common/x86/x86util.asm
+ ${LIBTOOL} --mode=compile --tag=CC ./strip_fopt.sh $(AS) $(ASFLAGS) -o $@ $<
%.o: %.S
$(AS) $(ASFLAGS) -o $@ $<
@@ -281,8 +283,7 @@ distclean: clean
rm -f config.mak x264_config.h config.h config.log x264.pc x264.def conftest*
install-cli: cli
- $(INSTALL) -d $(DESTDIR)$(bindir)
- $(INSTALL) x264$(EXE) $(DESTDIR)$(bindir)
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} x264 $(DESTDIR)$(bindir)/x264
install-lib-dev:
$(INSTALL) -d $(DESTDIR)$(includedir)
@@ -293,8 +294,7 @@ install-lib-dev:
$(INSTALL) -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
install-lib-static: lib-static install-lib-dev
- $(INSTALL) -m 644 $(LIBX264) $(DESTDIR)$(libdir)
- $(if $(RANLIB), $(RANLIB) $(DESTDIR)$(libdir)/$(LIBX264))
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} libx264.la $(DESTDIR)$(libdir)
install-lib-shared: lib-shared install-lib-dev
ifneq ($(IMPLIBNAME),)