]> git.sesse.net Git - x264/blobdiff - Makefile
Fix speed regression in r951
[x264] / Makefile
index aedb1bee4f2697e9b8bcb3ebab7abd2b02e33a7b..607d1c71926ab8060303185f72c0719519185be2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,10 +7,10 @@ all: default
 SRCS = common/mc.c common/predict.c common/pixel.c common/macroblock.c \
        common/frame.c common/dct.c common/cpu.c common/cabac.c \
        common/common.c common/mdate.c common/set.c \
-       common/quant.c \
+       common/quant.c common/vlc.c \
        encoder/analyse.c encoder/me.c encoder/ratecontrol.c \
        encoder/set.c encoder/macroblock.c encoder/cabac.c \
-       encoder/cavlc.c encoder/encoder.c encoder/eval.c
+       encoder/cavlc.c encoder/encoder.c
 
 SRCCLI = x264.c matroska.c muxers.c
 
@@ -21,26 +21,28 @@ endif
 
 # MMX/SSE optims
 ifneq ($(AS),)
-X86SRC0 = dct-a.asm deblock-a.asm mc-a.asm mc-a2.asm \
+X86SRC0 = cabac-a.asm dct-a.asm deblock-a.asm mc-a.asm mc-a2.asm \
           pixel-a.asm predict-a.asm quant-a.asm sad-a.asm \
           cpu-32.asm dct-32.asm
 X86SRC = $(X86SRC0:%=common/x86/%)
 
 ifeq ($(ARCH),X86)
-SRCS   += common/x86/mc-c.c common/x86/predict-c.c
-ASMSRC  = $(X86SRC) common/x86/pixel-32.asm
-OBJASM  = $(ASMSRC:%.asm=%.o)
-ASFLAGS += -Icommon/x86/
-$(OBJASM): common/x86/x86inc.asm common/x86/x86inc-32.asm
-checkasm: tools/checkasm-32.o
+ARCH_X86 = yes
+ASMSRC   = $(X86SRC) common/x86/pixel-32.asm
 endif
 
 ifeq ($(ARCH),X86_64)
+ARCH_X86 = yes
+ASMSRC   = $(X86SRC:-32.asm=-64.asm)
+ASFLAGS += -DARCH_X86_64
+endif
+
+ifdef ARCH_X86
+ASFLAGS += -Icommon/x86/
 SRCS   += common/x86/mc-c.c common/x86/predict-c.c
-ASMSRC  = $(X86SRC:-32.asm=-64.asm)
 OBJASM  = $(ASMSRC:%.asm=%.o)
-ASFLAGS += -Icommon/x86/ -DARCH_X86_64
-$(OBJASM): common/x86/x86inc.asm common/x86/x86inc-64.asm
+$(OBJASM): common/x86/x86inc.asm common/x86/x86util.asm
+checkasm: tools/checkasm-a.o
 endif
 endif
 
@@ -76,7 +78,7 @@ libx264.a: .depend $(OBJS) $(OBJASM)
        ranlib libx264.a
 
 $(SONAME): .depend $(OBJS) $(OBJASM)
-       $(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS)
+       $(CC) -shared -o $@ $(OBJS) $(OBJASM) $(SOFLAGS) $(LDFLAGS)
 
 x264$(EXE): $(OBJCLI) libx264.a 
        $(CC) -o $@ $+ $(LDFLAGS)
@@ -148,16 +150,21 @@ distclean: clean
        rm -rf test/
        $(MAKE) -C gtk distclean
 
-install: x264 $(SONAME)
+install: x264$(EXE) $(SONAME)
        install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
        install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
        install -m 644 x264.h $(DESTDIR)$(includedir)
        install -m 644 libx264.a $(DESTDIR)$(libdir)
        install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
-       install x264 $(DESTDIR)$(bindir)
+       install x264$(EXE) $(DESTDIR)$(bindir)
        ranlib $(DESTDIR)$(libdir)/libx264.a
-       $(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so)
+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))
 
 install-gtk: libx264gtk.a
        $(MAKE) -C gtk install
@@ -165,7 +172,7 @@ install-gtk: libx264gtk.a
 uninstall:
        rm -f $(DESTDIR)$(includedir)/x264.h $(DESTDIR)$(libdir)/libx264.a
        rm -f $(DESTDIR)$(bindir)/x264 $(DESTDIR)$(libdir)/pkgconfig/x264.pc
-       $(if $(SONAME), rm -f $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.so)
+       $(if $(SONAME), rm -f $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX))
        $(MAKE) -C gtk uninstall
 
 etags: TAGS