<Start> <Intro> <Install> <Legal> <Screen> <Buffer> <Sprite> <Input> <Misc> <Debug> <Utes>
<Author>
Building the Library
Make the Library
- Perform any commands to set up your compilation environment as you normally would before compiling
programs.
- 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.
- 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.
- 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.
- 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
- 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.
- for UNIX or djgpp users: make clean or make realclean
- for Watcom users: wmake clean or wmake realclean
- 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>