2010-05-26 17:18:17 -04:00
|
|
|
$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
|
2007-04-08 13:31:01 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
OBJS = $(SRCS:%.c=%.o)
|
|
|
|
+SOBJS = $(SRCS:%.c=%.so)
|
|
|
|
OBJCLI = $(SRCCLI:%.c=%.o)
|
2010-05-26 17:18:17 -04:00
|
|
|
OBJSO = $(SRCSO:%.c=%.o)
|
2007-04-08 13:31:01 -04:00
|
|
|
DEP = depend
|
2010-05-26 17:18:17 -04:00
|
|
|
@@ -124,8 +125,8 @@ libx264.a: .depend $(OBJS) $(OBJASM)
|
|
|
|
$(AR) rc libx264.a $(OBJS) $(OBJASM)
|
|
|
|
$(RANLIB) libx264.a
|
2007-04-08 13:31:01 -04:00
|
|
|
|
2010-05-26 17:18:17 -04:00
|
|
|
-$(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)
|
2007-04-08 13:31:01 -04:00
|
|
|
|
2010-05-26 17:18:17 -04:00
|
|
|
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
|
2007-04-08 13:31:01 -04:00
|
|
|
|
|
|
|
+%.so: %.c
|
|
|
|
+ $(CC) $(CFLAGS) -fPIC -c -o $@ $<
|
|
|
|
+
|
2008-07-22 16:24:04 -04:00
|
|
|
.depend: config.mak
|
2010-05-26 17:18:17 -04:00
|
|
|
@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)
|
2008-07-22 16:24:04 -04:00
|
|
|
ifeq ($(SYS),MINGW)
|
|
|
|
$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(bindir))
|
|
|
|
else
|
2010-05-26 17:18:17 -04:00
|
|
|
- $(if $(SONAME), ln -f -s $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX))
|
2007-04-08 13:31:01 -04:00
|
|
|
$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
|
2008-07-22 16:24:04 -04:00
|
|
|
endif
|
|
|
|
$(if $(IMPLIBNAME), install -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir))
|