1# Copyright (C) 1999-2016 ImageMagick Studio LLC 2# 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. 6# 7# Makefile for building PerlMagick under Windows 8# 9# 10# 11use ExtUtils::MakeMaker; 12use Config; 13# See lib/ExtUtils/MakeMaker.pm for details of how to influence 14# the contents of the Makefile that is written. 15# 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. 20# 21# Random developer 22# libpth='"C:\Perl\lib\CORE" "D:\DevStudio\VC98\lib"' 23# 24# Visual Studio 6.0 default install: 25# libpth='"C:\Program Files\Microsoft Visual Studio\VC98\lib" "C:\Perl\lib\CORE"' 26# 27# Visual Studio 7.0 default install: 28# libpth='"C:\Program Files\Microsoft Visual Studio .NET\vc7\lib" "C:\Perl\lib\CORE"' 29# 30# Visual Studio 7.1 default install: 31# libpth='"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib" "C:\Perl\lib\CORE"' 32# 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"' 35# 36WriteMakefile( 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_MagickCore_.lib -lCORE_DB_MagickCore_.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') : ()), 48); 49 50# 51# Add a targets for building ActiveState ppm distribution modules 52# Dylan Beattie <dylan@zepler.org>, April 2002 53# 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 59# 60# 'nmake ppm' will include only the PerlMagick module 61# 'nmake ppm-full' also includes all ImageMagick DLLs and MGK files 62 63sub MY::postamble 64{ 65 ' 66Image-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 71 72release: Image-Magick.tar.gz 73 74ppm: 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 79 if exist x86 rd x86 80 md x86 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) 86 rd x86 87 88ppm-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 95 if exist x86 rd x86 96 md x86 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) 102 rd x86 103 ' 104} 105 106# 107# Modify the MakeMaker test fragment 108# 109sub MY::test 110{ 111 # 112 # List any ImageMagick features derived from add-on libraries 113 # or programs you would like to test. 114 # 115 # Valid choices are: 116 # 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 133 # 134 my @DELEGATES = qw/ bzlib cgm jbig jpeg mpeg png ps tiff wmf x xfig zlib/; 135 136 package MY; # so that "SUPER" works right 137 my $inherited = shift->SUPER::test(@_); 138 my $delegate_tests= 139 " t/setattribute.t" . 140 " t/getattribute.t" . 141 " t/filter.t" . 142 " t/read.t" . 143 " t/ping.t" . 144 " t/montage.t" . 145 " t/write.t" . 146 " t/hpgl/read.t" . 147 " t/jbig/read.t" . 148 " t/jbig/write.t" . 149 " t/jng/read.t" . 150 " t/jng/write.t" . 151 " t/openjp2/read.t" . 152 " t/jpeg/read.t" . 153 " t/jpeg/write.t" . 154 " t/png/read.t" . 155 " t/png/write.t" . 156 " t/ps/read.t" . 157 " t/ps/write.t" . 158 " t/tiff/read.t" . 159 " t/tiff/write.t" . 160 " t/ttf/read.t" . 161 " t/wmf/read.t" . 162 " t/zlib/read.t" . 163 " t/zlib/write.t"; 164 if ( defined $ENV{'DISPLAY'} ) { 165 $delegate_tests .= " t/x11/write.t t/x11/read.t"; 166 } 167 $inherited =~ s:^TEST_FILES =.*:TEST_FILES = ${delegate_tests}:m; 168 $inherited; 169} 170