BPTS += <table name>.dbd
and the associated record support file <rectype>Record.dbd must exist.RECTYPES += <rectype>Record.h
MENUS += menu<name>.h
where the entries are:DBDEXPAND += xxxInclude.dbd DBDNAME = xxxApp.dbd USER_DBDFLAGS += -I <include path> USER_DBDFLAGS += -S <macro substitutions> DBDINSTALL += xxx.dbd
Makefile.Host has many facilities for building host components. Definitions given below containing <arch> can be used to provide settings for use when building for a specific host architecture, and the <arch> part of the name should be replaced by the architecture concerned, e.g. solaris, hp700 etc. If a _DEFAULT setting is given but a particular <arch> requires that the default not be used and the required setting is blank, the value "-nil-" should be assigned to the relevent < arch> variable definition.
Products to be built | |
---|---|
PROD | Product names (without execution suffix) to build and install (e.g. PROD=myprod) |
SRCS | Source files needed by every PROD (e.g. SRCS=a.c b.c c.c) |
<prod>_SRCS | Source files needed to build a specific PROD (e.g. myprod_SRCS=a.c b.c c.c) |
PROD_<arch> | os specific products to build and install |
<prod>_SRCS_<arch> | os specific source files to build a specific PROD |
PROD_DEFAULT | products to build and install for systems with no PROD_<arch> specified |
<prod>_SRCS_DEFAULT | source files needed to build a specific PROD for systems with no <prod>_SRCS_<arch> specified |
Building libraries | |
LIBRARY | Name of library to build. The name should NOT include a prefix or extension, e.g. specify Ca to build libCa.a on Unix, Ca.lib, CaObj.lib or Ca.dll on WIN32 |
LIBSRCS | Source files for building LIBRARY (e.g. LIBSRCS=la.c lb.c lc.c) |
LIBSRCS_<arch> | os-specific library source files |
LIBSRCS_DEFAULT | Library source files for systems with no LIBSRCS_<arch> specified |
SHARED_LIBRARIES | Build shared libraries? Must be YES or NO |
SHARED_LIBRARIES_<arch> | Build shared libraries on <arch>? Must be YES or NO |
SHARED_LIBRARIES_DEFAULT | Build shared libraries for os systems with no SHARED_LIBRARIES_<arch> specified |
SHRLIB_VERSION | Shared library version number |
Compiler flags | |
USR_CFLAGS | C compiler flags for all systems |
USR_CFLAGS_<arch> | os-specific C compiler flags |
USR_CFLAGS_DEFAULT | C compiler flags for systems with no USR_CFLAGS_<arch> specified |
<prod>_CFLAGS | prod specific C compiler flags (e.g. xxxRecord_CFLAGS=-g) |
USR_CXXFLAGS | C++ compiler flags for all systems |
USR_CXXFLAGS_<arch> | os-specific C++ compiler flags |
USR_CXXFLAGS_DEFAULT | C++ compiler flags for systems with no USR_CXXFLAGS_<arch> specified |
<prod>_CXXFLAGS | prod specific C++ compiler flags |
USR_CPPFLAGS | C pre-processor flags (for all makefile compiles) |
USR_CPPFLAGS_<arch> | os specific cpp flags |
USR_CPPFLAGS_DEFAULT | cpp flags for systems with no USR_CPPFLAGS_<arch> specified |
<prod>_CPPFLAGS | prod specific C pre-processor flags (e.g. xxxRecord_CPPFLAGS=-DDEBUG) |
USR_INCLUDES | Directories to search for include files with -I prefix (e.g. -I$(EPICS_EXTENSIONS_INCLUDE)) |
<prod>_INCLUDES | Directories to search for include files when building a specific product(e.g. -I$(MOTIF_INC)) |
Linker options | |
USR_LDFLAGS | linker options (for all makefile links) |
USR_LDFLAGS_<arch> | os specific linker options (for all makefile links) |
USR_LDFLAGS_DEFAULT | linker options for systems with no USR_LDFLAGS_<arch> specified |
<prod>_LDFLAGS | prod specific ld flags |
USR_LIBS | load libraries (e.g. -lXt -lX11) (for all makefile links) |
USR_LIBS_<arch> | os specific load libraries (for all makefile links) |
USR_LIBS_DEFAULT | load libraries for systems with no USR_LIBS_<arch> specified |
<prod>_LIBS | prod specific ld libraries (e.g. probe_LIBS=X11 Xt) |
PROD_LIBS | libs needed to link every PROD for all systems |
PROD_LIBS_<arch> | os-specific libs needed to link every PROD |
PROD_LIBS_DEFAULT | libs needed to link every PROD for systems with no PROD_LIBS_<arch> specified |
<lib>_DIR | Directory to search for the specified lib. (For libs listed in PROD_LIBS, <prod>_LIBS and USR_LIBS) |
SYS_PROD_LIBS | system libs needed to link every PROD for all systems |
SYS_PROD_LIBS_<arch> | os-specific system libs needed to link every PROD |
SYS_PROD_LIBS_DEFAULT | system libs needed to link every PROD for systems with no SYS_PROD_LIBS_<arch> specified |
<prod>_SYS_LIBS | prod specific system ld libraries (e.g. m) |
Header files to be installed | |
INC | List of include files to install into $(INSTALL_DIR)/include |
INC_<arch> | os specific includes to installed under $(INSTALL_DIR)/include/os/<arch> |
INC_DEFAULT | include files to install where no INC_<arch> is specified |
Perl, csh, tcl etc. script installation | |
SCRIPTS | scripts to install for all systems |
SCRIPTS_<arch> | os-specific scripts to install |
SCRIPTS_DEFAULT | scripts to install for systems with no SCRIPTS_<arch> specified |
TCLLIBNAME | List of tcl scripts to install into $(INSTALL_DIR)/lib/<arch> (Unix hosts only) |
TCLINDEX | Name of tcl index file to create from TCLLIBNAME scripts |
Test programs | |
TESTPROD | Product names (without execution suffix) to build but not install. Built from source file having same name. |
TESTPROD_SRCS | List of source files needed to build every TESTPROD |
Documentation | |
MAN1 MAN2 MAN3 etc. | List of man files to be installed into relevent $(INSTALL_DIR)/man/man? subdirectory |
DOCS | List of text files to be installed into the $(INSTALL_DIR)/doc directory |
HTMLS_DIR | Hypertext directory to be created as $(INSTALL_DIR)/html/$(HTMLS_DIR) |
HTMLS | List of files to be installed into the $(INSTALL_DIR)/html/$(HTMLS_DIR) directory |
TEMPLATES_DIR | Template directory to be created as $(INSTALL_DIR)/templates/$(TEMPLATE_DIR) |
TEMPLATES | List of template files to be installed into $(TEMPLATE_DIR) |
Options for other programs | |
YACCOPT | yacc options |
LEXOPT | lex options |
SNCFLAGS | snc options |
E2DB_FLAGS | e2db options |
SCH2EDIF_FLAGS | sch2edif options |
RANLIBFLAGS | ranlib options |
Miscellaneous settings | |
CMPLR | C compiler selection, TRAD, ANSI or STRICT (default is STRICT) |
INSTALL_LOCATION | Location of install directory (default $(TOP)) |
USER_VPATH | List of directories that gnumake should search for source files not in the current directory |
HOST_WARN | Are compiler warning messages desired (YES or NO) (default is NO) |
HOST_OPT | Is compiler optimization desired (default is NO optimization) |
STATIC_BUILD | Is static build desired (YES or NO) (default is NO) |
Facilities for building Java programs | |
CLASSES | Names of Java classes to be built and installed |
TESTCLASSES | Names of Java classes to be built |
PACKAGE | Names of Java package to be installed |
JAR | Name of Jar file to be built |
JAR_INPUT | Names of files to be included in JAR |
MANIFEST | Name of manifest file for JAR |
Facilities for Windows 95/NT resource ( .rc) files | |
RCS | Resource files needed to build every PROD |
<prod>_RCS | Resource files needed to build a specific PROD |
<prod>_RCS_<arch> | os specific resource files to build a specific PROD |
and both source files <rectype>Record.c and <rectype>Record.dbd must exist.LIBOBJS += <rectype>Record.o
All such files will be combined into the library specified by LIBNAME. It is also possible to generate object files not placed in LIBNAME by using either of the definitions:LIBOBJS += <name>.o
Both will cause the specified file to be generated, but PROD will also install the generated file into <top>/bin/<target_arch>.PROD += <name>.o TARGETS += <name>.o
LIBNAME = xxxLib
The state notation programs must be called <name>.st .LIBOBJS += <name>.o
results in file <name> being installed from the src directory to the <top>/bin/<arch> directory.SCRIPTS += <name>
NOTE: The above line only needs to appear in one application within each <ioctop>.INSTALLS += iocCore seq
USR_CFLAGS | C compiler flags |
<prod>_CFLAGS | product specific C compiler flags |
USR_CXXFLAGS | C++ compiler flags |
<prod>_CXXFLAGS | product specific C++ compiler flags |
CPPFLAGS | cpp flags |
<prod>_CPPFLAGS | product specific cpp flags |
USR_INCLUDES | Include directory (e.g. -I$(EPICS_EXTENSIONS_BIN)) |
USR_LDFLAGS | linker options |
<prod>_LDFLAGS | product specific ld flags |
INC | header files to install |
BIN_INSTALLS | Files in any directory to install to $(INSTALL_BIN) |
YACCOPT | yacc options |
LEXOPT | lex options |
SNCFLAGS | snc options |
<prod>_SNCFLAGS | product specific state notation language flags |
VX_WARN | Compiler warning messages desired (YES or NO) (default NO) |
VX_OPT | Is compiler optimization desired (YES or NO) (default is NO optimization) |
INSTALL_LOCATION | Installation directory (defaults to $(TOP)) |
For all these types of databases, the names of the files to install have to be specified. Make will figure out how to generate these files:
If specified with a path (full or relative), the templates will be soft linked (UNIX) or copied (WIN) into the O.<arch> directory. After the first make run, template dependencies will be generated automatically.USES_TEMPLATE += yyy.template USES_TEMPLATE += $(SHARE)/installDb/zzz.template
If one or more xxx.substitutions files are to be created by script, the script name must be placed in the CREATESUBSTITUTIONS variable (e.g. CREATESUBSTITUTIONS=mySubst.pl). This script will be executed by gnumake with the prefix of the substitution file name to be generated as its argument.
NOTE: If (and only if) there are script generated substitutions files, the prefix of any inflated database's name may not equal the prefix of the name of any template used within the directory.
Other definitions:
E2DB_FLAGS | e2db options |
SCH2EDIF_FLAGS | sch2edif options |
where the entries are:DBDEXPAND += xxxInclude.dbd DBDNAME = xxxApp.dbd USER_DBDFLAGS += -I <include path> USER_DBDFLAGS += -S <macro substitutions> DBDINSTALL += xxx.dbd
BPTS += <table name>.dbd
refers to the correct architecture for your IOC processor.ARCH = <arch>
Since cdCommands is generated, the user created and/or modified files can be independent of location, using the cdCommands definitions to provide path names where needed. See 3.2. Directory Structure: cdCommands for details.