blob: 67ce9269a15453e6b46c9aac40e3c9d056336a83 (
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
37
38
39
40
41
|
--- Makefile.orig Wed May 18 22:55:05 2005
+++ Makefile Wed May 18 22:56:31 2005
@@ -15,7 +15,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 \
@@ -40,19 +40,25 @@
OBJS = $(SRCS:%.c=%.o)
DEP = depend
-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
- $(CC) -o $@ x264.o libx264.a $(LDFLAGS)
+x264$(EXE): $(SHARED_LIB_VER) x264.o
+ $(CC) -o $@ x264.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
-checkasm: testing/checkasm.o libx264.a
+checkasm: testing/checkasm.o $(SHARED_LIB_VER)
$(CC) -o $@ $< libx264.a $(LDFLAGS)
%.o: %.asm
|