2010-05-04 20:18:57 +02:00
|
|
|
$NetBSD: patch-ab,v 1.12 2010/05/04 18:18:57 drochner Exp $
|
2008-03-10 12:59:26 +01:00
|
|
|
|
2010-05-04 20:18:57 +02:00
|
|
|
--- Makefile.orig 2009-09-20 20:45:09.000000000 +0000
|
2008-07-10 15:40:40 +02:00
|
|
|
+++ Makefile
|
2008-12-18 17:19:07 +01:00
|
|
|
@@ -40,9 +40,9 @@ endif
|
|
|
|
ifdef ARCH_X86
|
|
|
|
ASFLAGS += -Icommon/x86/
|
|
|
|
SRCS += common/x86/mc-c.c common/x86/predict-c.c
|
2008-03-10 12:59:26 +01:00
|
|
|
-OBJASM = $(ASMSRC:%.asm=%.o)
|
|
|
|
+OBJASM = $(ASMSRC:%.asm=%.lo)
|
2008-12-18 17:19:07 +01:00
|
|
|
$(OBJASM): common/x86/x86inc.asm common/x86/x86util.asm
|
|
|
|
-checkasm: tools/checkasm-a.o
|
|
|
|
+checkasm: tools/checkasm-a.lo
|
2008-03-10 12:59:26 +01:00
|
|
|
endif
|
|
|
|
endif
|
2008-12-18 17:19:07 +01:00
|
|
|
|
2010-05-04 20:18:57 +02:00
|
|
|
@@ -52,7 +52,7 @@ ALTIVECSRC += common/ppc/mc.c common/ppc
|
2008-03-10 12:59:26 +01:00
|
|
|
common/ppc/quant.c common/ppc/deblock.c \
|
|
|
|
common/ppc/predict.c
|
|
|
|
SRCS += $(ALTIVECSRC)
|
|
|
|
-$(ALTIVECSRC:%.c=%.o): CFLAGS += $(ALTIVECFLAGS)
|
|
|
|
+$(ALTIVECSRC:%.c=%.lo): CFLAGS += $(ALTIVECFLAGS)
|
|
|
|
endif
|
|
|
|
|
2010-05-04 20:18:57 +02:00
|
|
|
# NEON optims
|
|
|
|
@@ -62,44 +62,49 @@ 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
|
|
|
|
SRCS += common/arm/mc-c.c common/arm/predict-c.c
|
|
|
|
-OBJASM = $(ASMSRC:%.S=%.o)
|
|
|
|
+OBJASM = $(ASMSRC:%.S=%.lo)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2008-03-10 12:59:26 +01:00
|
|
|
# VIS optims
|
|
|
|
ifeq ($(ARCH),UltraSparc)
|
|
|
|
ASMSRC += common/sparc/pixel.asm
|
|
|
|
-OBJASM = $(ASMSRC:%.asm=%.o)
|
|
|
|
+OBJASM = $(ASMSRC:%.asm=%.lo)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(HAVE_GETOPT_LONG),1)
|
|
|
|
SRCS += extras/getopt.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
-OBJS = $(SRCS:%.c=%.o)
|
2008-12-18 17:19:07 +01:00
|
|
|
-OBJCLI = $(SRCCLI:%.c=%.o)
|
2008-03-10 12:59:26 +01:00
|
|
|
+OBJS = $(SRCS:%.c=%.lo)
|
2008-12-18 17:19:07 +01:00
|
|
|
+OBJCLI = $(SRCCLI:%.c=%.lo)
|
2008-03-10 12:59:26 +01:00
|
|
|
DEP = depend
|
|
|
|
|
2008-12-18 17:19:07 +01:00
|
|
|
.PHONY: all default fprofiled clean distclean install uninstall dox test testclean
|
2008-03-10 12:59:26 +01:00
|
|
|
|
|
|
|
default: $(DEP) x264$(EXE)
|
|
|
|
|
|
|
|
-libx264.a: .depend $(OBJS) $(OBJASM)
|
2009-05-25 22:56:38 +02:00
|
|
|
- $(AR) rc libx264.a $(OBJS) $(OBJASM)
|
|
|
|
- $(RANLIB) libx264.a
|
2008-03-10 12:59:26 +01:00
|
|
|
+%.lo: %.c
|
2008-12-18 17:19:07 +01:00
|
|
|
+ ${LIBTOOL} --mode=compile ${CC} -c ${CFLAGS} ${PICFLAGS} -o $@ $<
|
2008-03-10 12:59:26 +01:00
|
|
|
+
|
|
|
|
+libx264.la: .depend $(OBJS) $(OBJASM)
|
2008-12-18 17:19:07 +01:00
|
|
|
+ ${LIBTOOL} --mode=link \
|
|
|
|
+ ${CC} -o libx264.la -rpath ${PREFIX}/lib -version-info 0 \
|
2009-02-03 09:44:15 +01:00
|
|
|
+ $(OBJS) $(OBJASM) ${LDFLAGS}
|
2008-03-10 12:59:26 +01:00
|
|
|
|
|
|
|
$(SONAME): .depend $(OBJS) $(OBJASM)
|
2008-12-18 17:19:07 +01:00
|
|
|
$(CC) -shared -o $@ $(OBJS) $(OBJASM) $(SOFLAGS) $(LDFLAGS)
|
2008-03-10 12:59:26 +01:00
|
|
|
|
|
|
|
-x264$(EXE): $(OBJCLI) libx264.a
|
|
|
|
- $(CC) -o $@ $+ $(LDFLAGS)
|
2010-05-04 20:18:57 +02:00
|
|
|
+x264$(EXE): $(OBJCLI) libx264.la
|
2008-03-10 12:59:26 +01:00
|
|
|
+ ${LIBTOOL} --mode=link $(CC) -o $@ $+ $(LDFLAGS)
|
|
|
|
|
2008-12-18 17:19:07 +01:00
|
|
|
-checkasm: tools/checkasm.o libx264.a
|
|
|
|
- $(CC) -o $@ $+ $(LDFLAGS)
|
|
|
|
+checkasm: tools/checkasm.lo libx264.la
|
|
|
|
+ ${LIBTOOL} --mode=link $(CC) -o $@ $+ $(LDFLAGS)
|
2008-03-10 12:59:26 +01:00
|
|
|
|
|
|
|
-%.o: %.asm
|
|
|
|
- $(AS) $(ASFLAGS) -o $@ $<
|
2010-05-04 20:18:57 +02:00
|
|
|
- -@ $(STRIP) -x $@ # delete local/anonymous symbols, so they don't show up in oprofile
|
2008-03-10 12:59:26 +01:00
|
|
|
+%.lo: %.asm
|
2008-12-18 17:19:07 +01:00
|
|
|
+ ${LIBTOOL} --mode=compile --tag=CC \
|
|
|
|
+ ./strip_fopt.sh $(AS) $(ASFLAGS) -o $@ $<
|
2010-05-04 20:18:57 +02:00
|
|
|
+ -@ $(STRIP) -x $(@:.lo=.o) # delete local/anonymous symbols, so they don't show up in oprofile
|
2008-03-10 12:59:26 +01:00
|
|
|
|
2010-05-04 20:18:57 +02:00
|
|
|
%.o: %.S
|
|
|
|
$(AS) $(ASFLAGS) -o $@ $<
|
|
|
|
@@ -156,21 +161,16 @@ distclean: clean
|
2008-12-18 17:19:07 +01:00
|
|
|
rm -f config.mak config.h x264.pc
|
|
|
|
rm -rf test/
|
2008-07-10 15:40:40 +02:00
|
|
|
|
2008-12-18 17:19:07 +01:00
|
|
|
-install: x264$(EXE) $(SONAME)
|
|
|
|
+install: x264$(EXE) libx264.la
|
|
|
|
install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
|
|
|
|
install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
|
2008-03-10 12:59:26 +01:00
|
|
|
install -m 644 x264.h $(DESTDIR)$(includedir)
|
|
|
|
- install -m 644 libx264.a $(DESTDIR)$(libdir)
|
2008-12-18 17:19:07 +01:00
|
|
|
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} libx264.la $(DESTDIR)$(libdir)
|
2008-03-10 12:59:26 +01:00
|
|
|
install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
|
2008-12-18 17:19:07 +01:00
|
|
|
- install x264$(EXE) $(DESTDIR)$(bindir)
|
2009-05-25 22:56:38 +02:00
|
|
|
- $(RANLIB) $(DESTDIR)$(libdir)/libx264.a
|
2008-12-18 17:19:07 +01:00
|
|
|
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} x264$(EXE) $(DESTDIR)$(bindir)
|
|
|
|
ifeq ($(SYS),MINGW)
|
|
|
|
$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(bindir))
|
|
|
|
-else
|
|
|
|
- $(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX))
|
2008-03-10 12:59:26 +01:00
|
|
|
- $(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
|
2008-12-18 17:19:07 +01:00
|
|
|
endif
|
|
|
|
- $(if $(IMPLIBNAME), install -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir))
|
2008-03-10 12:59:26 +01:00
|
|
|
|
2008-12-18 17:19:07 +01:00
|
|
|
uninstall:
|
|
|
|
rm -f $(DESTDIR)$(includedir)/x264.h $(DESTDIR)$(libdir)/libx264.a
|