Ejemplo n.º 1
0
void compile(void) {
    int i;
    char buf[256];
    if ( cpp_file_cnt() > 0 ) {
        FILE *fp = response( RESPONSE );
        int sys = get_dosex();
      fprintf( fp, " /W%c %s%ci %ce %cl %cA %s \"/I%s\"", 
            ( sys == OPT_W32CON || sys == OPT_W32GUI || sys == OPT_W32DLL ? 
                 'c' : 'a'), // we aren't being too specific on the /W switch
                            // since the compiler isn't spawning the linker directly
            ( get_option( OPT_C99) ? "/9 " : "" ),
            ( get_option( OPT_CPPFILE) ? '+' : '-' ),
            ( get_option( OPT_ERRFILE) ? '+' : '-' ),
            ( get_option( OPT_LSTFILE) ? '+' : '-' ),
            ( get_option( OPT_EXTEND) ? '+' : '-' ),
            //( get_option( OPT_EXCEPTION) ? '+' : '-' ),
            get_cc_opt(),
            get_inc_path()
        );
        for ( i = 0; i < cpp_file_cnt(); i++ )
            fprintf( fp, " %s", cpp_file(i) );
        fclose( fp );
        // this is being done the hard way because of a vagary in the compiler:
        // it cannot handle /S in a response file.  I'll fix it later...
        if ( get_assembler() == OPT_NASM )
            sprintf( buf, " /S ");
        else if ( get_assembler() == OPT_WASM ||
            get_assembler() == OPT_LASM ||
            get_assembler() == OPT_MASM ||
            get_assembler() == OPT_ML )
            sprintf( buf, " -C+M ");
        else
            sprintf( buf, " /c ");
        strcat(buf, "@" RESPONSE);
        exec( "occ", buf );
        if (! get_option(OPT_KEEPRSP) )
            unlink( RESPONSE );
    }
}
Ejemplo n.º 2
0
void assembly(void) {	

    switch( get_assembler() ) {
        case OPT_NASM:	nasm(); break;
        case OPT_TASM:	tasm(); break;
        case OPT_TASMX:	tasmx(); break;
        case OPT_TASM32:tasm32(); break;
        case OPT_MASM:	masm(); break;
        case OPT_ML:	ml(); break;
        case OPT_WASM:	wasm(); break;
        case OPT_LASM:	lasm(); break;
        case OPT_LASM32:lasm32(); break;
        default:
            fprintf( stderr, "Unknown assembler, use NASN...\n");
            nasm();
            break;
    }
    if ( !get_option(OPT_KEEPGEN) )
        del_asm_tmpfiles();
}
Ejemplo n.º 3
0
string SRAssembler::get_assembled_scaf_file_name(int round, int k){
	return get_assembler()->get_output_scaffold_file_name(tmp_dir + "/assembled_" + int2str(k) + "_" + int2str(round));
}
Ejemplo n.º 4
0
void SRAssembler::do_assembly(int round, int k) {
	logger->info("Doing assembly: round = " + int2str(round) + ", k = " + int2str(k));
	Assembler* assembler = get_assembler();
	assembler->do_assembly(k, this->libraries, tmp_dir + "/assembled_" + int2str(k) + "_" + int2str(round));
}