p.print("\tgcc -O3 -I$(STREAMIT_HOME)/library/cluster -c thread"+i+".cpp");
p.print("\t$(CC) -O3 -I$(STREAMIT_HOME)/library/cluster -c thread"+i+".cpp");
    public static void generateMakeFile() {	int threadNumber = NodeEnumerator.getNumberOfNodes();	TabbedPrintWriter p;	StringWriter str; 		str = new StringWriter();        p = new TabbedPrintWriter(str);		p.println();		if (KjcOptions.standalone) {	    p.print("all: fusion");	} else {	    p.print("all: run_cluster");	}	p.println();	p.println();	p.print("clean:");	p.println();	p.print("\trm -f run_cluster master.o");	for (int i = 0; i < threadNumber; i++) {	    p.print(" thread"+i+".o");	}	p.println();	// =============== run_cluster	p.println();	p.print("run_cluster: master.o");	for (int i = 0; i < threadNumber; i++) {	    p.print(" thread"+i+".o");	}	p.println();	p.print("\tgcc -O3 -o run_cluster master.o");		for (int i = 0; i < threadNumber; i++) {	    p.print(" thread"+i+".o");	}	p.print(" -L$(STREAMIT_HOME)/library/cluster -lpthread -lstdc++ -lcluster");	p.println();	// =============== fusion	p.println();	p.print("fusion: fusion.o");	for (int i = 0; i < threadNumber; i++) {	    p.print(" thread"+i+".o");	}	p.println();	p.print("\tgcc -O3 -o fusion fusion.o");		for (int i = 0; i < threadNumber; i++) {	    p.print(" thread"+i+".o");	}	p.print(" -L$(STREAMIT_HOME)/library/cluster -lpthread -lstdc++ -lcluster");	p.println();	// ================= master.o	p.println();	p.print("master.o: fusion.h master.cpp");	p.println();	p.print("\tgcc -O3 -I$(STREAMIT_HOME)/library/cluster -c master.cpp");	p.println();	// ================= fusion.o	p.println();	p.print("fusion.o: fusion.h fusion.cpp");	p.println();	p.print("\tgcc -O3 -I$(STREAMIT_HOME)/library/cluster -c fusion.cpp");	p.println();	p.println();	for (int i = 0; i < threadNumber; i++) {	    p.print("thread"+i+".o: fusion.h thread"+i+".cpp");	    p.println();	    p.print("\tgcc -O3 -I$(STREAMIT_HOME)/library/cluster -c thread"+i+".cpp");	    p.println();	    p.println();	}		try {	    FileWriter fw = new FileWriter("Makefile.cluster");	    fw.write(str.toString());	    fw.close();	}	catch (Exception e) {	    System.err.println("Unable to write Makefile");	}	    }