Open Watcom Developer's Guide - HEAnet Mirror Service
Open Watcom Developer's Guide - HEAnet Mirror Service
Open Watcom Developer's Guide - HEAnet Mirror Service
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Building<br />
3.2 Project Names<br />
Each project must be given a unique name, which should also be a valid directory name under<br />
FAT file systems (8.3 convention).<br />
3.3 Makefiles<br />
Each makefile should be located in the object file directory - ie. no more of this silly cd’ing<br />
into the object directory based on crystal-balls and what not. The makefile must define the<br />
following:<br />
host_os:<br />
host_cpu:<br />
os which the resulting executable code will run on<br />
architecture which the resulting executable code will run on.<br />
proj_name: the project name<br />
Valid values for host_cpu are 386, i86, axp, ppc. These should be self-explanatory. Valid<br />
values for host_os are dos, nt, os2, nov, qnx, win, osi, linux. These should be<br />
self-explanatory for the most part, with one possible exception: osi stands for OS<br />
Independent, the executables can run on multiple OSes if appropriate loader stub is provided.<br />
The makefile must then include cproj.mif. This will define all sorts of make variables, which<br />
can then be used to build the project. A list of the most important of these variables and what<br />
they can be used for is included below.<br />
A makefile should also include deftarg.mif, for definition of the required clean target, and<br />
defrule.mif, which has the default build rules for C, C++ and assembly sources. A makefile is<br />
free to override these defaults as long as it follows the following conventions:<br />
1. Tools which have macros defined for them must be referred to by the macros -<br />
these are currently (any additions should be brought to my attention):<br />
$(CC):<br />
$(CPP):<br />
The C compiler<br />
The C++ compiler<br />
$(LINKER): The linker<br />
$(LIBRARIAN): The librarian<br />
16 Makefiles