2 |
use ExtUtils::MakeMaker; |
use ExtUtils::MakeMaker; |
3 |
# See lib/ExtUtils/MakeMaker.pm for details of how to influence |
# See lib/ExtUtils/MakeMaker.pm for details of how to influence |
4 |
# the contents of the Makefile that is written. |
# the contents of the Makefile that is written. |
5 |
|
|
6 |
|
my $M6502_OPTIONS = '-DEXEC6502 -DFAST_RDOP -DLSB_FIRST '; |
7 |
|
$M6502_OPTIONS .= '-DDEBUG '; |
8 |
|
|
9 |
WriteMakefile( |
WriteMakefile( |
10 |
NAME => 'M6502', |
NAME => 'M6502', |
11 |
VERSION_FROM => 'M6502.pm', # finds $VERSION |
VERSION_FROM => 'M6502.pm', # finds $VERSION |
15 |
'Data::Dump' => 0, |
'Data::Dump' => 0, |
16 |
'Carp' => 0, |
'Carp' => 0, |
17 |
'Test::Exception' => 0, |
'Test::Exception' => 0, |
18 |
|
'SDL' => '2.1.2', |
19 |
}, # e.g., Module::Name => 1.1 |
}, # e.g., Module::Name => 1.1 |
20 |
($] >= 5.005 ? ## Add these new keywords supported since 5.005 |
($] >= 5.005 ? ## Add these new keywords supported since 5.005 |
21 |
(ABSTRACT_FROM => 'M6502.pm', # retrieve abstract from module |
(ABSTRACT_FROM => 'M6502.pm', # retrieve abstract from module |
22 |
AUTHOR => 'Dobrica Pavlinusic <dpavlin@rot13.org>') : ()), |
AUTHOR => 'Dobrica Pavlinusic <dpavlin@rot13.org>') : ()), |
23 |
LIBS => [''], # e.g., '-lm' |
LIBS => [''], # e.g., '-lm' |
24 |
DEFINE => '-DEXEC6502 -DFAST_RDOP', # M6502 options |
DEFINE => '', |
25 |
INC => '-I.', # e.g., '-I. -I/usr/include/other' |
INC => '-I. -I./src/', # e.g., '-I. -I/usr/include/other' |
26 |
# Un-comment this if you add C files to link with later: |
# Un-comment this if you add C files to link with later: |
27 |
OBJECT => '$(O_FILES)', # link all the C files too |
OBJECT => '$(O_FILES) cpu.o', # link all the C files too |
28 |
OPTIMIZE => '-g', |
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' => 'cpu.o', |
35 |
|
# }, |
36 |
); |
); |
37 |
|
|
38 |
sub MY::postamble { |
sub MY::postamble { |
39 |
return <<'MAKE_FRAG'; |
return <<'MAKE_FRAG'; |
40 |
|
|
41 |
emulator: $(INST_ARCHAUTODIR)/$(NAME).$(SO) config.h perl.c |
run: |
42 |
$(CC) -o emulator perl.o $(INST_ARCHAUTODIR)/$(NAME).$(SO) `perl -MExtUtils::Embed -e ldopts` |
perl -Mblib -MArch -le 'print Orao->new->boot;' |
43 |
|
|
44 |
run: emulator |
gdb: |
45 |
#( ./emulator 2>&1 ) | tee log | head -50 |
gdb -x run --args perl t/10-orao.t |
|
./emulator |
|
46 |
|
|
47 |
html: all |
html: all |
48 |
test -d html || mkdir html |
test -d html || mkdir html |