| @@ -1,110 +1,110 @@ | | | @@ -1,110 +1,110 @@ |
1 | $NetBSD: patch-ab,v 1.17 2012/11/08 20:28:09 adam Exp $ | | 1 | $NetBSD: patch-ab,v 1.18 2013/07/04 16:43:55 wiz Exp $ |
2 | | | 2 | |
3 | --- Makefile.orig 2012-11-07 21:45:03.000000000 +0000 | | 3 | --- Makefile.orig 2013-07-03 20:45:03.000000000 +0000 |
4 | +++ Makefile | | 4 | +++ Makefile |
5 | @@ -99,9 +99,9 @@ endif | | 5 | @@ -101,9 +101,9 @@ endif |
6 | ifdef ARCH_X86 | | 6 | ifdef ARCH_X86 |
7 | ASFLAGS += -I$(SRCPATH)/common/x86/ | | 7 | ASFLAGS += -I$(SRCPATH)/common/x86/ |
8 | SRCS += common/x86/mc-c.c common/x86/predict-c.c | | 8 | SRCS += common/x86/mc-c.c common/x86/predict-c.c |
9 | -OBJASM = $(ASMSRC:%.asm=%.o) | | 9 | -OBJASM = $(ASMSRC:%.asm=%.o) |
10 | +OBJASM = $(ASMSRC:%.asm=%.lo) | | 10 | +OBJASM = $(ASMSRC:%.asm=%.lo) |
11 | $(OBJASM): common/x86/x86inc.asm common/x86/x86util.asm | | 11 | $(OBJASM): common/x86/x86inc.asm common/x86/x86util.asm |
12 | -OBJCHK += tools/checkasm-a.o | | 12 | -OBJCHK += tools/checkasm-a.o |
13 | +OBJCHK += tools/checkasm-a.lo | | 13 | +OBJCHK += tools/checkasm-a.lo |
14 | endif | | 14 | endif |
15 | endif | | 15 | endif |
16 | | | 16 | |
17 | @@ -121,7 +121,7 @@ ASMSRC += common/arm/cpu-a.S common/arm/ | | 17 | @@ -123,7 +123,7 @@ ASMSRC += common/arm/cpu-a.S common/arm/ |
18 | common/arm/dct-a.S common/arm/quant-a.S common/arm/deblock-a.S \ | | 18 | common/arm/dct-a.S common/arm/quant-a.S common/arm/deblock-a.S \ |
19 | common/arm/predict-a.S | | 19 | common/arm/predict-a.S |
20 | SRCS += common/arm/mc-c.c common/arm/predict-c.c | | 20 | SRCS += common/arm/mc-c.c common/arm/predict-c.c |
21 | -OBJASM = $(ASMSRC:%.S=%.o) | | 21 | -OBJASM = $(ASMSRC:%.S=%.o) |
22 | +OBJASM = $(ASMSRC:%.S=%.lo) | | 22 | +OBJASM = $(ASMSRC:%.S=%.lo) |
23 | endif | | 23 | endif |
24 | endif | | 24 | endif |
25 | | | 25 | |
26 | @@ -129,7 +129,7 @@ endif | | 26 | @@ -131,7 +131,7 @@ endif |
27 | ifeq ($(ARCH),UltraSPARC) | | 27 | ifeq ($(ARCH),UltraSPARC) |
28 | ifeq ($(findstring HIGH_BIT_DEPTH, $(CONFIG)),) | | 28 | ifeq ($(findstring HIGH_BIT_DEPTH, $(CONFIG)),) |
29 | ASMSRC += common/sparc/pixel.asm | | 29 | ASMSRC += common/sparc/pixel.asm |
30 | -OBJASM = $(ASMSRC:%.asm=%.o) | | 30 | -OBJASM = $(ASMSRC:%.asm=%.o) |
31 | +OBJASM = $(ASMSRC:%.asm=%.lo) | | 31 | +OBJASM = $(ASMSRC:%.asm=%.lo) |
32 | endif | | 32 | endif |
33 | endif | | 33 | endif |
34 | | | 34 | |
35 | @@ -145,20 +145,23 @@ OBJSO += $(if $(RC), x264res.dll.o) | | 35 | @@ -154,20 +154,23 @@ GENERATED += common/oclobj.h |
36 | endif | | 36 | SRCS += common/opencl.c encoder/slicetype-cl.c |
37 | endif | | 37 | endif |
38 | | | 38 | |
39 | -OBJS += $(SRCS:%.c=%.o) | | 39 | -OBJS += $(SRCS:%.c=%.o) |
40 | -OBJCLI += $(SRCCLI:%.c=%.o) | | 40 | -OBJCLI += $(SRCCLI:%.c=%.o) |
41 | +OBJS += $(SRCS:%.c=%.lo) | | 41 | +OBJS += $(SRCS:%.c=%.lo) |
42 | +OBJCLI += $(SRCCLI:%.c=%.lo) | | 42 | +OBJCLI += $(SRCCLI:%.c=%.lo) |
43 | OBJSO += $(SRCSO:%.c=%.o) | | 43 | OBJSO += $(SRCSO:%.c=%.o) |
44 | | | 44 | |
45 | .PHONY: all default fprofiled clean distclean install uninstall lib-static lib-shared cli install-lib-dev install-lib-static install-lib-shared install-cli | | 45 | .PHONY: all default fprofiled clean distclean install uninstall lib-static lib-shared cli install-lib-dev install-lib-static install-lib-shared install-cli |
46 | | | 46 | |
47 | +%.lo: %.c | | 47 | +%.lo: %.c |
48 | + ${LIBTOOL} --mode=compile ${CC} -c ${CFLAGS} ${PICFLAGS} -o $@ $< | | 48 | + ${LIBTOOL} --mode=compile ${CC} -c ${CFLAGS} ${PICFLAGS} -o $@ $< |
49 | + | | 49 | + |
50 | cli: x264$(EXE) | | 50 | cli: x264$(EXE) |
51 | -lib-static: $(LIBX264) | | 51 | -lib-static: $(LIBX264) |
52 | +lib-static: libx264.la | | 52 | +lib-static: libx264.la |
53 | lib-shared: $(SONAME) | | 53 | lib-shared: $(SONAME) |
54 | | | 54 | |
55 | -$(LIBX264): .depend $(OBJS) $(OBJASM) | | 55 | -$(LIBX264): $(GENERATED) .depend $(OBJS) $(OBJASM) |
56 | - rm -f $(LIBX264) | | 56 | - rm -f $(LIBX264) |
57 | - $(AR)$@ $(OBJS) $(OBJASM) | | 57 | - $(AR)$@ $(OBJS) $(OBJASM) |
58 | - $(if $(RANLIB), $(RANLIB) $@) | | 58 | - $(if $(RANLIB), $(RANLIB) $@) |
59 | +libx264.la: .depend $(OBJS) $(OBJASM) | | 59 | +libx264.la: $(GENERATED) .depend $(OBJS) $(OBJASM) |
60 | + ${LIBTOOL} --mode=link \ | | 60 | + ${LIBTOOL} --mode=link \ |
61 | + ${CC} -o libx264.la -rpath ${PREFIX}/lib -version-info 0 \ | | 61 | + ${CC} -o libx264.la -rpath ${PREFIX}/lib -version-info 0 \ |
62 | + $(OBJS) $(OBJASM) ${LDFLAGS} | | 62 | + $(OBJS) $(OBJASM) ${LDFLAGS} |
63 | | | 63 | |
64 | $(SONAME): .depend $(OBJS) $(OBJASM) $(OBJSO) | | 64 | $(SONAME): $(GENERATED) .depend $(OBJS) $(OBJASM) $(OBJSO) |
65 | $(LD)$@ $(OBJS) $(OBJASM) $(OBJSO) $(SOFLAGS) $(LDFLAGS) | | 65 | $(LD)$@ $(OBJS) $(OBJASM) $(OBJSO) $(SOFLAGS) $(LDFLAGS) |
66 | @@ -169,17 +172,17 @@ x264: x264$(EXE) | | 66 | @@ -178,17 +181,17 @@ x264: x264$(EXE) |
67 | checkasm: checkasm$(EXE) | | 67 | checkasm: checkasm$(EXE) |
68 | endif | | 68 | endif |
69 | | | 69 | |
70 | -x264$(EXE): .depend $(OBJCLI) $(CLI_LIBX264) | | 70 | -x264$(EXE): $(GENERATED) .depend $(OBJCLI) $(CLI_LIBX264) |
71 | - $(LD)$@ $(OBJCLI) $(CLI_LIBX264) $(LDFLAGSCLI) $(LDFLAGS) | | 71 | - $(LD)$@ $(OBJCLI) $(CLI_LIBX264) $(LDFLAGSCLI) $(LDFLAGS) |
72 | +x264$(EXE): .depend $(OBJCLI) libx264.la | | 72 | +x264$(EXE): $(GENERATED) .depend $(OBJCLI) libx264.la |
73 | + ${LIBTOOL} --mode=link $(LD)$@ $(OBJCLI) libx264.la $(LDFLAGSCLI) $(LDFLAGS) | | 73 | + ${LIBTOOL} --mode=link $(LD)$@ $(OBJCLI) libx264.la $(LDFLAGSCLI) $(LDFLAGS) |
74 | | | 74 | |
75 | -checkasm$(EXE): .depend $(OBJCHK) $(LIBX264) | | 75 | -checkasm$(EXE): $(GENERATED) .depend $(OBJCHK) $(LIBX264) |
76 | - $(LD)$@ $(OBJCHK) $(LIBX264) $(LDFLAGS) | | 76 | - $(LD)$@ $(OBJCHK) $(LIBX264) $(LDFLAGS) |
77 | +checkasm$(EXE): .depend $(OBJCHK) libx264.la | | 77 | +checkasm$(EXE): $(GENERATED) .depend $(OBJCHK) libx264.la |
78 | + ${LIBTOOL} --mode=link $(LD)$@ $+ $(LDFLAGS) | | 78 | + ${LIBTOOL} --mode=link $(LD)$@ $+ $(LDFLAGS) |
79 | | | 79 | |
80 | $(OBJS) $(OBJASM) $(OBJSO) $(OBJCLI) $(OBJCHK): .depend | | 80 | $(OBJS) $(OBJASM) $(OBJSO) $(OBJCLI) $(OBJCHK): .depend |
81 | | | 81 | |
82 | -%.o: %.asm | | 82 | -%.o: %.asm |
83 | - $(AS) $(ASFLAGS) -o $@ $< | | 83 | - $(AS) $(ASFLAGS) -o $@ $< |
84 | - -@ $(if $(STRIP), $(STRIP) -x $@) # delete local/anonymous symbols, so they don't show up in oprofile | | 84 | - -@ $(if $(STRIP), $(STRIP) -x $@) # delete local/anonymous symbols, so they don't show up in oprofile |
85 | +%.lo: %.asm | | 85 | +%.lo: %.asm |
86 | + ${LIBTOOL} --mode=compile --tag=CC \ | | 86 | + ${LIBTOOL} --mode=compile --tag=CC \ |
87 | + ./strip_fopt.sh $(AS) $(ASFLAGS) -o $@ $< | | 87 | + ./strip_fopt.sh $(AS) $(ASFLAGS) -o $@ $< |
88 | | | 88 | |
89 | %.o: %.S | | 89 | %.o: %.S |
90 | $(AS) $(ASFLAGS) -o $@ $< | | 90 | $(AS) $(ASFLAGS) -o $@ $< |
91 | @@ -238,8 +241,7 @@ distclean: clean | | 91 | @@ -247,8 +250,7 @@ distclean: clean |
92 | rm -f config.mak x264_config.h config.h config.log x264.pc x264.def | | 92 | rm -f config.mak x264_config.h config.h config.log x264.pc x264.def |
93 | | | 93 | |
94 | install-cli: cli | | 94 | install-cli: cli |
95 | - install -d $(DESTDIR)$(bindir) | | 95 | - install -d $(DESTDIR)$(bindir) |
96 | - install x264$(EXE) $(DESTDIR)$(bindir) | | 96 | - install x264$(EXE) $(DESTDIR)$(bindir) |
97 | + ${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} x264 $(DESTDIR)$(bindir)/x264 | | 97 | + ${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} x264 $(DESTDIR)$(bindir)/x264 |
98 | | | 98 | |
99 | install-lib-dev: | | 99 | install-lib-dev: |
100 | install -d $(DESTDIR)$(includedir) | | 100 | install -d $(DESTDIR)$(includedir) |
101 | @@ -250,8 +252,7 @@ install-lib-dev: | | 101 | @@ -259,8 +261,7 @@ install-lib-dev: |
102 | install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig | | 102 | install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig |
103 | | | 103 | |
104 | install-lib-static: lib-static install-lib-dev | | 104 | install-lib-static: lib-static install-lib-dev |
105 | - install -m 644 $(LIBX264) $(DESTDIR)$(libdir) | | 105 | - install -m 644 $(LIBX264) $(DESTDIR)$(libdir) |
106 | - $(if $(RANLIB), $(RANLIB) $(DESTDIR)$(libdir)/$(LIBX264)) | | 106 | - $(if $(RANLIB), $(RANLIB) $(DESTDIR)$(libdir)/$(LIBX264)) |
107 | + ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} libx264.la $(DESTDIR)$(libdir) | | 107 | + ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} libx264.la $(DESTDIR)$(libdir) |
108 | | | 108 | |
109 | install-lib-shared: lib-shared install-lib-dev | | 109 | install-lib-shared: lib-shared install-lib-dev |
110 | ifneq ($(IMPLIBNAME),) | | 110 | ifneq ($(IMPLIBNAME),) |