More minor editing. Hopefully clarified a few issues.

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2277 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.7
Nate Bargmann, N0NB 2008-01-06 14:38:37 +00:00
rodzic 109af84b52
commit b832b4bf10
1 zmienionych plików z 174 dodań i 143 usunięć

Wyświetl plik

@ -49,56 +49,72 @@ I expect that IP, USB, and other connectivity will follow afterwards.
General Guidelines. General Guidelines.
------------------- -------------------
0. The top level directory looks like this (Note, it has grown considerably). 0. The top level directory looks like this as of 06 Jan 2008
(Note, it has grown considerably).
[fillods@charybde hamlib]$ tree -d ~/test/hamlib $ tree -d -I CVS
.
|-- alinco |-- alinco
|-- aor |-- aor
|-- bindings |-- bindings
|-- c++ |-- c++
|-- debian |-- debian
|-- doc |-- doc
| |-- html
| |-- man
| `-- sgml | `-- sgml
|-- drake |-- drake
|-- dummy |-- dummy
|-- easycomm |-- easycomm
|-- flexradio
|-- fodtrack |-- fodtrack
|-- gnuradio |-- gnuradio
|-- icom |-- icom
| |-- lib
| `-- test
|-- include |-- include
| `-- hamlib | `-- hamlib
|-- jrc |-- jrc
|-- kachina |-- kachina
|-- kenwood |-- kenwood
|-- kit
|-- kylix |-- kylix
| `-- tests | `-- tests
|-- lib |-- lib
|-- libltdl |-- libltdl
|-- lowe
|-- macros |-- macros
|-- microtune |-- microtune
|-- pcr |-- pcr
|-- perl
|-- racal
|-- rft
|-- rotorez |-- rotorez
|-- rpcrig |-- rpcrig
|-- rpcrot |-- rpcrot
|-- sartek
|-- skanti
|-- src |-- src
|-- tapr
|-- tentec |-- tentec
|-- tests |-- tests
| `-- html | |-- config
| |-- rigctl.test
| |-- testbcd.test
| |-- testfreq.test
| `-- testloc.test
|-- tuner
|-- uniden |-- uniden
|-- winradio |-- winradio
| `-- linradio | `-- linradio
|-- wj
`-- yaesu `-- yaesu
51 directories
1. Building 1. Building
If you just want to recompile the library, please refer If you just want to recompile the library, please refer
to the INSTALL file. This document introduces hacking the code of Hamlib. to the INSTALL file. This document introduces hacking the code of Hamlib.
1.1 Obtaining sources: anonymous (pserver) cvs checkout 1.1 Obtaining sources: anonymous (pserver) cvs checkout
cvs -d:pserver:anonymous@hamlib.cvs.sourceforge.net:/cvsroot/hamlib login cvs -d:pserver:anonymous@hamlib.cvs.sourceforge.net:/cvsroot/hamlib login
@ -117,6 +133,7 @@ feel free to experiment) deletes empty directories (yes some do exist :-) )
and adds any new directories added to the repository since your last and adds any new directories added to the repository since your last
checkout. checkout.
1.1.1 Obtaining more info on CVS 1.1.1 Obtaining more info on CVS
Check out the sourceforge page at https://sourceforge.net/cvs/?group_id=8305 Check out the sourceforge page at https://sourceforge.net/cvs/?group_id=8305
@ -124,6 +141,7 @@ for more information about how to use the CVS repository of Hamlib.
A CVS manual is online at http://ximbiot.com/cvs/manual/ A CVS manual is online at http://ximbiot.com/cvs/manual/
1.2. Requirements 1.2. Requirements
Hamlib is entirely developed using GNU tools, under various Linux systems. Hamlib is entirely developed using GNU tools, under various Linux systems.
@ -191,7 +209,7 @@ following in the same parent directory of hamlib:
make install make install
This will keep the binary output files seperate from the source tree and aid This will keep the binary output files seperate from the source tree and aid
in development. in development by reducing clutter in the source tree.
Once you've run autogen.sh, make sure you've got some recent config.guess and Once you've run autogen.sh, make sure you've got some recent config.guess and
config.sub (needed to guess your system type). Anything of at least year 2004 config.sub (needed to guess your system type). Anything of at least year 2004
@ -262,45 +280,53 @@ So far, Hamlib has been tested successfully under the following systems:
2.5. Create mybackend/Makefile.am, mybackend.c mybackend.h 2.5. Create mybackend/Makefile.am, mybackend.c mybackend.h
Use 'dummy' backend as a template. Use 'dummy' backend as a template.
Here are commands for the bourne shell. Here are commands for the bourne shell:
$ automake mybackend/Makefile $ automake mybackend/Makefile
$ CONFIG_HEADERS= CONFIG_LINKS= \ $ CONFIG_HEADERS= CONFIG_LINKS= CONFIG_FILES=mybackend/Makefile ./config.status
CONFIG_FILES=mybackend/Makefile ./config.status
make in topdir to rebuild all make in topdir to rebuild all
2.6. Commit your work: 2.6. Commit your work (developer access to Hamlib CVS required):
$ cvs add mybackend $ cvs add mybackend
$ cd mybackend $ cd mybackend
$ cvs add Makefile.am mybackend.c mybackend.h $ cvs add Makefile.am mybackend.c mybackend.h
$ cvs commit -m "Initial release" Makefile.am mybackend.c mybackend.h $ cvs commit -m "Initial release" Makefile.am mybackend.c mybackend.h
Note: The `-m' switch passes a short message to the CVS repository
upon a commit. If a longer message is desired, do not use the
`-m' option. The editor specified in the EDITOR or VISUAL
environment variables will be started where a more detailed message
may be composed.
3. How to add a new model to and existing backend 3. How to add a new model to and existing backend
3.1. make sure there's already a (unique) ID for the model to be added 3.1. make sure there's already a (unique) ID for the model to be added
in include/hamlib/riglist.h in include/hamlib/riglist.h
3.2. locate the existing backend 3.2. locate the existing backend
3.3. Clone the most similar model in the backend 3.3. Clone the most similar model in the backend
3.4. Add the new C file to the _SOURCES variable 3.4. Add the new C file to the _SOURCES variable
of the backend's Makefile.am of the backend's Makefile.am
3.5. Add "extern const struct rig_caps <mymodel>_caps;" to mybackend.h 3.5. Add "extern const struct rig_caps <mymodel>_caps;" to mybackend.h
3.6. In initrigs_<mybackend> of mybackend.c, 3.6. In initrigs_<mybackend> of mybackend.c,
add "rig_register(&<mymodel>_caps);" add "rig_register(&<mymodel>_caps);"
3.7. Run make if you have dependencies, or the following to regenerate 3.7. Run `make' if you have dependencies, or the following to regenerate
the makefile. the makefile:
$ automake mybackend/Makefile $ automake mybackend/Makefile
$ CONFIG_HEADERS= CONFIG_LINKS= \ $ CONFIG_HEADERS= CONFIG_LINKS= CONFIG_FILES=mybackend/Makefile ./config.status
CONFIG_FILES=mybackend/Makefile ./config.status
make in topdir to rebuild all Run `make' in topdir to rebuild all.
3.8. Commit your work (once tests are satisfactory): 3.8. Commit your work (once tests are satisfactory):
$ cd mybackend $ cd mybackend
$ cvs add mymodel.c $ cvs add mymodel.c
$ cvs commit -m "added <mymodel> to <mybackend>" \ $ cvs commit -m "added <mymodel> to <mybackend>" Makefile.am mybackend.c mybackend.h mymodel.c
Makefile.am mybackend.c mybackend.h mymodel.c
Note: See Note in section 2.6 above.
4. Read README.betatester to test the new backend/model. 4. Read README.betatester to test the new backend/model.
@ -332,6 +358,7 @@ this. The error checking is removed for simplicity.
Starting points (not exhaustive): Starting points (not exhaustive):
gmfsk, gpredict, grig, klog, kontakt, ktrack, xlog, xtlf gmfsk, gpredict, grig, klog, kontakt, ktrack, xlog, xtlf
8. Contributing code 8. Contributing code
8.1 License 8.1 License
@ -354,12 +381,14 @@ this. The error checking is removed for simplicity.
Patches should take care of portability issues. Patches should take care of portability issues.
Keep in mind Hamlib has to run under: Keep in mind Hamlib has to run under:
* various Linux's * various Linux's
* NetBSD, FreeBSD * NetBSD, FreeBSD
* MacOS X * MacOS X
* Windows: MinGW/Cygwin, and VisualC++ support for rig.h * Windows: MinGW/Cygwin, and VisualC++ support for rig.h
Hamlib should also compile with the following common compilers: Hamlib should also compile with the following common compilers:
* gcc-2.9x (most likely deprecated) * gcc-2.9x (most likely deprecated)
* gcc-3.0 and gcc-3.2+ (nearly deprecated?) * gcc-3.0 and gcc-3.2+ (nearly deprecated?)
* gcc-4.x and newer * gcc-4.x and newer
@ -367,6 +396,7 @@ this. The error checking is removed for simplicity.
* C++ compiler against rig.h, riglist.h, rotator.h * C++ compiler against rig.h, riglist.h, rotator.h
Portability issues to watch: Portability issues to watch:
* little vs. big endian systems (use shifts or adhoc functions) * little vs. big endian systems (use shifts or adhoc functions)
* 64 bit int: avoid them in API * 64 bit int: avoid them in API
* printf/scanf of 64bit int: use PRIll and SCNll * printf/scanf of 64bit int: use PRIll and SCNll
@ -398,6 +428,7 @@ this. The error checking is removed for simplicity.
the Hamlib approach (c.f. previous section on submitting a patch). the Hamlib approach (c.f. previous section on submitting a patch).
Then you'll be able to commit by yourself to the backend you have Then you'll be able to commit by yourself to the backend you have
maintainance of. Please follow the rules hereunder: maintainance of. Please follow the rules hereunder:
* Always keep the CVS repository in a compilable state. * Always keep the CVS repository in a compilable state.
* Follow the coding guidelines * Follow the coding guidelines
* Touching the frontend (files in src/ and include/hamlib) always * Touching the frontend (files in src/ and include/hamlib) always