ifdef THIS_IS_ONLY_FOR_DOCUMENTATION /** \file makefile.dispatch \brief Dispatcher for standard targets @author R. Huhmann This makefile is included in the user defined project-specific makefile. It sets the prefix for the global directories and loads the common generic preferences of \ref makefile.gen. Then the target related kind of makefile for library, jar, executable, documentation, etc. with corresponding make-rules is included. see \ref dispatch_source */ /** \page dispatch_source Source-Code \verbinclude makefile.dispatch */ */ /** \mainpage Makefile structure for BEL Applications @author R. Huhmann \section intro_sec Introduction To enable a common build structure for the complete application tree we defined some fixed standard makefiles for libraries, executables, Java jar-packages and executables, Fortran libraries and executables, documentation, utility programs, etc. Each source-code project has its own user-defined makefile in which one of the variables \li PROJ_LIB \li PROJ_EXE \li PROJ_F_EXE \li PROJ_JAR \li PROJ_J_EXE \li PROJ_MSGXML \li PROJ_DOCU \li PROJ_INSTALL determines the kind of project and which standard makefile is used for further processing. The contents of this variable gives the name of the executable, the library, the jar-file, the document-name, etc. The necessary project and target specific definitions, e.g. dependencies, object or source modules, public headers and so on, are supplied in the project makefile either. After the project-specific and user-defined settings the master makefile \ref makefile.dispatch must included which determines which of the standard makefiles for the defined target type is to be loaded (s. \ref target_sec ). The absolute path of \ref makefile.dispatch is referenced by the environment variable BELA_MAKE. See \ref makefile_orga for the scheme of included files. \section target_sec List of target specific makefiles The default behaviour of all makefiles (just type <tt>make</tt>) is to compile/link/build all neccessary components and complete the code generation process locally (where you checked out the project). Each project then has some specific targets to install the generated code in a global directory-structure (controlled by the enviroment variable BELA_BUILD_MASTER_DIR). Anyway, there is a common target <tt>install</tt> for all kind of makefiles to install the objects in their installation directory (<tt>make install</tt> ). There are template user makefiles for the corresponding kind of target with some in-file documentation of variables to set \li makefile.lib.tmpl \li makefile.exe.tmpl \li makefile.for.exe.tmpl \li makefile.for.iq.exe.tmpl \li makefile.jar.tmpl \li makefile.java.exe.tmpl \li makefile.msgxml.tmpl \li makefile.dtd.tmpl \li makefile.script.tmpl The common preferences used for the complete code generation process are stored in \ref makefile.gen \section build_sec The build order To enable a master buildtool to build all projects in proper order there is for each project a list of projects it depends on. In the project's makefile use DEPS += relative/path/of-a-project-we-depend-on/@@version()/<target_type> DEPS += relative/path/of-another-project-we-depend-on/@@version()/<target_type> DEPS += ... to define the projects we depend on. The tag @@version() is replaced at build time by the build version. At time of software development you can give in brackets an alternative version, usually either @@version(develop), @@version(ready) or @@version(release). For binary target projects <target-type> is 'target-dflt', 'target-dbg', 'target-dflt-64', 'target-dbg-64' */ /** \page makefile_orga Makefile Organisation Scheme of makefile includes <tt> \verbatim makefile in user tree | --- project specific user supplied options --- include makefile.dispatch in \$BELA_BUILD_DIR/prefs | --- include makefile.gen : generic makefile preferences | --- include target specific makefile \endverbatim </tt> */ /*! \if make endif # make dispatcher # Environment: # BELA_BUILD_DIR # where to install build and find dependencies (rootdir for binary repository build) # preferences of master build version PREFS_DIR = $(BELA_BUILD_MASTER_DIR)/prefs SCRIPT_DIR = $(BELA_BUILD_MASTER_DIR)/scripts # include generic makefile options, pathes are build with DIR_PREFIX include $(PREFS_DIR)/makefile.gen # determine target specific makefile ifdef PROJ_EXE include $(PREFS_DIR)/makefile.exe else ifdef PROJ_F_EXE include $(PREFS_DIR)/makefile.for.exe else ifdef PROJ_LIB include $(PREFS_DIR)/makefile.lib else ifdef PROJ_JAR include $(PREFS_DIR)/makefile.jar else ifdef PROJ_J_EXE include $(PREFS_DIR)/makefile.java.exe else ifdef PROJ_DOCU include $(PREFS_DIR)/makefile.doc else ifdef PROJ_INSTALL ifeq ($(strip $(PROJ_INSTALL)),DTD) include $(PREFS_DIR)/makefile.dtd endif ifeq ($(strip $(PROJ_INSTALL)),SCRIPT) include $(PREFS_DIR)/makefile.script endif ifeq ($(strip $(PROJ_INSTALL)), STATUS) include $(PREFS_DIR)/makefile.status endif ifeq ($(strip $(PROJ_INSTALL)), IQDAT) include $(PREFS_DIR)/makefile.iqdat endif else ifdef PROJ_MSGXML include $(PREFS_DIR)/makefile.msgxml else ifdef PROJ_MESSAGE include $(PREFS_DIR)/makefile.msg else ifdef PROJ_IQDB include $(PREFS_DIR)/makefile.iqdb else #$(shell echo no valid project ) endif # IQDB endif # MESSAGE endif # MSG_XML endif # INSTALL endif # DOCU endif # J_EXE endif # JAR endif # LIB endif # F_EXE endif # EXE ifdef THIS_IS_ONLY_FOR_DOCUMENTATION \endif make */ endif