t
srecord - manipulate eprom load files
Copyright (C) 1998, 2001, 2003, 2006-2010, 2014 Peter Miller

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

Build SRecord SRecord "Reference Manual"
.so etc/version.so
NAME
How to build SRecord .XX "" "How to build SRecord"
SPACE REQUIREMENTS
You will need about 3MB to unpack and build the SRecord package. Your milage may vary.

BEFORE YOU START
There are a few pieces of software you may want to fetch and install before you proceed with your installation of SRecord.

8n Boost Library You will need the C++ Boost Library. If you are using a package based system, you will need the libboost\[hy]devel package, or one named something very similar.

http://boost.org/

8n Libgcrypt Library You will need the GNU Crypt library. If you are using a package based system, you will need the libgcrypt\[hy]devel package, or one named something very similar.

http://directory.fsf.org/project/libgcrypt/

8n GNU Libtool You will need the GNU Libtool software, used to build shared libraries on a variety of systems.

http://www.gnu.org/software/libtool/

8n GNU Groff The documentation for the SRecord package was prepared using the GNU Groff package (version 1.14 or later). This distribution includes full documentation, which may be processed into PostScript or DVI files at install time - if GNU Groff has been installed.

8n GCC You may also want to consider fetching and installing the GNU C Compiler if you have not done so already. This is not essential. SRecord was developed using the GNU C++ compiler, and the GNU C++ libraries.

The GNU FTP archives may be found at \f[CW]ftp.gnu.org, and are mirrored around the world.

SITE CONFIGURATION
The SRecord package is configured using the configure program included in this distribution.

The configure shell script attempts to guess correct values for various system\[hy]dependent variables used during compilation, and creates the Makefile and lib/config.h files. It also creates a shell script config.status that you can run in the future to recreate the current configuration.

Normally, you just cd to the directory containing SRecord "'s" source code and then type

\f[B]% ./configure
\f[I]...lots of output...
\f[B]%
If you're using csh on an old version of System V, you might need to type

\f[B]% sh configure
\f[I]...lots of output...
\f[B]%
instead to prevent csh from trying to execute configure itself.

Running configure takes a minute or two. While it is running, it prints some messages that tell what it is doing. If you don't want to see the messages, run configure using the quiet option; for example,

.FT CW

\f[B]% ./configure --quiet
\bB%

To compile the SRecord package in a different directory from the one containing the source code, you must use a version of make that supports the VPATH variable, such as "GNU make" . cd to the directory where you want the object files and executables to go and run the configure script. configure automatically checks for the source code in the directory that configure is in and in .. (the parent directory). If for some reason configure is not in the source code directory that you are configuring, then it will report that it can't find the source code. In that case, run configure with the option \f[CW]--srcdir=\f[I]DIR, where DIR is the directory that contains the source code.

By default, configure will arrange for the "make install" command to install the SRecord package's files in /usr/local/bin , and /usr/local/man . There are options which allow you to control the placement of these files.

8n \f[CW]--prefix=\f[I]PATH This specifies the path prefix to be used in the installation. Defaults to \f[I]/usr/local unless otherwise specified.

8n \f[CW]--exec-prefix=\f[I]PATH You can specify separate installation prefixes for architecture\[hy]specific files files. Defaults to \f[I]${prefix} unless otherwise specified.

8n \f[CW]--bindir=\f[I]PATH This directory contains executable programs. On a network, this directory may be shared between machines with identical hardware and operating systems; it may be mounted read\[hy]only. Defaults to \f[I]${exec_prefix}/bin unless otherwise specified.

8n \f[CW]--mandir=\f[I]PATH This directory contains the on\[hy]line manual entries. On a network, this directory may be shared between all machines; it may be mounted read\[hy]only. Defaults to \f[I]${prefix}/man unless otherwise specified.

configure ignores most other arguments that you give it; use the \f[CW]--help option for a complete list.

On systems that require unusual options for compilation or linking that the SRecord package's configure script does not know about, you can give configure initial values for variables by setting them in the environment. In Bourne\[hy]compatible shells, you can do that on the command line like this:

\f[B]$ CXX='g++ -traditional' LIBS=-lposix ./configure
\f[I]...lots of output...
\f[B]$
Here are the make variables that you might want to override with environment variables when running configure .

8n Variable: CXX C++ compiler program. The default is c++ .

8n Variable: CPPFLAGS Preprocessor flags, commonly defines and include search paths. Defaults to empty. It is common to use \f[CW]CPPFLAGS=-I/usr/local/include to access other installed packages.

8n Variable: INSTALL Program to use to install files. The default is install if you have it, cp otherwise.

8n Variable: LIBS Libraries to link with, in the form \f[CW]-l\f[I]foo \f[CW]-l\f[I]bar. The configure script will append to this, rather than replace it. It is common to use \f[CW]LIBS=-L/usr/local/lib to access other installed packages.

If you need to do unusual things to compile the package, the author encourages you to figure out how configure could check whether to do them, and mail diffs or instructions to the author so that they can be included in the next release.

BUILDING SRECORD
All you should need to do is use the

\f[B]% make
\f[I]...lots of output...
\f[B]%
command and wait. When this finishes you should see a directory called bin containing three files: srec_cat , srec_cmp and srec_info .

8n srec_cat .The srec_cat program is used to manipulate and convert EPROM load files. For more information, see srec_cat (1).

8n srec_cmp The srec_cmp program is used to compare EPROM load files. For more information, see srec_cmp (1).

8n srec_info The srec_info program is used to print information about EPROM load files. For more information, see srec_info (1).

If you have GNU Groff installed, the build will also create a etc/reference.ps file. This contains the README file, this BUILDING file, and all of the man pages.

You can remove the program binaries and object files from the source directory by using the

\f[B]% make clean
\f[I]...lots of output...
\f[B]%
command. To remove all of the above files, and also remove the Makefile and lib/config.h and config.status files, use the

\f[B]% make distclean
\f[I]...lots of output...
\f[B]%
command.

The file etc/configure.in is used to create configure by a GNU program called autoconf . You only need to know this if you want to regenerate configure using a newer version of autoconf .

Windows NT
It is possible to build SRecord on MS Windows platforms, using the Cygwin (see \f[CW]www.cygwin.com) or DJGPP (see \f[CW]www.delorie.com/djgpp) environments. This provides the \[lq]porting layer\[rq] necessary to run Unix programs on Windows. The build process is exactly as described above.

You may need to pass in the include path to the Boost library. This is most simply done as

CC='gcc -no-cygwin' \e
CXX='g++ -mno-cygwin -I/usr/include/boost-1_33_1' \e
./configure

DJGPP always produces native binaries, however if you want to make native binaries with Cygwin (\f[I]i.e. ones which work outside Cygwin) there is one extra step you need after running \f[CW]./configure and before you run \f[CW]make. You need to edit the \f[I]Makefile file, and add \f[CW]-mno-cygwin to the end of the \f[CW]CXX=g++ line.

Once built (using either tool set) Windows binaries should be testable in the same way as described in the next section. However, there may be some CRLF issues in the text file comparisons which give false negatives, depending on the CRLF setting of your Cygwin file system when you unpacked the tarball.

TESTING SRECORD
The SRecord package comes with a test suite. To run this test suite, use the command

\f[B]% make sure
\f[I]...lots of output...
\f[B]%

The tests take a few seconds each, with a few very fast, and a couple very slow, but it varies greatly depending on your CPU.

If all went well, the message

Passed All Tests

should appear at the end of the make.

INSTALLING SRECORD
As explained in the "SITE CONFIGURATION" section, above, the SRecord package is installed under the /usr/local tree by default. Use the \f[CW]--prefix=\f[I]PATH option to configure if you want some other path. More specific installation locations are assignable, use the \f[CW]--help option to configure for details.

All that is required to install the SRecord package is to use the

\f[B]% make install
\f[I]...lots of output...
\f[B]%
command. Control of the directories used may be found in the first few lines of the Makefile file and the other files written by the configure script; it is best to reconfigure using the configure script, rather than attempting to do this by hand.

GETTING HELP
If you need assistance with the SRecord package, please post to the srecord\[hy]users mailing list

srecord\[hy]users@lists.sourceforge.net

For information obout the srecord\[hy]users mailing list. http://srecord.sourceforge.net/mailing\[hy]list.html

When reporting problems, please include the version number given by the

\f[B]% srec_cat -version
\f[I]...warranty disclaimer...
\f[B]%
command. Please do not send this example; run the program for the exact version number.

COPYRIGHT
srecord version \*(v)

Copyright \*(Y) Peter Miller

Copyright \*(Y) SCott Finneran

The SRecord package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

It should be in the LICENSE file included with this distribution.

AUTHOR
Scott Finneran;E\[hy]Mail:;scottfinneran@yahoo.com.au
Peter Miller;E\[hy]Mail:;pmiller@opensource.org.au
vim: set ts=8 sw=4 et :