summaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
authorAzar@.(none) <Azar@.(none)>2008-02-01 18:45:59 -0800
committerBehdad Esfahbod <behdad@behdad.org>2008-02-06 21:45:24 -0500
commit95db215cc15d228fcb38bc43d2d918fccec0a9cd (patch)
tree6a9bc2002216a279331df421d0267e0e2dcac1e3 /perf
parent7800cfd7de347bb8c54fc36ed886018a2d9ec503 (diff)
Some fixes and improvements to the Win32 build
Diffstat (limited to 'perf')
-rw-r--r--perf/Makefile.win3254
-rw-r--r--perf/cairo-perf.c7
-rw-r--r--perf/cairo-perf.h2
-rw-r--r--perf/world-map.c2
4 files changed, 53 insertions, 12 deletions
diff --git a/perf/Makefile.win32 b/perf/Makefile.win32
index 8c3b70f5..f1c86fea 100644
--- a/perf/Makefile.win32
+++ b/perf/Makefile.win32
@@ -1,16 +1,58 @@
-CC = cl
-CFLAGS = /nologo /Zi /O2 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /I../src /I../pixman/src /I../boilerplate
-LDFLAGS = ../src/cairo.lib ../pixman/src/pixman.lib ../boilerplate/boiler.lib libpng.lib zlib.lib gdi32.lib msimg32.lib user32.lib
+#
+# Win32 makefile
+#
+
+
+SUBMAKEFILE = 1
+
+include ../Makefile.win32
+
+LDFLAGS += ../src/$(CFG)/cairo-static.lib $(PIXMAN_LIBS) ../boilerplate/$(CFG)/boiler.lib $(EXE_LDFLAGS)
PERF_SOURCES = \
+ box-outline.c \
cairo-perf-win32.c \
+ cairo-perf-cover.c \
cairo-perf.c \
+ cairo-stats.c \
+ fill.c \
+ long-dashed-lines.c \
+ long-lines.c \
+ mosaic.c \
paint.c \
+ paint-with-alpha.c \
+ pattern_create_radial.c \
+ rectangles.c \
+ stroke.c \
+ subimage_copy.c \
tessellate.c \
+ text.c \
+ unaligned-clip.c \
+ world-map.c \
+ zrusin.c \
+# extend-pad.c \
$(NULL)
-all: cairo-perf.exe
+OBJECTS = $(patsubst %.c, $(CFG)/%.obj, $(PERF_SOURCES))
+
+all: inform $(CFG)/cairo-perf.exe
+
+$(CFG)/cairo-perf.exe: $(OBJECTS)
+ @mkdir -p $(CFG)
+ @$(CC) $(CFLAGS) -Fe"$@" $^ -link $(LDFLAGS)
-cairo-perf.exe: $(PERF_SOURCES)
- $(CC) $(CFLAGS) /Fe"$@" $^ /link $(LDFLAGS)
+clean:
+ @rm -f $(CFG)/*.obj $(CFG)/*.exe $(CFG)/*.dll $(CFG)/*.lib $(CFG)/*.pdb $(CFG)/*.ilk || exit 0
+inform:
+ifneq ($(CFG),release)
+ifneq ($(CFG),debug)
+ @echo "Invalid configuration "$(CFG)" specified."
+ @echo -n "You must specify a configuration when "
+ @echo "running make, e.g. make CFG=debug"
+ @echo
+ @echo -n "Possible choices for configuration are "
+ @echo "'release' and 'debug'"
+ @exit 1
+endif
+endif
diff --git a/perf/cairo-perf.c b/perf/cairo-perf.c
index de88a87b..be5589f1 100644
--- a/perf/cairo-perf.c
+++ b/perf/cairo-perf.c
@@ -28,10 +28,7 @@
#include "cairo-perf.h"
-/* For getopt */
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include "cairo-boilerplate-getopt.h"
/* For basename */
#ifdef HAVE_LIBGEN_H
@@ -276,7 +273,7 @@ parse_options (cairo_perf_t *perf, int argc, char *argv[])
perf->num_names = 0;
while (1) {
- c = getopt (argc, argv, "i:lr");
+ c = _cairo_getopt (argc, argv, "i:lr");
if (c == -1)
break;
diff --git a/perf/cairo-perf.h b/perf/cairo-perf.h
index bb38b7f7..1ada06d5 100644
--- a/perf/cairo-perf.h
+++ b/perf/cairo-perf.h
@@ -90,7 +90,7 @@ cairo_perf_cover_sources_and_operators (cairo_perf_t *perf,
const char *name,
cairo_perf_func_t perf_func);
-#define CAIRO_PERF_DECL(func) void (func) (cairo_perf_t *perf, cairo_t *cr, int width, int height);
+#define CAIRO_PERF_DECL(func) void (func) (cairo_perf_t *perf, cairo_t *cr, int width, int height)
CAIRO_PERF_DECL (fill);
CAIRO_PERF_DECL (paint);
diff --git a/perf/world-map.c b/perf/world-map.c
index eef36198..fe6d42d5 100644
--- a/perf/world-map.c
+++ b/perf/world-map.c
@@ -26,7 +26,9 @@
#include "cairo-perf.h"
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
typedef enum {
WM_NEW_PATH,