root / ImageMagick / trunk / PerlMagick / Makefile.nt

Revision 11824, 5.7 kB (checked in by cristy, 3 weeks ago)
Line 
1# Copyright (C) 1999-2008 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#
33WriteMakefile(
34    'ABSTRACT'  => 'ImageMagick PERL Extension',
35    'AUTHOR'    => 'ImageMagick Studio',
36    'NAME'      => 'Image::Magick',
37    'VERSION_FROM' => 'Magick.pm', # finds $VERSION
38    'LIBS'      => ['-L..\VisualMagick\lib -L..\VisualMagick\bin -lCORE_RL_magick_.lib'],
39    'DEFINE'    => '-D_VISUALC_ -D_WINDOWS',     # e.g., '-DHAVE_SOMETHING'
40    'INC'       => '-I.. -I..\xlib\include',
41    'BINARY_LOCATION'  => 'x86/Image-Magick.tar.gz',
42    'dist' => {ZIP => "zip.exe", ZIPFLAGS=>"-r"},
43    'clean' => {FILES => "Image-Magick.ppd Image-Magick.tar.gz PerlMagick.zip " },
44    ($Config{'archname'} =~ /-object$/i ? ('CAPI' => 'TRUE') : ()),
45);
46
47#
48# Add a targets for building ActiveState ppm distribution modules
49# Dylan Beattie <dylan@zepler.org>, April 2002
50#
51# Requires tar, gzip, and zip.  This produces PerlMagick.zip
52# Get GNU tar and gzip from http://sourceware.cygnus.com/
53# Get Win32 command line PKZIP from http://www.pkware.com/
54# and rename PKZIP.EXE to ZIP.EXE and PKUNZIP.EXE to UNZIP.EXE
55# Make sure tar.exe, gzip.exe and zip.exe are in your system path
56#
57# 'nmake ppm' will include only the PerlMagick module
58# 'nmake ppm-full' also includes all ImageMagick DLLs and MGK files
59
60sub MY::postamble
61{
62        '
63Image-Magick.tar.gz: ppd pure_all #htmlifypods manifypods
64        if exist Image-Magick.tar.gz del Image-Magick.tar.gz
65        if exist Image-Magick.tar del Image-Magick.tar
66        $(TAR) $(TARFLAGS) Image-Magick.tar blib
67        $(COMPRESS) -q Image-Magick.tar
68
69release: Image-Magick.tar.gz
70
71ppm: ppd pure_all htmlifypods manifypods
72        if exist PerlMagick.zip del PerlMagick.zip
73        $(TAR) $(TARFLAGS) Image-Magick.tar blib
74        $(COMPRESS) -q Image-Magick.tar
75        if exist x86 del x86 /f /q
76        if exist x86 rd x86
77        md x86
78        copy Image-Magick.tar$(SUFFIX) x86
79        del Image-Magick.tar$(SUFFIX)
80        if exist ppm-readme.txt copy ppm-readme.txt readme
81        $(ZIP) $(ZIPFLAGS) PerlMagick.zip readme Image-Magick.ppd x86/Image-Magick.tar$(SUFFIX)
82        del x86\Image-Magick.tar$(SUFFIX)
83        rd x86
84
85ppm-full: ppd pure_all htmlifypods manifypods
86        if exist PerlMagick-full.zip del PerlMagick-full.zip
87        copy ..\VisualMagick\bin\*.dll blib\arch\auto\Image\Magick
88        copy ..\VisualMagick\bin\*.xml blib\arch\auto\Image\Magick
89        $(TAR) $(TARFLAGS) Image-Magick.tar blib
90        $(COMPRESS) -q Image-Magick.tar
91        if exist x86 del x86 /f /q
92        if exist x86 rd x86
93        md x86
94        copy Image-Magick.tar$(SUFFIX) x86
95        del Image-Magick.tar$(SUFFIX)
96        if exist ppm-readme.txt copy ppm-readme.txt readme
97        $(ZIP) $(ZIPFLAGS) PerlMagick-full.zip readme Image-Magick.ppd x86/Image-Magick.tar$(SUFFIX)
98        del x86\Image-Magick.tar$(SUFFIX)
99        rd x86
100        '
101}
102
103#
104# Modify the MakeMaker test fragment
105#
106sub MY::test
107{
108   #
109   # List any ImageMagick features derived from add-on libraries
110   # or programs you would like to test.
111   #
112   # Valid choices are:
113   #
114   #  Feature   Formats Tested          Prerequisites
115   #  =======   ======================  ======================================
116   #   bzlib    BZip compression        BZip library
117   #   cgm      CGM format              'ralcgm' program
118   #   hdf      HDF format              HDF library
119   #   jbig     JBIG format             JBIG library
120   #   jpeg     JPEG format             JPEG library
121   #   mpeg     MPEG format             'ffmpeg' program
122   #   png      PNG format              PNG and Zlib libraries
123   #   ps       Postscript format       'gs' program and/or DPS library
124   #   rad      Radiance format         'ra_ppm' program
125   #   tiff     TIFF format             TIFF library
126   #   ttf      TrueType font format    FreeType library
127   #   x        X11 support             X-windows libraries and server
128   #   xfig     Xfig format             'transfig' program
129   #   zlib     Zip compression         Zlib library
130   #
131   my @DELEGATES = qw/ bzlib cgm jbig jpeg mpeg png ps tiff wmf x xfig zlib/;
132
133   package MY; # so that "SUPER" works right
134   my $inherited = shift->SUPER::test(@_);
135   my $delegate_tests=
136    " t/setattribute.t" .
137    " t/getattribute.t" .
138    " t/filter.t" .
139    " t/read.t" .
140    " t/montage.t" .
141    " t/write.t" .
142    " t/hpgl/read.t" .
143    " t/jbig/read.t" .
144    " t/jbig/write.t" .
145    " t/jng/read.t" .
146    " t/jng/write.t" .
147    " t/jp2/read.t" .
148    " t/jpeg/read.t" .
149    " t/jpeg/write.t" .
150    " t/png/read.t" .
151    " t/png/write.t" .
152    " t/ps/read.t" .
153    " t/ps/write.t" .
154    " t/tiff/read.t" .
155    " t/tiff/write.t" .
156    " t/ttf/read.t" .
157    " t/wmf/read.t" .
158    " t/zlib/read.t" .
159    " t/zlib/write.t";
160   if ( defined $ENV{'DISPLAY'} ) {
161    $delegate_tests .= " t/x11/write.t t/x11/read.t";
162   }
163   $inherited =~ s:^TEST_FILES =.*:TEST_FILES = ${delegate_tests}:m;
164   $inherited;
165}
Note: See TracBrowser for help on using the browser.