Source Tree Layout
From Open Watcom
This section will take you on a guided tour of the Open Watcom source tree, presenting an overview of its structure and highlighting some of the more memorable sights.
The Open Watcom directory structure mostly mirrors the layout used by the Watcom/Sybase build server but it has been cleaned up, straightened out and unified, although there still may be some warts.
The root of the Open Watcom directory tree can be in the root of any drive (if your OS uses drive letters) or in any directory, for instance e:\ow. Long filenames are not recommended if compatibility with DOS tools is desired. Directory names which include spaces are highly discouraged in any case.
The main subdirectories in the Open Watcom root are the following:
- bat
- currently contains mostly useless batch files and several useful ones. One extremely important file lives here: makeinit. This file controls the operation of wmake and is the key to understanding of the build process. Since wmake looks for makeinit along the PATH, the bat directory should be placed at or near the start of your PATH environment variable.
- bin, binp, binl
- contains miscellaneous binaries used in the build process. The binp directory contains OS/2 executables, bin contains DOS or Win32 executables, binl contains Linux executables.
- bld
- is the directory where it's at. It contains all the Open Watcom source code. It is so important (and huge) that it deserves its own section.
- contrib
- contains various third-party libraries and tools, some of which are peripherally used for Open Watcom and others that are just useful.
- docs
- contains source files for the Open Watcom documentation as well as binaries needed to translate the sources into PostScript, HTML or various online help formats. Please refer to the Building Documentation page for further information.
- rel2
- is the "release" directory is where the binaries and other files produced in the course of the build process end up. The structure of this directory mirrors the watcom directory of a typical Open Watcom installation.
The bld directory
Following is a brief description of all subdirectories of bld. Each subdirectory roughly corresponds to one "project". There's a lot of projects!
- as
- the Alpha AXP, MIPS, and PowerPC assembler. The x86 assembler lives separately.
- aui
- user interface library employed by the debugger and profiler.
- bdiff
- binary diff and patch utilities.
- bmp2eps
- a utility for converting Windows bitmap files into EPS format, used for building documentation.
- brinfo
- part of the C++ source browser.
- browser
- the GUI C/C++ source browser.
- build
- directory holding build related files such as binaries used internally during build process and several master make include files which lie at the heart of the build system. Worth visiting!
- builder
- builder tool controlled by those lang.ctl files that are all over the place, plus miscellaneous other build tools.
- causeway
- the popular CauseWay DOS extender, in a form buildable with Open Watcom tools.
- cc
- the C compiler front end.
- cfloat
- utility library for conversions between various floating point binary formats. Used internally by the compilers.
- cg
- Open Watcom code generators, the heart of the compilers. These are shared by all languages (C, C++, FORTRAN). Currently supported targets are 16-bit and 32-bit x86 as well as Alpha AXP.
- clib
- the C runtime library. Pretty big project in itself.
- cmdedit
- command line editing utilities, more or less obsolete.
- comp_cfg
- compiler configuration header files for various targets.
- cpp
- a simple C style preprocessor used by several other projects.
- ctest
- C compiler regression tests. Run them early, run them often.
- cvpack
- the CV pack utility (for CodeView style debugging information).
- diff
- Open Watcom version of the popular utility.
- dig
- files used primarily by the debugger - this directory contains files that are shared between debugger, profiler, trap files and Dr. Watcom.
- dip
- Debug Information Processors, used by debugger. The DIPs provide an interface between the debugger and various debug information formats.
- dmpobj
- a simple OMF dump utility.
- dwarf
- library for reading and writing DWARF style debugging information.
- editdll
- interface modules between the IDE and external editors.
- emu
- 80387 emulator library.
- emu86
- 8087 emulator library.
- exedump
- a multi-purpose binary file dump utility.
- f77
- FORTRAN 77 compiler front end, runtime library, regression tests and samples. All the FORTRAN stuff is crowded in there.
- fe_misc
- miscellaneous compiler front-end stuff shared between projects.
- fmedit
- form edit library, part of the SDK tools.
- graphlib
- Open Watcom graphics library for DOS.
- gui
- GUI library used by IDE, debugger, source browser and other tools.
- hdr
- source files of header files distributed with the compilers.
- help
- character mode help viewer (whelp).
- idebatch
- batch processor for the IDE.
- lib_misc
- miscellaneous files shared between clib and other tools.
- mad
- Machine Architecture Descriptions used by debugger.
- mathlib
- the math library.
- misc
- stuff that didn't fit anywhere else. Not much really.
- mstools
- Microsoft clone tools, front ends for compilers and utilities.
- ncurses
- a version of the ncurses library used by Linux console tools.
- ndisasm
- the "new" disassembler supporting variety of file format and instruction sets. Very handy.
- nwlib
- the "new" library manager (the old one retired).
- online
- place for finished online help files and associated header files.
- orl
- Object Reader Library, reads OMF, COFF and ELF object files.
- os2api
- headers and libraries for the OS/2 API (both 16-bit and 32-bit).
- owl
- Object Writer Library, brother of ORL.
- pgchart
- presentation graphics and chart library for DOS (part of the graph library).
- plusplus
- another huge directory containing all C++ stuff. Compiler, runtime libraries, all that.
- plustest
- C++ regression test utilities. Extremely worthy of the attention of compiler developers.
- pmake
- parallel make, tool used in the build process to roughly control what gets built.
- posix
- a bunch of POSIX utilites like cp, rm and so on. Not suffering from creeping featuritis but they do the job and they're portable.
- rcsdll
- interface to various revision control systems, used by IDE and editor.
- re2c
- regular expression to C converter, used in C++ and non-x86 assembler compiler build. Like lex, only different.
- redist
- miscellaneous redistributable files.
- rtdll
- C, C++ and math runtime DLLs.
- sdk
- SDK tools like resource editor, resource compiler or dialog editor. Also the home of wres library which is used by many other projects.
- setupgui
- source for the Open Watcom installer.
- src
- sample source code distributed with the compiler, some of it is used in the documentation.
- ssl
- internal tool used for debugger builds.
- techinfo
- ancient system information utility.
- trap
- trap files (both local and remote), the heart of the debugger containing platform specific debugging code. Heavy stuff.
- trmem
- memory tracker library (good for discovering and plugging memory leaks).
- ui
- user interface library.
- vi
- Open Watcom vi editor, clone of the popular(?) Unix editor.
- viper
- the Open Watcom IDE.
- viprdemo
- IDE demo program.
- w16api
- headers and libraries for the Windows 3.x API.
- w32api
- headers and libraries for the Win32 API; custom made for Open Watcom.
- w32api.old
- headers and libraries for the Win32 API; from the MinGW project. This was used for Open Watcom 1.7a and earlier. It is retained in the source tree for reference.
- w32loadr
- loaders for OS independent (OSI) binaries.
- wasm
- the x86 assembler. Large parts of the source are shared between standalone wasm and inline assembler support for compilers targeting x86 platforms.
- watcom
- contains internal headers and libraries shared by many projects.
- wclass
- an Open Watcom C++ class library.
- wdisasm
- old x86 disassembler, very nearly obsolete.
- wgml
- Watcom GML / Script, still very incomplete attempt to reconstruct lost sourcecode.
- whpcvt
- Watcom Help Converter used for producing online documentation.
- wic
- utility for converting include files between various languages.
- win386
- the Windows 386 extender.
- wl
- the Open Watcom linker, also contains the overlay manager library.
- wmake
- the make utility.
- womp
- Watcom Object Module Processor, primarily for conversion between debug info formats. Some source files are shared with other projects.
- wpack
- simple file compression/decompression utility.
- wpi
- macros and helper functions for facilitating development of Windows and OS/2 GUI programs from single source code.
- wprof
- the Open Watcom profiler.
- wsample
- the execution sampler, companion tool to the profiler.
- wstrip
- strip utility for detaching or attaching debug information and/or resources.
- wstub
- stub program for DOS/4GW.
- wtouch
- a touch utility.
- wv
- the debugger (used to be called WVIDEO, hence the name).
- yacc
- Watcom's version of YACC used for building compilers/assemblers.
As you can see, there's a lot of stuff! Some of these projects contain specific documentation pertaining to them, usually located in a directory called 'doc' or somesuch. For the most part, the most uptodate and comprehensive documentation is the source code itself.

