tecmake is essentially a general GNU makefile with a series of predefined targets and rules with the purpose of providing those in charge of developing libraries and applications the necessary tools so that versions for different platforms can be generated homogeneously. In other words, the tecmake user does not need to create a complete makefile nor be concerned with the current platform to create a library or application.
Its use is based on a configuration file (config.mak) created by the user which is very similar to a makefile, but only describes which are that product's files and its purpose, either being a library or an application.
Tecmake is licensed under the terms of the MIT license reproduced below. This means that Tecmake is free software and can be used for both academic and commercial purposes at absolutely no cost. See the License.
Tecmake is available in two formats tecmake.tar.gz or tecmake.zip. The documentation in html format is also available tecmake_html.tar.gz or tecmake_html.zip. Old versions can be found here. Tar and Zip files have the same contents.
tecmake package contains of the following among others:
|html||Folder with the present guide|
|tecmake.mak||The makefile for Posix systems|
|tecmakewin.mak||The makefile for Windows systems|
|remote||UNIX script used in the remote generation of products
(options compile-all or <plataform>)
|tecmake||UNIX script that calls the GNU make in UNIX|
|UNIX script to update environment variables,
to be run once at every logon or from inside the tecmake script
|tecmake.bat||Batch file to call the GNU make in Windows|
|tecmakewin.bat tecmakepause.bat||Utilities that complement the tecmake.bat script.
Uncomment the pause if you want to break after each build.
|slash_parser.exe||Parser required by Watcom C++,
because it does not accept paths with "/"
|shortpath.exe||Returns the short path name for
long file names that have spaces.
To install tecmake, simply extract all files from the compressed file to any folder, for example "c:\tecgraf\tecmake" or "/tecgraf/tecmake".
Then edit the configuration files for your system.
Tecmake depends on the following environment variables: TECMAKE_HOME, TEC_UNAME, TEC_SYSNAME and TEC_SYSRELEASE. The configuration files will set them for you. But you must edit their definition inside the configuration scripts.
The "tecmake" (or tecmake.bat) script it is the only script that must be in PATH. You can add the tecmake folder to the system PATH or move the "tecmake" (or "tecmake.bat") script to a folder that it is already in PATH.
The requirement to use tecmake is to have the GNU version of the make utility.
ATTENTION: If the library or application source code is distributed with the Tecmake Posix version as Makefile in UNIX then it is not necessary any kind of installation, just type "make" and the target should be built.
In Windows, the installation of Cygwin (http://www.cygwin.com), MingW (http://www.mingw.org) or UWIN (http://www.research.att.com/sw/tools/uwin/) is required to have a GNU make functional (The collection in http://unxutils.sourceforge.net/ did NOT work). You can also compile the GNU make for Windows from sources.
Once installed, add the "/cygwin/bin" or similar folder to the PATH if not done by the installation. Make sure to add it before others compiler folders in PATH or the wrong make will be executed. OR you can create a copy of the "make.exe" file under the name "gmake.exe" and configure "tecmake.bat" to call "gmake" instead of "make".
The tecmake.bat configuration script will set the environment variables in Windows. You MUST edit this file to adjust the Tecmake and the compilers installation folders.
TIP1: Normally you will use "tecmake" from a cmd console, this will call "tecmake.bat". But notice that if you use the Cygwin bash shell in Windows, executing "tecmake" will call the UNIX script, to call the Windows script you must write "tecmake.bat" inside the bash shell or define an alias for "tecmake", for example pointing to "make -f /cygdrive/c/tecgraf/tecmake/tecmakewin.mak".
TIP2: Visual C++ does not need to be in PATH, but it will not work if the folder "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE" is not in the PATH.
TIP3: If you call vsvars32.bat then you can obtain the necessary environment variables using:
shortpath "%VCINSTALLDIR%" => to set the VC9, VC8, VC7 or VC6 variables shortpath "%WINDOWSSDKDIR%" => to set the VC9SDK variable
You can also directly use those variables in the tecmake.bat script but this will only work if the vsvars32.bat script is run before using the Tecmake scripts. A good point is that PATH will be updated by vsvars32.bat, so TIP2 can be ignored. Also do not run vsvars32.bat many times inside the same cmd section or your PATH will grow each time.
Check the "Visual C++ Minimum Installation" and "MingW Minimum Installation" items in the Guide section for a small tutorial.
In Linux the default make is already the GNU make, so no additional software installation is required. But in other systems like AIX, IRIX and SunOS usually the default make is NOT the GNU make, so the GNU make must be installed and configured to be in PATH before the default make. OR you can create a copy of the GNU "make" file under the name "gmake" and configure the "tec_uname" script to call "gmake" instead of "make". Some tecmake features depends on the csh shell, you don't need to use it but it must be installed. But it is not required.
The tec_uname.* scripts sets all the environment variables, tec_uname.csh is for the csh shell and tec_uname.bsh is for the bash shell, if you use another shell you will need to create a similar script or set these variables manually. You MUST edit one of these files to adjust the Tecmake and the compilers instalation folders. It is not enough to run the script just before runing the tecmake script because the environment variables will be set only for the script environment space. You must run it during the logon process or from inside the tecmake script. In the most common installation you call the "tec_uname.bsh" from your ".bash_profile" or ".bashrc", for example:
if [ -f /tecgraf/tecmake/tec_uname.bsh ]; then . /tecgraf/tecmake/tec_uname.bsh fi PATH=$PATH:$TECMAKE_HOME export PATH
TIP: In Ubuntu edit ".bashrc". In MacOSX edit ".bash_profile".
TIP: For csh use ".cshrc" :
source /tecgraf/tecmake/tec_uname.csh set path = ( $path $TECMAKE_HOME )
TIP: Sometimes when you unpack the files they loose their execute attributes, to fix them set:
chmod a+x tecmake/*
The official support mechanism is by e-mail, using firstname.lastname@example.org.
tecmake was developed and it is maintained by Antonio Scuri.
libmake and appmake were originally developed by André Oliveira da Costa and Renato Ferreira Borges. The Windows version was originally developed by Diogo Andrade. We have also obtained valuable collaboration from João Luiz Campos and André Clínio.
Copyright © 1994-2020 Tecgraf/PUC-Rio.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.