Ashoori Group

Ashoori Group | Homepage

  • Increase font size
  • Default font size
  • Decrease font size

Adding a New Driver or Directory to the Lab Library

1.  Adding a new directory

(a) Go to ~/src/lab/lab/trunk/apps and mkdir the directory you want (let's call it "testdir")

mkdir testdir

Fill testdir up with all the source code you want.

(b) (in testdir) run

~/src/lab/lab/trunk/apps/makeMakefile.sh > Makefile.am

Check the new Makefile.am to make sure everything looks right.

(c) (from ~/src/lab/lab/trunk) run

./updateMakefiles.sh.

This will change the file configure.ac to include testdir in the section at the end called "AC_CONFIG_FILES".

(d) Edit ~/src/lab/lab/trunk/apps/Makefile.am to include testdir in the obvious place (as a directory like "siberia" rather than as a subdir-object like "@XXX@")

 

(e) (from ~/src/lab/lab/trunk) run ./bootstrap (or equivalently autoreconf -if).  This should create the file Makefile.in from Makefile.am.

(f) (from ~/src/lab/lab/trunk) run make to compile everything, and make install to put the executables in bin

 

2. Adding a new driver

(a) Create your new driver in the gpib_lib folder in the lab trunk:

~/src/lab/lab/trunk/gpib_lib/yourdriver.C

~/src/lab/lab/trunk/gpib_lib/yourdriver.h

 

(b) Edit ~/src/lab/lab/trunk/gpib_lib/Makefile.am

- Add your driver's name (.C) to the end of the libmy_gpib_la_SOURCES list

- your driver header's name (.h) to the end of the include_HEADERS list

 

(c) Go back one directory to /s/l/l/t and run the usual sequence:

autoreconf -if; linuxgpib_config; make; make install

If you have done this correctly, the make step should produce a file called "yourdriver.lo" in the gpib_lib directory, which links to the actual driver itself "yourdriver.o" which has been created in gpib_lib/.libs

 

(d) In order to enable your new driver to be used as a new xml entity:

edit ~/src/lab/lab/trunk/gpib_lib/xml/dtd/config.ent

add entity type in the second line,

and add parameters just like other existing drivers

-----------------