<Start> <Intro> <Install> <Legal> <Screen> <Buffer> <Sprite> <Input> <Misc> <Debug> <Utes> <Author>
Building the Library

Make the Library

  1. Perform any commands to set up your compilation environment as you normally would before compiling programs.
  2. Ensure that any supplementary libraries that JLib uses for your target are set up and configured before you attempt to build the library. An example of a supplementary library is svgalib for Linux or libgrx for some djgpp targets. Read the document targets.doc or targets.txt to see if the target you have chosen requires any supplementary libraries to be set up.
  3. Run your make program from the jlib\source directory. (Hint: Type make for djgpp or UNIX, and wmake for Watcom). The library, demonstration programs and utilities should compile.
  4. You should probably go and have a cup of tea while the library builds, as it can take a while to compile. Once the build has finished, you can try the demonstration programs (in the sub directories under jlib\demo) to see if the target is working.
  5. You can rebuild the library at any time. To rebuild just the demos or utilities under djgpp or UNIX, you can use the make targets demos or utes. The default target, running make with no arguments, builds the library, demos and utilities.

Clean Up Object Files

  1. You may run make with the target clean to remove the object files that make up the library, and target realclean to remove the demonstration programs and utilities.
  2. for UNIX or djgpp users: make clean or make realclean
  3. for Watcom users: wmake clean or wmake realclean
  4. Depending on your target and any customisations you have made, there may be other ancillary unexpected files that were created during the build and not deleted. You may delete these if you wish (provided you know what you are doing).

Now You Can Compile Your Own JLib Programs

Assuming all went well, you are now ready to compile your own JLib programs. To do this you only need to remember to #include <jlib.h> in your source and link with the library and any supplementary libraries when compiling. The CFLAGS= line of the makefile you used to build the library will have the correct parameters to pass to your compiler to build JLib programs, and so it may be used as a guide.

Next Section: JLib Design

<Start> <Intro> <Install> <Legal> <Screen> <Buffer> <Sprite> <Input> <Misc> <Debug> <Utes> <Author>