en:develop:bldenv

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:develop:bldenv [2018/08/24 16:28] prokusheven:develop:bldenv [2023/11/07 05:53] (current) prokushev
Line 3: Line 3:
 ==== General description of osFree build system ===== ==== General description of osFree build system =====
  
-For  compilation,  fix  build.conf  to  suit  your  system.  (There are 3 +==== The Directory Tree ==== 
-versions  of  build.conf  for  OS/2, Linux and Windows in the root directory. + 
-Also developer-specific config exists with names like build-valerius.conf, +Please look at the source code tree to understand how files are to be placed. Please understand that the osFree source tree contains the code for an operating system and some toolkit toolsPlease, DO NOT place unrelated tools or applications in this tree. The Toolkit is a set of helper utilities, which are built for development system (under which the OS is built). They are necessary for OS files building. 
-build-prokushev.conf, etc)+ 
-OpenWatcom  compiler  is used for developmentI tried OpenWatcom versions 1.3 +==== Global/Shared/Private Headers ==== 
-as  well  as  1.5 Also,  for *.cmd scripts a REXX language interpreter is + 
-needed     For      Linux      and     Windows     users     Regina     REXX +Each level of the source tree contains two standard directories:  
-(http://regina-rexx.sourceforge.net/)  may  be  used Before compilation, for + 
-setting  environment  variables,  use  setvars{.cmd  --  for OS/2, .bat -- for +|//shared//  |Contains code shared among all source at this level and deeper levels | 
-Windows, and .sh -- for Linux}.+|//include//  |Contains header files for the above | 
 + 
 +Each levels/part of the OS should have a specific prefix that allows a developer to easily find what part of the OS a header/library file belongs toFor example code shared by the whole tree should be included with: 
 + 
 +<code c>#include <all_shared.h></code> 
 + 
 +and code shared by all commandline tools should include: 
 + 
 +<code c>#include <cmd_shared.h></code> 
 + 
 +Try to create as few shared code headers as possible. Each “shared” directory should contain one (1) library (.lib) file (xxx_shared.lib) with all shared code and each “include” directory should contain one main header file including all other (xxx_shared.h)
 + 
 +Example of use of common files: 
 + 
 +<code c> 
 +// Use the normal OS/2 INCL_ since our toolkit is the OS/2 toolkit 
 +#define INCL_DOSERROR 
 + 
 +// Include os2.
 +#include <os2.h> 
 + 
 +// Include any needed normal C library 
 +#include <malloc.h> 
 +#include <string.h> 
 + 
 +/Include all shared code and shared code for command line tools 
 +#include <all_shared.h> 
 +#include <cmd_shared.h> 
 +</code>