openbsd-ports/multimedia/x264/patches/patch-Makefile
kili 1c274146f6 Update to a newer snapshot.
From Brad (new maintainer).

"theoretically ok" ajacoutot@
2009-04-14 19:50:47 +00:00

55 lines
1.8 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.4 2009/04/14 19:50:47 kili Exp $
--- Makefile.orig Wed Feb 4 16:45:09 2009
+++ Makefile Thu Mar 5 10:44:49 2009
@@ -53,6 +53,9 @@ ALTIVECSRC += common/ppc/mc.c common/ppc/pixel.c commo
common/ppc/predict.c
SRCS += $(ALTIVECSRC)
$(ALTIVECSRC:%.c=%.o): CFLAGS += $(ALTIVECFLAGS)
+$(ALTIVECSRC:%.c=%.so): CFLAGS += $(ALTIVECFLAGS)
+common/cpu.o: CFLAGS += $(ALTIVECFLAGS)
+common/cpu.so: CFLAGS += $(ALTIVECFLAGS)
endif
# VIS optims
@@ -66,6 +69,7 @@ SRCS += extras/getopt.c
endif
OBJS = $(SRCS:%.c=%.o)
+SOBJS = $(SRCS:%.c=%.so)
OBJCLI = $(SRCCLI:%.c=%.o)
DEP = depend
@@ -77,8 +81,8 @@ libx264.a: .depend $(OBJS) $(OBJASM)
ar rc libx264.a $(OBJS) $(OBJASM)
ranlib libx264.a
-$(SONAME): .depend $(OBJS) $(OBJASM)
- $(CC) -shared -o $@ $(OBJS) $(OBJASM) $(SOFLAGS) $(LDFLAGS)
+$(SONAME): .depend $(SOBJS) $(OBJASM)
+ $(CC) -shared -o $@ $(SOBJS) $(OBJASM) $(SOFLAGS) $(LDFLAGS)
x264$(EXE): $(OBJCLI) libx264.a
$(CC) -o $@ $+ $(LDFLAGS)
@@ -91,9 +95,12 @@ checkasm: tools/checkasm.o libx264.a
# delete local/anonymous symbols, so they don't show up in oprofile
-@ strip -x $@
+%.so: %.c
+ $(CC) $(CFLAGS) -fPIC -c -o $@ $<
+
.depend: config.mak
rm -f .depend
- $(foreach SRC, $(SRCS) $(SRCCLI), $(CC) $(CFLAGS) $(ALTIVECFLAGS) $(SRC) -MT $(SRC:%.c=%.o) -MM -g0 1>> .depend;)
+ $(foreach SRC, $(SRCS) $(SRCCLI), ( $(ECHON) "`dirname $(SRC)`/" && $(CC) $(CFLAGS) $(ALTIVECFLAGS) $(SRC) -MM -g0 ) 1>> .depend;)
config.mak:
./configure
@@ -154,7 +161,6 @@ install: x264$(EXE) $(SONAME)
ifeq ($(SYS),MINGW)
$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(bindir))
else
- $(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX))
$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
endif
$(if $(IMPLIBNAME), install -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir))