Porting gnu makefile from Borland compiler and TASM to Intel compiler
I currently have a project that uses all the tools from the borland suite(compiler, assembler). Linkloc.exe is used to link the files and I need to use a GNU makefile structure and implement the intel compiler. All files being compiled are .c or .asm files. I have few questions.
1.Does anyone know where there is a tutorial on how this can be done or an example of it being done?
2.Currently TASM is called to assemble .asm files. How is this done in the intel compiler? What is the equivalent?
3. Here is an example of some the things I need help withconvertingin the makefile:
These are examples of how the makefile is structured and how I need to implement the Intel compiler. Thank you very much for taking the time to read this. Any help or suggestions would be greatly appreciated. $(TASM32) tiny_mce_markerlt; $@ lt; -o$@
I'll guess that you mean to stick with Windows, as there are plenty of gnu make tutorials for linux. You could pass asm source files through icl, which in turn would run a Visual Studio assembler; icl itself doesn't process .asm. I have no idea how compatible your current assembler might be. You can use icl for link (possibly filling in the Microsoft linker path in icl.cfg, in case you have more than one link installed), or you could use the Visual Studio link path. Your scheme for the makefile (with all compile flags attached to the compile command) is somewhat unusual, but should work with direct substitutions. Tastes vary as to whether to write the path to a specific version of the compiler in the Makefile, or open up the cmd prompt window and simply call the compiler icl in the Makefile. I'm not familiar with your '%' and ';' notations in standard Makefile or gnu make, but that doesn't change for gnu make between Windows and any other platform. I would have thought that ; would be used, if at all, to string multiple actions together. Only the file suffixes change and aren't dealt with by defaults. It looks like you intend not to rename .obj files to .o, but you can go either way.
The % is pattern matching for all the .C to the .obj files. So for every .c there coresponds the same prefix to the .obj.
So I would replace the bcc32 call with the icl call and find the corresponding flags from borland to intel? TASM32 could also be replaced with icl as well? So in short icl would handle assembling and compiling for me? Thanks for your help