13.01.2015 Views

Open Watcom Developer's Guide - HEAnet Mirror Service

Open Watcom Developer's Guide - HEAnet Mirror Service

Open Watcom Developer's Guide - HEAnet Mirror Service

SHOW MORE
SHOW LESS

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.11 Include Paths<br />

The inc_path macro is composed of several other variables. Projects are able to hook any<br />

of these variables by redefining them after cproj.mif is included. The current structure looks<br />

like this:<br />

inc_path = inc_dirs | inc_dirs_$(host_os) |<br />

inc_dirs_sys<br />

inc_dirs_sys = inc_dirs_lang | inc_dirs_sys_$(host_os)<br />

inc_dirs_lang = $(lang_root)\h<br />

So, a project should put any include directories it needs into inc_dirs — note that this does not<br />

include $(watcom_dir)\h which is part of the default include directory set.<br />

If it needs to, a project can override any and all of these — for instance, the clib needs to be<br />

built with the next release header files, and so would redefine inc_dirs_lang.<br />

Any OS-specific header files needed by the project can be set in inc_dirs_$(host_os)<br />

— again, this should not include the standard system header files, which will be defined in<br />

inc_dirs_sys_$(host_os).<br />

Note that the build system previously used to set the INCLUDE environment variable to hold<br />

the contents of inc_dirs macro. This mechanism is now considered obsolete and should no<br />

longer used. Instead, include paths are passed directly on the command line. This also means<br />

that all include paths must be prepended with a -I switch, for example:<br />

inc_dirs_sys_nt<br />

= -I$(lang_root)\h\nt<br />

3.12 Executive Summary<br />

In order to convert a project to this new structure or create a new (and conforming) project, do<br />

the following:<br />

1. Create an object file directory for each combination of host_os/host_cpu under your<br />

project.<br />

2. Give your project a name, for instance Foo.<br />

3. Create a master.mif in the root of your project.<br />

4. Put all the normal makefile gear in this master.mif.<br />

22 Executive Summary

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!