1 | If you just want to use the srecord tools, you can stop reading here.
|
---|
2 |
|
---|
3 | Following are instructions how I (Jens Heilig) built the srecord tools on Windows:
|
---|
4 |
|
---|
5 | How to build srecord 1.62 tools on Windows:
|
---|
6 |
|
---|
7 | PREREQUISITES:
|
---|
8 | ==============
|
---|
9 | 1) MinGW
|
---|
10 | Download and install mingw-get-inst (I used version 20110530) from http://mingw.sourceforge.net/ Select C++ and MinGW Developer Toolkit during installation.
|
---|
11 |
|
---|
12 | Start MinGW Shell from the Windows Start Menu.
|
---|
13 | Install additional packages by entering following commands at the prompt:
|
---|
14 | (the "$"-sign indicates the shell-prompt. Do not type it)
|
---|
15 | $ mingw-get.exe install msys-groff-ext
|
---|
16 | $ mingw-get.exe install gettext
|
---|
17 |
|
---|
18 | 2) Boost Library
|
---|
19 | Download and install the Boost library from here: http://ascend4.org/Binary_installer_for_Boost_on_MinGW
|
---|
20 | Copy the newly installed files to you MinGW directory:
|
---|
21 | $ cp <boost-install-dir>/lib/* /lib/
|
---|
22 | $ cp -r <boost-install-dir>/include/boost-1_41/boost /include/
|
---|
23 |
|
---|
24 |
|
---|
25 | 3) libgcrpyt library
|
---|
26 | Download libgcrypt-1.5.0.tar.bz2 and libgpg-error-1.10.tar.bz2 (newer versions should also work) from http://www.gnupg.org/download/index.en.html
|
---|
27 | cd to the directory where the two downloaded files are (make sure the path to this directory does not contain spaces)
|
---|
28 | $ tar jxfv libgpg-error-1.10.tar.bz2
|
---|
29 | $ cd libgpg-error-1.10
|
---|
30 | $ ./configure --disable-shared --enable-static && make && make install
|
---|
31 | (the previous step might hang when converting from ISO-8859-2 to UTF-8 late in the build process. Press ctrl-c and proceed)
|
---|
32 | $ cd ..
|
---|
33 | $ tar libgcrypt-1.5.0.tar.bz2
|
---|
34 | $ cd libgcrypt
|
---|
35 | $ ./configure --disable-shared --enable-static && make && make install
|
---|
36 |
|
---|
37 | You now have all the prerequisites required to build the srecord tools. Let's proceed.
|
---|
38 |
|
---|
39 |
|
---|
40 | BUILDING SRECORD TOOLS
|
---|
41 | ======================
|
---|
42 | cd to the directory where you unpacked the srecord source code.
|
---|
43 |
|
---|
44 | unfortunately, you need to edit the "configure" script. I have not found a way around this:
|
---|
45 | Open the file "configure" in a text editor which preserves Unix line endings!
|
---|
46 | Change line 4171 from this:
|
---|
47 | LIBS="-lgcrypt $LIBS"
|
---|
48 | to this:
|
---|
49 | LIBS="-lgcrypt -lgpg-error $LIBS"
|
---|
50 |
|
---|
51 | Save the file (preserving Unix line endings!). Now we can start the actual build process:
|
---|
52 |
|
---|
53 | Start configure for srecord:
|
---|
54 | $ CPPFLAGS="-static -I/include -I/usr/local/include" LDFLAGS="-L/lib -L/usr/local/lib" CC='gcc -static-libgcc' CXX='g++ -static-libgcc -static-libstdc++' ./configure
|
---|
55 |
|
---|
56 | After configure has run successfully, start the build process:
|
---|
57 | $ make
|
---|
58 |
|
---|
59 | After successful build process, run the tests:
|
---|
60 | $ make -i sure
|
---|
61 |
|
---|
62 | All tests should succeed.
|
---|
63 |
|
---|
64 | Next, reduce the size of the built programs by removing debugging information:
|
---|
65 | $ cd bin
|
---|
66 | $ strip *.exe
|
---|
67 |
|
---|
68 | Finally, move srec_cat.exe, srec_info.exe and srec_cmp.exe from the bin directory to where you want them, you can then delete everything else in the bin-directory.
|
---|
69 |
|
---|
70 | You should now have working srecord tools!
|
---|
71 |
|
---|
72 | Good Luck!
|
---|
73 | Jens Heilig, 2013-06-06
|
---|