--- M6502/Makefile.PL 2007/07/31 09:43:37 44 +++ M6502/Makefile.PL 2007/08/02 11:08:10 87 @@ -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'; + WriteMakefile( NAME => 'M6502', VERSION_FROM => 'M6502.pm', # finds $VERSION @@ -10,27 +16,39 @@ 'Class::Accessor' => 0, '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', - INC => '-I.', # e.g., '-I. -I/usr/include/other' + 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' => 'cpu.o', +# }, ); sub MY::postamble { - return <<'MAKE_FRAG'; + return <<"MAKE_FRAG"; + +run: + perl -Mblib -MArch -le 'print Orao->new->boot;' -emulator: $(INST_ARCHAUTODIR)/$(NAME).$(SO) config.h perl.c - $(CC) -o emulator perl.o $(INST_ARCHAUTODIR)/$(NAME).$(SO) `perl -MExtUtils::Embed -e ldopts` +gdb: + gdb -x run --args perl $run -run: emulator - #( ./emulator 2>&1 ) | tee log | head -50 - ./emulator +html: all + test -d html || mkdir html + allpod2xhtml.pl \$(INST_LIB) html MAKE_FRAG }