1 # Copyright (C) 1999-2011 ImageMagick Studio LLC
3 # This program is covered by multiple licenses, which are described in
4 # LICENSE. You should have received a copy of LICENSE with this
5 # package; otherwise see http://www.imagemagick.org/script/license.php.
7 # Makefile for building PerlMagick under Windows
11 use ExtUtils::MakeMaker;
13 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
14 # the contents of the Makefile that is written.
16 # NOTE: The current ActiveState binary distribution does not completely setup
17 # the values in C:/Perl/lib/Config.pm. You must manually modify the values of
18 # libpth to add the VisualC++ library path. It should look similar to one of
19 # the following examples in order to work properly.
22 # libpth='"C:\Perl\lib\CORE" "D:\DevStudio\VC98\lib"'
24 # Visual Studio 6.0 default install:
25 # libpth='"C:\Program Files\Microsoft Visual Studio\VC98\lib" "C:\Perl\lib\CORE"'
27 # Visual Studio 7.0 default install:
28 # libpth='"C:\Program Files\Microsoft Visual Studio .NET\vc7\lib" "C:\Perl\lib\CORE"'
30 # Visual Studio 7.1 default install:
31 # libpth='"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib" "C:\Perl\lib\CORE"'
33 # Visual Studio 9.0 default install (C:\Perl\lib\Config.pm):
34 # libpth='"C:\Program Files\Microsoft Visual Studio 9.0\VC\lib" "C:\Perl\lib\CORE"'
37 'ABSTRACT' => 'ImageMagick PERL Extension',
38 'AUTHOR' => 'ImageMagick Studio',
39 'NAME' => 'Image::Magick',
40 'VERSION_FROM' => 'Magick.pm', # finds $VERSION
41 'LIBS' => ['-L..\VisualMagick\lib -L..\VisualMagick\bin -lCORE_RL_magick_.lib -lCORE_DB_magick_.lib'],
42 'DEFINE' => '-D_VISUALC_ -D_WINDOWS', # e.g., '-DHAVE_SOMETHING'
43 'INC' => '-I.. -I..\xlib\include',
44 'BINARY_LOCATION' => 'x86/Image-Magick.tar.gz',
45 'dist' => {ZIP => "zip.exe", ZIPFLAGS=>"-r"},
46 'clean' => {FILES => "Image-Magick.ppd Image-Magick.tar.gz PerlMagick.zip " },
47 ($Config{'archname'} =~ /-object$/i ? ('CAPI' => 'TRUE') : ()),
51 # Add a targets for building ActiveState ppm distribution modules
52 # Dylan Beattie <dylan@zepler.org>, April 2002
54 # Requires tar, gzip, and zip. This produces PerlMagick.zip
55 # Get GNU tar and gzip from http://sourceware.cygnus.com/
56 # Get Win32 command line PKZIP from http://www.pkware.com/
57 # and rename PKZIP.EXE to ZIP.EXE and PKUNZIP.EXE to UNZIP.EXE
58 # Make sure tar.exe, gzip.exe and zip.exe are in your system path
60 # 'nmake ppm' will include only the PerlMagick module
61 # 'nmake ppm-full' also includes all ImageMagick DLLs and MGK files
66 Image-Magick.tar.gz: ppd pure_all #htmlifypods manifypods
67 if exist Image-Magick.tar.gz del Image-Magick.tar.gz
68 if exist Image-Magick.tar del Image-Magick.tar
69 $(TAR) $(TARFLAGS) Image-Magick.tar blib
70 $(COMPRESS) -q Image-Magick.tar
72 release: Image-Magick.tar.gz
74 ppm: ppd pure_all htmlifypods manifypods
75 if exist PerlMagick.zip del PerlMagick.zip
76 $(TAR) $(TARFLAGS) Image-Magick.tar blib
77 $(COMPRESS) -q Image-Magick.tar
78 if exist x86 del x86 /f /q
81 copy Image-Magick.tar$(SUFFIX) x86
82 del Image-Magick.tar$(SUFFIX)
83 if exist ppm-readme.txt copy ppm-readme.txt readme
84 $(ZIP) $(ZIPFLAGS) PerlMagick.zip readme Image-Magick.ppd x86/Image-Magick.tar$(SUFFIX)
85 del x86\Image-Magick.tar$(SUFFIX)
88 ppm-full: ppd pure_all htmlifypods manifypods
89 if exist PerlMagick-full.zip del PerlMagick-full.zip
90 copy ..\VisualMagick\bin\*.dll blib\arch\auto\Image\Magick
91 copy ..\VisualMagick\bin\*.xml blib\arch\auto\Image\Magick
92 $(TAR) $(TARFLAGS) Image-Magick.tar blib
93 $(COMPRESS) -q Image-Magick.tar
94 if exist x86 del x86 /f /q
97 copy Image-Magick.tar$(SUFFIX) x86
98 del Image-Magick.tar$(SUFFIX)
99 if exist ppm-readme.txt copy ppm-readme.txt readme
100 $(ZIP) $(ZIPFLAGS) PerlMagick-full.zip readme Image-Magick.ppd x86/Image-Magick.tar$(SUFFIX)
101 del x86\Image-Magick.tar$(SUFFIX)
107 # Modify the MakeMaker test fragment
112 # List any ImageMagick features derived from add-on libraries
113 # or programs you would like to test.
117 # Feature Formats Tested Prerequisites
118 # ======= ====================== ======================================
119 # bzlib BZip compression BZip library
120 # cgm CGM format 'ralcgm' program
121 # hdf HDF format HDF library
122 # jbig JBIG format JBIG library
123 # jpeg JPEG format JPEG library
124 # mpeg MPEG format 'ffmpeg' program
125 # png PNG format PNG and Zlib libraries
126 # ps Postscript format 'gs' program and/or DPS library
127 # rad Radiance format 'ra_ppm' program
128 # tiff TIFF format TIFF library
129 # ttf TrueType font format FreeType library
130 # x X11 support X-windows libraries and server
131 # xfig Xfig format 'transfig' program
132 # zlib Zip compression Zlib library
134 my @DELEGATES = qw/ bzlib cgm jbig jpeg mpeg png ps tiff wmf x xfig zlib/;
136 package MY; # so that "SUPER" works right
137 my $inherited = shift->SUPER::test(@_);
139 " t/setattribute.t" .
140 " t/getattribute.t" .
164 if ( defined $ENV{'DISPLAY'} ) {
165 $delegate_tests .= " t/x11/write.t t/x11/read.t";
167 $inherited =~ s:^TEST_FILES =.*:TEST_FILES = ${delegate_tests}:m;