aboutsummaryrefslogtreecommitdiff
path: root/Perl/Makefile.PL
diff options
context:
space:
mode:
authorlecoanet2003-10-05 15:27:44 +0000
committerlecoanet2003-10-05 15:27:44 +0000
commit562b76ee086a40b111111feeb894e679f9ee25be (patch)
treeaa05d6537fd042a8727ea613e11615fc42148c8d /Perl/Makefile.PL
parent472e8356c2baba2c03eba13a06ffaf5564102b09 (diff)
downloadtkzinc-562b76ee086a40b111111feeb894e679f9ee25be.zip
tkzinc-562b76ee086a40b111111feeb894e679f9ee25be.tar.gz
tkzinc-562b76ee086a40b111111feeb894e679f9ee25be.tar.bz2
tkzinc-562b76ee086a40b111111feeb894e679f9ee25be.tar.xz
No shape extension on Windows for now. Reformatting.
Diffstat (limited to 'Perl/Makefile.PL')
-rw-r--r--Perl/Makefile.PL50
1 files changed, 27 insertions, 23 deletions
diff --git a/Perl/Makefile.PL b/Perl/Makefile.PL
index 699b594..18fc3a5 100644
--- a/Perl/Makefile.PL
+++ b/Perl/Makefile.PL
@@ -23,6 +23,10 @@ if (!$TkLibDir)
print "Configuring version $VERSION for $platform platform...\n";
print "Using $TkLibDir as Tk library...\n";
+#
+# Humm! inclusion of Zinc.c here is needed to include Zinc.o in the link but it create
+# a circular dependancy in the generated Makefile. Another solution ?
+#
my @GENERIC_C = ('Track.c', 'Tabular.c', 'Reticle.c', 'Map.c', 'Rectangle.c', 'Arc.c', 'Curve.c',
'Item.c', 'PostScript.c', 'MapInfo.c', 'Attrs.c', 'Draw.c', 'Geo.c', 'List.c',
'perfos.c', 'Transfo.c', 'Group.c', 'Icon.c', 'Text.c', 'Image.c', 'Color.c',
@@ -37,10 +41,11 @@ my @WIN_C = ('WinPort.c');
my @C;
+my $WIN = ($platform =~ /win/i);
+
push @C, @LIBTESS_C, @GENERIC_C ;
-if ($platform =~ /win/i)
-{
+if ($WIN) {
push @C, @WIN_C;
}
@@ -62,49 +67,44 @@ WriteMakefile(
'LDFROM' => '$(O_FILES)',
);
-sub get_flags
-{
+sub get_flags {
my %DEF_FLAGS = ('GL' => 1,
'SHAPE' => 1,
'GL_DAMAGE' => 1,
'OM' => 1
);
- foreach my $arg (@ARGV)
- {
+ foreach my $arg (@ARGV) {
print "$arg ....\n";
my ($name, $value) = split(/[=]+/, $arg);
- if ($name =~ /(with-gl)/i)
- {
- if ($value =~ /no/i)
- {
+ if ($name =~ /(with-gl)/i) {
+ if ($value =~ /no/i) {
$DEF_FLAGS{'GL'} = 0;
$DEF_FLAGS{'GL_DAMAGE'} = 0;
}
}
- elsif ($name =~ /(with-om)/i)
- {
- if ($value =~ /no/i)
- {
+ elsif ($name =~ /(with-om)/i) {
+ if ($value =~ /no/i) {
$DEF_FLAGS{'OM'} = 0;
}
}
- elsif ($name =~ /(with-shape)/i)
- {
- if ($value =~ /no/i)
- {
+ elsif ($name =~ /(with-shape)/i) {
+ if ($value =~ /no/i) {
$DEF_FLAGS{'SHAPE'} = 0;
}
}
}
+ #
+ # No shape extension on Windows (planned later).
+ if ($WIN) {
+ $DEF_FLAGS{'SHAPE'} = 0;
+ }
my $defines = '-DPTK';
print "Configuring with:\n ";
- foreach my $flag (keys %DEF_FLAGS)
- {
- print "$flag=$DEF_FLAGS{$flag} ";
- if ($DEF_FLAGS{$flag})
- {
+ foreach my $flag (keys %DEF_FLAGS) {
+ print "$flag=", $DEF_FLAGS{$flag} ? 'ok' : 'no', " ";
+ if ($DEF_FLAGS{$flag}) {
$defines = $defines . " " . "-D$flag";
if ($flag eq 'OM') {
push @C, @OM_C
@@ -115,3 +115,7 @@ sub get_flags
return $defines;
}
+#
+# For the demo
+#
+# perl -Mblib demos/zinc-demos