aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/x264-devel/files/patch-Makefile
blob: b08aa0a82ca3d964c963741601bcfc9f75d60e70 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--- Makefile.orig   Tue Nov 29 16:45:03 2005
+++ Makefile    Tue Nov 29 23:17:26 2005
@@ -16,7 +16,7 @@
 endif
 
 # MMX/SSE optims
-ifeq ($(ARCH),X86)
+ifdef ARCH_X86
 SRCS   += common/i386/mc-c.c common/i386/dct-c.c common/i386/predict.c
 ASMSRC  = common/i386/dct-a.asm common/i386/cpu-a.asm \
           common/i386/pixel-a.asm common/i386/mc-a.asm \
@@ -60,14 +60,21 @@
 DEP  = depend
 
 .PHONY: default fprofiled clean distclean install uninstall
-default: $(DEP) x264$(EXE)
+
+SHARED_LIB = libx264.so
+SHARED_LIB_VER = $(SHARED_LIB).1
+  
+default: $(DEP) x264$(EXE) $(SHARED_LIB_VER)
 
 libx264.a: .depend $(OBJS) $(OBJASM)
    ar rc libx264.a $(OBJS) $(OBJASM)
    ranlib libx264.a
 
-x264$(EXE): libx264.a x264.o matroska.o
-   $(CC) -o $@ x264.o matroska.o libx264.a $(LDFLAGS)
+x264$(EXE): $(SHARED_LIB_VER) x264.o matroska.o
+   $(CC) -o $@ x264.o matroska.o $(SHARED_LIB_VER) $(LDFLAGS)
+ 
+$(SHARED_LIB_VER): $(OBJS) libx264.a
+   $(CC) $(CFLAGS) -shared -Wl,-soname,$(SHARED_LIB_VER) -o $(SHARED_LIB_VER) $(OBJS) $(OBJASM) $(LDFLAGS)
 
 x264vfw.dll: libx264.a $(wildcard vfw/*.c vfw/*.h)
    make -C vfw/build/cygwin