next up previous contents
Next: The Resource Database Up: Hartebeesthoek Local Guide for Previous: Writing Device Servers

Make

Once the code has been generated make should be used to compile and link it. The makefile has been generated for the GNU make program and makes use of extensions specific to it. It is a multi-platform makefile which means that there is only one makefile for compiling on different platforms. Two platforms are supported so far - Linux and SunOS. All tests were done on Linux. Compiling under SunOS has not been tested and has to be correctly setup before being used e.g. the dserver libraries have only been compiled for Linux-386 so far. Differences between platforms e.g. different compiler options, are supported by enclosing them in conditional make statements of the form :

ifdef linux
linux specific make rule
endif

To use the make file you must call it with the script linuxmake (installed in /sr/local/bin). This script does the following :

make unix=1 linux=1 $@

Which calls make with the two variables unix and linux set.

To compile the newly generated class type linuxmake Class.o in the ~class/src directory.

To compile and link the device server type linuxmake Class (assuming your device server is called Class) in the ~class/src directory.

To make everything type linuxmake all in the ~class/src directory.

To generate the documentation (the user guide) go to the ~class/ug directory and type latex Class then dvips Class and print the resulting postscript file Class.ps.


next up previous contents
Next: The Resource Database Up: Hartebeesthoek Local Guide for Previous: Writing Device Servers
Mike Gaylard
1999-06-14