Commit | Line | Data |
a8a597b2 |
1 | use ExtUtils::MakeMaker; |
2 | use Config; |
3 | |
4 | my $e = $Config{'exe_ext'}; |
5 | my $o = $Config{'obj_ext'}; |
6 | my $exeout_flag = '-o '; |
7 | if ($^O eq 'MSWin32') { |
8 | if ($Config{'cc'} =~ /^cl/i) { |
9 | $exeout_flag = '-Fe'; |
10 | } |
11 | elsif ($Config{'cc'} =~ /^bcc/i) { |
12 | $exeout_flag = '-e'; |
13 | } |
14 | } |
15 | |
16 | WriteMakefile( |
17 | NAME => "B", |
18 | VERSION => "a5", |
a8a597b2 |
19 | clean => { |
d613ef02 |
20 | FILES => "perl$e byteperl$e *$o B.c *~" |
a8a597b2 |
21 | } |
22 | ); |
23 | |
24 | sub MY::post_constants { |
25 | "\nLIBS = $Config{libs}\n" |
26 | } |
27 | |
a8581515 |
28 | # Leave out doing byteperl for now. Probably should be built in the |
29 | # core directory or somewhere else rather than here |
30 | #sub MY::top_targets { |
31 | # my $self = shift; |
32 | # my $targets = $self->MM::top_targets(); |
33 | # $targets =~ s/^(all ::.*)$/$1 byteperl$e/m; |
34 | # return <<"EOT" . $targets; |
35 | |
a8a597b2 |
36 | # |
37 | # byteperl is *not* a standard perl+XSUB executable. It's a special |
38 | # program for running standalone bytecode executables. It isn't an XSUB |
39 | # at the moment because a standlone Perl program needs to set up curpad |
40 | # which is overwritten on exit from an XSUB. |
41 | # |
a8581515 |
42 | #byteperl$e : byteperl$o B$o \$(PERL_SRC)/byterun$o |
43 | # \$(CC) ${exeout_flag}byteperl$e byteperl$o B$o byterun$o \$(LDFLAGS) \$(PERL_ARCHLIB)/CORE/$Config{libperl} \$(LIBS) |
44 | #EOT |
45 | #} |