1 |
use 5.008; |
2 |
use ExtUtils::MakeMaker; |
3 |
# See lib/ExtUtils/MakeMaker.pm for details of how to influence |
4 |
# the contents of the Makefile that is written. |
5 |
WriteMakefile( |
6 |
NAME => 'M6502', |
7 |
VERSION_FROM => 'M6502.pm', # finds $VERSION |
8 |
PREREQ_PM => { |
9 |
'ExtUtils::Embed' => 0, |
10 |
'Class::Accessor' => 0, |
11 |
'Data::Dump' => 0, |
12 |
'Carp' => 0, |
13 |
}, # e.g., Module::Name => 1.1 |
14 |
($] >= 5.005 ? ## Add these new keywords supported since 5.005 |
15 |
(ABSTRACT_FROM => 'M6502.pm', # retrieve abstract from module |
16 |
AUTHOR => 'Dobrica Pavlinusic <dpavlin@rot13.org>') : ()), |
17 |
LIBS => [''], # e.g., '-lm' |
18 |
DEFINE => '', # e.g., '-DHAVE_SOMETHING' |
19 |
INC => '-I.', # e.g., '-I. -I/usr/include/other' |
20 |
# Un-comment this if you add C files to link with later: |
21 |
OBJECT => '$(O_FILES)', # link all the C files too |
22 |
OPTIMIZE => '-g', |
23 |
); |
24 |
|
25 |
sub MY::postamble { |
26 |
return <<'MAKE_FRAG'; |
27 |
|
28 |
emulator: $(INST_ARCHAUTODIR)/$(NAME).$(SO) config.h perl.o |
29 |
$(CC) -o emulator perl.o $(INST_ARCHAUTODIR)/$(NAME).$(SO) `perl -MExtUtils::Embed -e ldopts` |
30 |
|
31 |
run: emulator |
32 |
( ./emulator 2>&1 ) | tee log | head -50 |
33 |
|
34 |
MAKE_FRAG |
35 |
} |
36 |
|