def create_makefile64(makefile, m32):
 if (not os.path.isfile(m32)):
  return
 with open(m32) as fin:
  with open(makefile, 'w') as fout:
   for line in fin:
    line = line.replace('=tmp32', '=tmp64')
    line = line.replace('=out32', '=out64')
    line = line.replace('=inc32', '=inc64')
    line = line.replace('MKLIB=lib', 'MKLIB=lib /MACHINE:X64')
    line = line.replace('LFLAGS=', 'LFLAGS=/MACHINE:X64 ')
    line = line.replace('bufferoverflowu.lib', '')
    fout.write(line)
 os.unlink(m32)

def create_makefile64 ( makefile , m32 ) : if ( not os . path . isfile ( m32 ) ) : return with open ( m32 ) as fin : with open ( makefile , 'w' ) as fout : for line in fin : line = line . replace ( '=tmp32' , '=tmp64' ) line = line . replace ( '=out32' , '=out64' ) line = line . replace ( '=inc32' , '=inc64' ) line = line . replace ( 'MKLIB=lib' , 'MKLIB=lib /MACHINE:X64' ) line = line . replace ( 'LFLAGS=' , 'LFLAGS=/MACHINE:X64 ' ) line = line . replace ( 'bufferoverflowu.lib' , '' ) fout . write ( line ) os . unlink ( m32 )
create and fix makefile for 64bit replace 32 with 64bit directories .