openbsd-ports/multimedia/x264/patches/patch-Makefile

41 lines
1.4 KiB
Plaintext
Raw Normal View History

$OpenBSD: patch-Makefile,v 1.5 2010/05/26 21:18:17 jakemsr Exp $
--- Makefile.orig Tue May 11 16:45:09 2010
+++ Makefile Tue May 11 18:11:56 2010
@@ -112,6 +112,7 @@ endif
endif
OBJS = $(SRCS:%.c=%.o)
+SOBJS = $(SRCS:%.c=%.so)
OBJCLI = $(SRCCLI:%.c=%.o)
OBJSO = $(SRCSO:%.c=%.o)
DEP = depend
@@ -124,8 +125,8 @@ libx264.a: .depend $(OBJS) $(OBJASM)
$(AR) rc libx264.a $(OBJS) $(OBJASM)
$(RANLIB) libx264.a
-$(SONAME): .depend $(OBJS) $(OBJASM) $(OBJSO)
- $(CC) -shared -o $@ $(OBJS) $(OBJASM) $(OBJSO) $(SOFLAGS) $(LDFLAGS)
+$(SONAME): .depend $(SOBJS) $(OBJASM) $(OBJSO)
+ $(CC) -shared -o $@ $(SOBJS) $(OBJASM) $(OBJSO) $(SOFLAGS) $(LDFLAGS)
x264$(EXE): $(OBJCLI) libx264.a
$(CC) -o $@ $+ $(LDFLAGS) $(LDFLAGSCLI)
@@ -141,6 +142,9 @@ checkasm: tools/checkasm.o libx264.a
$(AS) $(ASFLAGS) -o $@ $<
-@ $(STRIP) -x $@ # delete local/anonymous symbols, so they don't show up in oprofile
+%.so: %.c
+ $(CC) $(CFLAGS) -fPIC -c -o $@ $<
+
.depend: config.mak
@rm -f .depend
@$(foreach SRC, $(SRCS) $(SRCCLI) $(SRCSO), $(CC) $(CFLAGS) $(SRC) -MT $(SRC:%.c=%.o) -MM -g0 1>> .depend;)
@@ -206,7 +210,6 @@ install: x264$(EXE) $(SONAME)
ifeq ($(SYS),MINGW)
$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(bindir))
else
- $(if $(SONAME), ln -f -s $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX))
$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
endif
$(if $(IMPLIBNAME), install -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir))