/* ** ClanLib SDK ** Copyright (c) 1997-2005 The ClanLib Team ** ** This software is provided 'as-is', without any express or implied ** warranty. In no event will the authors be held liable for any damages ** arising from the use of this software. ** ** Permission is granted to anyone to use this software for any purpose, ** including commercial applications, and to alter it and redistribute it ** freely, subject to the following restrictions: ** ** 1. The origin of this software must not be misrepresented; you must not ** claim that you wrote the original software. If you use this software ** in a product, an acknowledgment in the product documentation would be ** appreciated but is not required. ** 2. Altered source versions must be plainly marked as such, and must not be ** misrepresented as being the original software. ** 3. This notice may not be removed or altered from any source distribution. ** ** Note: Some of the libraries ClanLib may link to may have additional ** requirements or restrictions. ** ** File Author(s): ** ** (if your name is missing here, please add it) */ #include #include #include "../Generic/project.h" #include "../Generic/workspace.h" #include #include "generator.h" #include void create_release(Workspace &work) { mkdir("Borland"); mkdir("Debug"); mkdir("Release"); mkdir("Debug/Intermediate"); mkdir("Release/Intermediate"); std::list::iterator it; bool debug=true; for(it=work.projects.begin();it!=work.projects.end();it++) { bpr_create_file(*it,debug); debug = debug ^ true; bpr_create_file(*it,debug); } } void create_makefile(Workspace &work) { std::list::iterator it; mkdir("Borland"); mkdir("Debug"); mkdir("Release"); mkdir("Debug/Intermediate"); mkdir("Release/Intermediate"); bool debug=true; for(it=work.projects.begin();it!=work.projects.end();it++) { mak_create_file(*it,debug); debug ^= true; mak_create_file(*it,debug); cout<name<::iterator str=proj.file_paths.begin();str!=proj.file_paths.end();str++) project << "USEUNIT(\"..\\" << str->c_str() << ".cpp\");"<"<"<::iterator str=proj.files.begin();str!=proj.files.end();str++) { bpr<<"..\\Debug\\Intermediate\\" << str->c_str(); bpr<::iterator str=proj.files.begin();str!=proj.files.end();str++) { bpr<<"..\\Release\\\Intermediate\\" << str->c_str(); bpr<"<::iterator str=proj.defines_list.begin();str!=proj.defines_list.end();str++) { bpr<c_str() <<";"; } if(debug) bpr << "_DEBUG;DEBUG\"/>" <" <" < "< "< "< "< "< "< "< "< "< "<c_str() << ".obj"; else mak<<"..\\Release\\Intermediate\\" << str->c_str() << ".obj"; str++; if(str++ != proj.files.end()) { mak <<" \\"; } str--; str--; mak << endl; } mak << endl << endl; mak << "RESFILES = " << endl; if(debug) mak << "INT_DIR = ..\\Debug\\Intermediate" << endl; else mak << "INT_DIR = ..\\Release\\Intermediate" << endl; mak << "MAINSOURCE = " << proj.libname << ".bpf" <c_str() << ";"; } //Mak_body here mak << body.rdbuf(); mak.flush(); mak << "USERDEFINES ="; for(std::list::iterator str=proj.defines_list.begin();str!=proj.defines_list.end();str++) { mak << str->c_str() << ";"; } if(debug) mak << "DEUBG;_DEBUG" << endl; else mak << "NDEBUG;" << endl; mak << "SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT "<