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