--- M6502/Makefile.PL 2007/07/30 17:32:41 29 +++ M6502/Makefile.PL 2007/08/01 15:53:54 81 @@ -2,6 +2,10 @@ 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 '; + WriteMakefile( NAME => 'M6502', VERSION_FROM => 'M6502.pm', # finds $VERSION @@ -10,25 +14,40 @@ '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 => '', # e.g., '-DHAVE_SOMETHING' - 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'; -orao: $(INST_ARCHAUTODIR)/$(NAME).$(SO) - $(CC) -o orao perl.o $(INST_ARCHAUTODIR)/$(NAME).$(SO) `perl -MExtUtils::Embed -e ldopts` +emulator: $(INST_ARCHAUTODIR)/$(NAME).$(SO) config.h perl.c + $(CC) -o emulator perl.o $(INST_ARCHAUTODIR)/$(NAME).$(SO) `perl -MExtUtils::Embed -e ldopts` + +run: emulator + #( ./emulator 2>&1 ) | tee log | head -50 + ./emulator -run: orao - ( ./orao 2>&1 ) | head -30 +html: all + test -d html || mkdir html + allpod2xhtml.pl $(INST_LIB) html MAKE_FRAG }