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 |
|
6 |
my $M6502_OPTIONS = '-DEXEC6502 -DFAST_RDOP -DLSB_FIRST '; |
7 |
$M6502_OPTIONS .= '-DDEBUG '; |
8 |
|
9 |
my $run = './t/05-M6502.t -d'; |
10 |
|
11 |
WriteMakefile( |
12 |
NAME => 'M6502', |
13 |
VERSION_FROM => 'M6502.pm', # finds $VERSION |
14 |
PREREQ_PM => { |
15 |
'Class::Accessor' => 0, |
16 |
'Data::Dump' => 0, |
17 |
'Carp' => 0, |
18 |
'Test::Exception' => 0, |
19 |
}, # e.g., Module::Name => 1.1 |
20 |
($] >= 5.005 ? ## Add these new keywords supported since 5.005 |
21 |
(ABSTRACT_FROM => 'M6502.pm', # retrieve abstract from module |
22 |
AUTHOR => 'Dobrica Pavlinusic <dpavlin@rot13.org>') : ()), |
23 |
LIBS => [''], # e.g., '-lm' |
24 |
DEFINE => '', |
25 |
INC => '-I. -I./src/', # e.g., '-I. -I/usr/include/other' |
26 |
# Un-comment this if you add C files to link with later: |
27 |
OBJECT => '$(O_FILES) cpu.o', # link all the C files too |
28 |
OPTIMIZE => '-g', |
29 |
depend => { |
30 |
# M6502 options |
31 |
'cpu$(OBJ_EXT)' => qq{src/M6502.c\n\t\$(CC) \$(CCCDLFLAGS) -c -o cpu\$(OBJ_EXT) $M6502_OPTIONS src/M6502.c}, |
32 |
}, |
33 |
clean => { |
34 |
'FILES' => 'html', |
35 |
}, |
36 |
); |
37 |
|
38 |
sub MY::postamble { |
39 |
return <<"MAKE_FRAG"; |
40 |
|
41 |
run: all |
42 |
perl -Mblib -MOrao -le 'Orao->new->run;' |
43 |
|
44 |
gdb: all |
45 |
gdb -x run --args perl $run |
46 |
|
47 |
html: all |
48 |
test -d html || mkdir html |
49 |
allpod2xhtml.pl \$(INST_LIB) html |
50 |
|
51 |
MAKE_FRAG |
52 |
} |
53 |
|