| @@ -1,98 +1,103 @@ | | | @@ -1,98 +1,103 @@ |
1 | $NetBSD: patch-ab,v 1.5 2008/03/18 15:05:04 tron Exp $ | | 1 | $NetBSD: patch-ab,v 1.6 2008/03/31 16:16:00 tron Exp $ |
2 | | | 2 | |
3 | --- Makefile.orig 2007-12-18 22:45:04.000000000 +0100 | | 3 | --- Makefile.orig 2007-12-18 21:45:04.000000000 +0000 |
4 | +++ Makefile | | 4 | +++ Makefile 2008-03-31 17:09:28.000000000 +0100 |
5 | @@ -26,7 +26,7 @@ ASMSRC = common/i386/dct-a.asm common/i | | 5 | @@ -26,7 +26,7 @@ |
6 | common/i386/mc-a2.asm common/i386/predict-a.asm \ | | 6 | common/i386/mc-a2.asm common/i386/predict-a.asm \ |
7 | common/i386/pixel-sse2.asm common/i386/quant-a.asm \ | | 7 | common/i386/pixel-sse2.asm common/i386/quant-a.asm \ |
8 | common/i386/deblock-a.asm | | 8 | common/i386/deblock-a.asm |
9 | -OBJASM = $(ASMSRC:%.asm=%.o) | | 9 | -OBJASM = $(ASMSRC:%.asm=%.o) |
10 | +OBJASM = $(ASMSRC:%.asm=%.lo) | | 10 | +OBJASM = $(ASMSRC:%.asm=%.lo) |
11 | ASFLAGS += -Icommon/i386/ | | 11 | ASFLAGS += -Icommon/i386/ |
12 | endif | | 12 | endif |
13 | endif | | 13 | endif |
14 | @@ -40,7 +40,7 @@ ASMSRC = common/amd64/dct-a.asm common/ | | 14 | @@ -40,31 +40,33 @@ |
15 | common/amd64/mc-a2.asm common/amd64/predict-a.asm \ | | 15 | common/amd64/mc-a2.asm common/amd64/predict-a.asm \ |
16 | common/amd64/pixel-sse2.asm common/amd64/quant-a.asm \ | | 16 | common/amd64/pixel-sse2.asm common/amd64/quant-a.asm \ |
17 | common/amd64/deblock-a.asm | | 17 | common/amd64/deblock-a.asm |
18 | -OBJASM = $(ASMSRC:%.asm=%.o) | | 18 | -OBJASM = $(ASMSRC:%.asm=%.o) |
19 | +OBJASM = $(ASMSRC:%.asm=%.lo) | | 19 | +OBJASM = $(ASMSRC:%.asm=%.lo) |
20 | ASFLAGS += -Icommon/amd64 | | 20 | ASFLAGS += -Icommon/amd64 |
21 | endif | | 21 | endif |
22 | endif | | 22 | endif |
23 | @@ -51,20 +51,20 @@ ALTIVECSRC += common/ppc/mc.c common/ppc | | 23 | |
| | | 24 | # AltiVec optims |
| | | 25 | ifeq ($(ARCH),PPC) |
| | | 26 | +ifneq ($(SYS),MACOSX) |
| | | 27 | ALTIVECSRC += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \ |
24 | common/ppc/quant.c common/ppc/deblock.c \ | | 28 | common/ppc/quant.c common/ppc/deblock.c \ |
25 | common/ppc/predict.c | | 29 | common/ppc/predict.c |
26 | SRCS += $(ALTIVECSRC) | | 30 | SRCS += $(ALTIVECSRC) |
27 | -$(ALTIVECSRC:%.c=%.o): CFLAGS += $(ALTIVECFLAGS) | | 31 | -$(ALTIVECSRC:%.c=%.o): CFLAGS += $(ALTIVECFLAGS) |
28 | +$(ALTIVECSRC:%.c=%.lo): CFLAGS += $(ALTIVECFLAGS) | | 32 | +$(ALTIVECSRC:%.c=%.lo): CFLAGS += $(ALTIVECFLAGS) |
| | | 33 | +endif |
29 | endif | | 34 | endif |
30 | | | 35 | |
31 | # VIS optims | | 36 | # VIS optims |
32 | ifeq ($(ARCH),UltraSparc) | | 37 | ifeq ($(ARCH),UltraSparc) |
33 | ASMSRC += common/sparc/pixel.asm | | 38 | ASMSRC += common/sparc/pixel.asm |
34 | -OBJASM = $(ASMSRC:%.asm=%.o) | | 39 | -OBJASM = $(ASMSRC:%.asm=%.o) |
35 | +OBJASM = $(ASMSRC:%.asm=%.lo) | | 40 | +OBJASM = $(ASMSRC:%.asm=%.lo) |
36 | endif | | 41 | endif |
37 | | | 42 | |
38 | ifneq ($(HAVE_GETOPT_LONG),1) | | 43 | ifneq ($(HAVE_GETOPT_LONG),1) |
39 | SRCS += extras/getopt.c | | 44 | SRCS += extras/getopt.c |
40 | endif | | 45 | endif |
41 | | | 46 | |
42 | -OBJS = $(SRCS:%.c=%.o) | | 47 | -OBJS = $(SRCS:%.c=%.o) |
43 | +OBJS = $(SRCS:%.c=%.lo) | | 48 | +OBJS = $(SRCS:%.c=%.lo) |
44 | OBJCLI = $(SRCCLI:%.c=%.o) | | 49 | OBJCLI = $(SRCCLI:%.c=%.o) |
45 | DEP = depend | | 50 | DEP = depend |
46 | | | 51 | |
47 | @@ -73,15 +73,17 @@ all: default | | 52 | @@ -73,15 +75,17 @@ |
48 | | | 53 | |
49 | default: $(DEP) x264$(EXE) | | 54 | default: $(DEP) x264$(EXE) |
50 | | | 55 | |
51 | -libx264.a: .depend $(OBJS) $(OBJASM) | | 56 | -libx264.a: .depend $(OBJS) $(OBJASM) |
52 | - ar rc libx264.a $(OBJS) $(OBJASM) | | 57 | - ar rc libx264.a $(OBJS) $(OBJASM) |
53 | - ranlib libx264.a | | 58 | - ranlib libx264.a |
54 | +%.lo: %.c | | 59 | +%.lo: %.c |
55 | + ${LIBTOOL} --mode=compile ${CC} -c ${CFLAGS} -o $@ $< | | 60 | + ${LIBTOOL} --mode=compile ${CC} -c ${CFLAGS} -o $@ $< |
56 | + | | 61 | + |
57 | +libx264.la: .depend $(OBJS) $(OBJASM) | | 62 | +libx264.la: .depend $(OBJS) $(OBJASM) |
58 | + ${LIBTOOL} --mode=link ${CC} -o libx264.la $(OBJS) $(OBJASM) ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} ${DARWIN_PPC_LDFLAGS} -rpath ${PREFIX}/lib -version-info 0 | | 63 | + ${LIBTOOL} --mode=link ${CC} -o libx264.la $(OBJS) $(OBJASM) ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} -rpath ${PREFIX}/lib -version-info 0 |
59 | | | 64 | |
60 | $(SONAME): .depend $(OBJS) $(OBJASM) | | 65 | $(SONAME): .depend $(OBJS) $(OBJASM) |
61 | $(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS) | | 66 | $(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS) |
62 | | | 67 | |
63 | -x264$(EXE): $(OBJCLI) libx264.a | | 68 | -x264$(EXE): $(OBJCLI) libx264.a |
64 | - $(CC) -o $@ $+ $(LDFLAGS) | | 69 | - $(CC) -o $@ $+ $(LDFLAGS) |
65 | +x264$(EXE): $(OBJCLI) libx264.la | | 70 | +x264$(EXE): $(OBJCLI) libx264.la |
66 | + ${LIBTOOL} --mode=link $(CC) -o $@ $+ $(LDFLAGS) | | 71 | + ${LIBTOOL} --mode=link $(CC) -o $@ $+ $(LDFLAGS) |
67 | | | 72 | |
68 | libx264gtk.a: muxers.o libx264.a | | 73 | libx264gtk.a: muxers.o libx264.a |
69 | $(MAKE) -C gtk | | 74 | $(MAKE) -C gtk |
70 | @@ -89,10 +91,10 @@ libx264gtk.a: muxers.o libx264.a | | 75 | @@ -89,10 +93,10 @@ |
71 | checkasm: tools/checkasm.o libx264.a | | 76 | checkasm: tools/checkasm.o libx264.a |
72 | $(CC) -o $@ $+ $(LDFLAGS) | | 77 | $(CC) -o $@ $+ $(LDFLAGS) |
73 | | | 78 | |
74 | -common/amd64/*.o: common/amd64/amd64inc.asm | | 79 | -common/amd64/*.o: common/amd64/amd64inc.asm |
75 | -common/i386/*.o: common/i386/i386inc.asm | | 80 | -common/i386/*.o: common/i386/i386inc.asm |
76 | -%.o: %.asm | | 81 | -%.o: %.asm |
77 | - $(AS) $(ASFLAGS) -o $@ $< | | 82 | - $(AS) $(ASFLAGS) -o $@ $< |
78 | +common/amd64/*.lo: common/amd64/amd64inc.asm | | 83 | +common/amd64/*.lo: common/amd64/amd64inc.asm |
79 | +common/i386/*.lo: common/i386/i386inc.asm | | 84 | +common/i386/*.lo: common/i386/i386inc.asm |
80 | +%.lo: %.asm | | 85 | +%.lo: %.asm |
81 | + ${LIBTOOL} --mode=compile --tag=ASM ./strip_fopt.sh $(AS) $(ASFLAGS) -o $@ $< | | 86 | + ${LIBTOOL} --mode=compile --tag=ASM ./strip_fopt.sh $(AS) $(ASFLAGS) -o $@ $< |
82 | # delete local/anonymous symbols, so they don't show up in oprofile | | 87 | # delete local/anonymous symbols, so they don't show up in oprofile |
83 | -@ strip -x $@ | | 88 | -@ strip -x $@ |
84 | | | 89 | |
85 | @@ -153,12 +155,9 @@ install: x264 $(SONAME) | | 90 | @@ -153,12 +157,9 @@ |
86 | install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir) | | 91 | install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir) |
87 | install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig | | 92 | install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig |
88 | install -m 644 x264.h $(DESTDIR)$(includedir) | | 93 | install -m 644 x264.h $(DESTDIR)$(includedir) |
89 | - install -m 644 libx264.a $(DESTDIR)$(libdir) | | 94 | - install -m 644 libx264.a $(DESTDIR)$(libdir) |
90 | + ${LIBTOOL} --mode=install install -m 644 libx264.la $(DESTDIR)$(libdir) | | 95 | + ${LIBTOOL} --mode=install install -m 644 libx264.la $(DESTDIR)$(libdir) |
91 | install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig | | 96 | install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig |
92 | - install x264 $(DESTDIR)$(bindir) | | 97 | - install x264 $(DESTDIR)$(bindir) |
93 | - ranlib $(DESTDIR)$(libdir)/libx264.a | | 98 | - ranlib $(DESTDIR)$(libdir)/libx264.a |
94 | - $(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so) | | 99 | - $(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so) |
95 | - $(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir)) | | 100 | - $(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir)) |
96 | + ${LIBTOOL} --mode=install install x264 $(DESTDIR)$(bindir) | | 101 | + ${LIBTOOL} --mode=install install x264 $(DESTDIR)$(bindir) |
97 | | | 102 | |
98 | install-gtk: libx264gtk.a | | 103 | install-gtk: libx264gtk.a |