[cairo] MMX Makefiles for CAIRO

Frédéric Plourde frederic.plourde at polymtl.ca
Tue Feb 26 12:51:25 PST 2008


Here is the CAIRO patch to apply along pixman_MMX_win32_makefile.patch 
on order to link cairo using MMX.
-fred-


diff --git a/Makefile.win32 b/Makefile.win32
index 4349cd8..0e5cf01 100644
--- a/Makefile.win32
+++ b/Makefile.win32
@@ -5,6 +5,14 @@
 CC := cl
 LINK := link
 
+ifeq ($(CFG),)
+CFG=release
+endif
+
+ifeq ($(MMX),)
+MMX=0
+endif
+
 ifeq ($(CFG),debug)
 OPT := -Od -Zi
 else
@@ -14,6 +22,10 @@ endif
 PIXMAN_CFLAGS := -I../../pixman/pixman
 PIXMAN_LIBS := ../../pixman/pixman/$(CFG)/pixman-1.lib
 
+ifeq ($(MMX),1)
+PIXMAN_LIBS += ../../pixman/pixman/$(CFG)/pixman-mmx.lib
+endif
+
 EXE_LDFLAGS = libpng.lib zlib.lib gdi32.lib msimg32.lib user32.lib
 
 DEFAULT_CFLAGS = -MD -nologo $(OPT)
diff --git a/src/Makefile.win32 b/src/Makefile.win32
index 3a5b916..8168232 100644
--- a/src/Makefile.win32
+++ b/src/Makefile.win32
@@ -87,9 +87,10 @@ OBJECTS = $(patsubst %.c, $(CFG)/%.obj, $(SOURCES))
 SHARED_OBJECTS = $(patsubst %.c, $(CFG)/%.obj, $(STATIC_SOURCES))
 STATIC_OBJECTS = $(patsubst %.c, $(CFG)/%-static.obj, $(STATIC_SOURCES))
 
-all: inform $(CFG)/cairo.dll $(CFG)/cairo-static.lib
-static: inform $(CFG)/cairo-static.lib
-dynamic: inform $(CFG)/cairo.dll
+all: informMMX inform $(CFG)/cairo.dll $(CFG)/cairo-static.lib
+static: inform informMMX $(CFG)/cairo-static.lib
+dynamic: inform informMMX $(CFG)/cairo.dll
+clean: inform clean_r
 
 $(DEFFILE):
     (echo EXPORTS; \
@@ -109,7 +110,7 @@ $(CFG)/cairo.dll: $(OBJECTS) $(SHARED_OBJECTS) 
$(DEFFILE)
 $(CFG)/cairo-static.lib: $(OBJECTS) $(STATIC_OBJECTS)
     lib -NOLOGO -OUT:$@ $(PIXMAN_LIBS) $(OBJECTS) $(STATIC_OBJECTS)
 
-clean:
+clean_r:
     @rm -f $(CFG)/*.obj $(CFG)/*.dll $(CFG)/*.lib $(CFG)/*.pdb 
$(CFG)/*.ilk || exit 0
 
 inform:
@@ -124,3 +125,14 @@ ifneq ($(CFG),debug)
     @exit 1
 endif
 endif
+
+informMMX:
+ifneq ($(MMX),0)
+ifneq ($(MMX),1)
+    @echo "Invalid specified MMX option : "$(MMX)"."
+    @echo
+    @echo -n "Possible choices for MMX are 0 or 1"
+    @echo ""
+    @exit 1
+endif
+endif

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cairo_MMX_win32_makefile.patch
Url: http://lists.cairographics.org/archives/cairo/attachments/20080226/9061ca79/attachment.txt 


More information about the cairo mailing list