diff options
author | Vladimir Vukicevic <vladimir@pobox.com> | 2008-08-05 12:57:51 -0700 |
---|---|---|
committer | Vladimir Vukicevic <vladimir@sleet.vlad1.com> | 2008-08-05 12:57:51 -0700 |
commit | 924a242f89ab1d86750512c8e4ee367c270ee07a (patch) | |
tree | 720fd7ffbdbd2d01cd9e91369fd2033a04a0bd7a | |
parent | e1132d434e329c625667f6aff30634522108241e (diff) |
[win32] Update win32 build, remove gcc dependency
-rw-r--r-- | Makefile.win32 | 13 | ||||
-rw-r--r-- | src/Makefile.win32 | 20 | ||||
-rw-r--r-- | src/cairo-features-win32.h | 40 |
3 files changed, 54 insertions, 19 deletions
diff --git a/Makefile.win32 b/Makefile.win32 index 4349cd88..d19c2aa5 100644 --- a/Makefile.win32 +++ b/Makefile.win32 @@ -26,7 +26,7 @@ DEFAULT_CFLAGS += -DCAIRO_NO_MUTEX=1 -DLIBCAIRO_EXPORTS CFLAGS := $(DEFAULT_CFLAGS) CAIRO_VERSION_MAJOR = 1 -CAIRO_VERSION_MINOR = 5 +CAIRO_VERSION_MINOR = 7 CAIRO_VERSION_MICRO = 1 CAIRO_VERSION = $(CAIRO_VERSION_MAJOR).$(CAIRO_VERSION_MINOR).$(CAIRO_VERSION_MICRO) @@ -40,16 +40,23 @@ TEST_SUBDIRS = boilerplate test all: inform cairo +src/cairo-features.h: + @echo Warning: creating default cairo-features.h + @(cat src/cairo-features-win32.h | \ + sed 's,@CAIRO_VERSION_MAJOR@,'$(CAIRO_VERSION_MAJOR)',g' | \ + sed 's,@CAIRO_VERSION_MINOR@,'$(CAIRO_VERSION_MINOR)',g' | \ + sed 's,@CAIRO_VERSION_MICRO@,'$(CAIRO_VERSION_MICRO)',g' > src/cairo-features.h) + cairo: src/cairo-features.h @list='$(SUBDIRS)'; for f in $$list ; do \ echo making all in $$f... ; \ - (cd $$f ; $(MAKE) -f Makefile.win32 CC="$(CC)" LINK="$(LINK)" OPT="$(OPT)" CFLAGS="$(CFLAGS)" PIXMAN_LIBS="$(PIXMAN_LIBS)") || exit 1 ; \ + ($(MAKE) -C $$f -f Makefile.win32) || exit 1 ; \ done test: cairo @list='$(TEST_SUBDIRS)'; for f in $$list ; do \ echo making all in $$f... ; \ - (cd $$f ; $(MAKE) -f Makefile.win32 CC="$(CC)" LINK="$(LINK)" OPT="$(OPT)" CFLAGS="$(CFLAGS)" PIXMAN_LIBS="$(PIXMAN_LIBS)") || exit 1 ; \ + ($(MAKE) -C $$f -f Makefile.win32) || exit 1 ; \ done @(cd test ; make -f Makefile.win32 test) diff --git a/src/Makefile.win32 b/src/Makefile.win32 index 3a5b916d..5c14add7 100644 --- a/src/Makefile.win32 +++ b/src/Makefile.win32 @@ -3,7 +3,6 @@ SUBMAKEFILE = 1 include ../Makefile.win32 -DEFFILE = cairo.def srcdir = `pwd` SOURCES = \ @@ -55,12 +54,13 @@ SOURCES = \ cairo-truetype-subset.c \ cairo-type1-fallback.c \ cairo-unicode.c \ + cairo-user-font.c \ + cairo-type3-glyph-surface.c \ cairo-wideint.c \ cairo-win32-font.c \ cairo.c \ cairo-svg-surface.c \ cairo-ps-surface.c \ - cairo-pdf-surface.c \ cairo-scaled-font-subsets.c \ cairo-paginated-surface.c \ cairo-analysis-surface.c \ @@ -91,20 +91,8 @@ all: inform $(CFG)/cairo.dll $(CFG)/cairo-static.lib static: inform $(CFG)/cairo-static.lib dynamic: inform $(CFG)/cairo.dll -$(DEFFILE): - (echo EXPORTS; \ - (cd $(srcdir); cat $(cairo_headers) || echo 'cairo_ERROR ()' ) | \ - grep -v -E '^# *include' | \ - ( gcc -include cairo-features.h -E - || echo 'cairo_ERROR ()' ) | \ - grep -E '^_?cairo_.* \(' | \ - sed -e 's/[ ].*//' | \ - sort; \ - echo LIBRARY cairo.dll; \ - ) >$@ - @ ! grep -q cairo_ERROR $@ || ($(RM) $@; false) - -$(CFG)/cairo.dll: $(OBJECTS) $(SHARED_OBJECTS) $(DEFFILE) - $(CC) -MD -LD -Fe$@ $(PIXMAN_LIBS) $(OBJECTS) $(SHARED_OBJECTS) -link -DEF:$(DEFFILE) user32.lib gdi32.lib libpng.lib zdll.lib msimg32.lib +$(CFG)/cairo.dll: $(OBJECTS) $(SHARED_OBJECTS) + $(CC) -MD -LD -Fe$@ $(PIXMAN_LIBS) $(OBJECTS) $(SHARED_OBJECTS) -link user32.lib gdi32.lib libpng.lib zdll.lib msimg32.lib $(CFG)/cairo-static.lib: $(OBJECTS) $(STATIC_OBJECTS) lib -NOLOGO -OUT:$@ $(PIXMAN_LIBS) $(OBJECTS) $(STATIC_OBJECTS) diff --git a/src/cairo-features-win32.h b/src/cairo-features-win32.h new file mode 100644 index 00000000..21f99703 --- /dev/null +++ b/src/cairo-features-win32.h @@ -0,0 +1,40 @@ +#ifndef CAIRO_FEATURES_H +#define CAIRO_FEATURES_H + +#if defined(__cplusplus) +# define CAIRO_BEGIN_DECLS extern "C" { +# define CAIRO_END_DECLS } +#else +# define CAIRO_BEGIN_DECLS +# define CAIRO_END_DECLS +#endif + +#ifndef cairo_public + #ifdef LIBCAIRO_EXPORTS + #define cairo_public __declspec(dllexport) + #else + #define cairo_public __declspec(dllimport) + #endif +#endif + +#define CAIRO_VERSION_MAJOR @CAIRO_VERSION_MAJOR@ +#define CAIRO_VERSION_MINOR @CAIRO_VERSION_MINOR@ +#define CAIRO_VERSION_MICRO @CAIRO_VERSION_MICRO@ + +#define CAIRO_VERSION_STRING "@CAIRO_VERSION_MAJOR@.@CAIRO_VERSION_MINOR@.@CAIRO_VERSION_MICRO@" + +#define HAVE_WINDOWS_H 1 + +#define CAIRO_HAS_SVG_SURFACE 1 +#define CAIRO_HAS_PDF_SURFACE 1 +#define CAIRO_HAS_PS_SURFACE 1 +#define CAIRO_HAS_WIN32_SURFACE 1 +#define CAIRO_HAS_WIN32_FONT 1 +#define CAIRO_HAS_PNG_FUNCTIONS 1 + +#define PACKAGE_NAME "cairo" +#define PACKAGE_TARNAME "cairo" +#define PACKAGE_STRING "cairo @CAIRO_VERSION_MAJOR@.@CAIRO_VERSION_MINOR@.@CAIRO_VERSION_MICRO@" + +#endif + |