--- M6502/Makefile.PL 2007/07/31 17:26:43 69 +++ M6502/Makefile.PL 2007/08/02 12:01:09 89 @@ -2,6 +2,12 @@ use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. + +my $M6502_OPTIONS = '-DEXEC6502 -DFAST_RDOP -DLSB_FIRST '; +$M6502_OPTIONS .= '-DDEBUG '; + +my $run = './t/05-M6502.t -d'; + WriteMakefile( NAME => 'M6502', VERSION_FROM => 'M6502.pm', # finds $VERSION @@ -11,31 +17,38 @@ 'Data::Dump' => 0, 'Carp' => 0, 'Test::Exception' => 0, + 'SDL' => '2.1.2', }, # e.g., Module::Name => 1.1 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'M6502.pm', # retrieve abstract from module AUTHOR => 'Dobrica Pavlinusic ') : ()), - LIBS => [''], # e.g., '-lm' - DEFINE => '-DEXEC6502 -DFAST_RDOP -DLSB_FIRST', # M6502 options - INC => '-I.', # e.g., '-I. -I/usr/include/other' + LIBS => ['-lSDL_Perl'], # e.g., '-lm' + DEFINE => '', + INC => '-I. -I./src/', # e.g., '-I. -I/usr/include/other' # Un-comment this if you add C files to link with later: - OBJECT => '$(O_FILES)', # link all the C files too + OBJECT => '$(O_FILES) cpu.o', # link all the C files too OPTIMIZE => '-g', + depend => { + # M6502 options + 'cpu$(OBJ_EXT)' => qq{src/M6502.c\n\t\$(CC) \$(CCCDLFLAGS) -c -o cpu\$(OBJ_EXT) $M6502_OPTIONS src/M6502.c}, + }, + clean => { + 'FILES' => 'html', + }, ); sub MY::postamble { - return <<'MAKE_FRAG'; + return <<"MAKE_FRAG"; -emulator: $(INST_ARCHAUTODIR)/$(NAME).$(SO) config.h perl.c - $(CC) -o emulator perl.o $(INST_ARCHAUTODIR)/$(NAME).$(SO) `perl -MExtUtils::Embed -e ldopts` +run: all + perl -Mblib -MOrao -le 'print Orao->new->boot;' -run: emulator - #( ./emulator 2>&1 ) | tee log | head -50 - ./emulator +gdb: all + gdb -x run --args perl $run html: all test -d html || mkdir html - allpod2xhtml.pl $(INST_LIB) html + allpod2xhtml.pl \$(INST_LIB) html MAKE_FRAG }