To achieve a degree of flexibility and system independence for the PLplot makefile, it is written in the macro language m4. System dependencies are resolved conditionally via m4 macros. Using this method, only one file (makefile.m4) is required for all systems with a SystemV-compatible make. This enables us to easily support many different systems.
Here's how to make everything conveniently on a unix-like system. First, if you run into problems, you should read sys/unix/makefile.m4 carefully, as it has much additional information inside. If your system is not already supported, you must add system specific defines analogous to the existing ones in makefile.m4. Then:
% cd tmp % cp ../sys/unix/makefile.m4 . % m4 -D<sys> makefile.m4 >makefilewhere 〈sys〉 is an abbreviation for your system name, e.g. SUNOS, UNICOS, AIX, etc. To get the double precision library for your system, specify -DDOUBLE on the m4 command line (note: Fortran double precision may not be supported on your system using this method; check the release notes to be sure). At this point, you may wish to edit makefile to change whatever settings are required for your site only. For example, you may wish to edit the device list to include only those devices which you actually have access to.
Then, while in the tmp directory:
% make linkssets up soft links to all the files you will ever need.
% make [libs]will make the PLplot library(s) (libs is the first target and therefore optional), whereas
% make everythingmakes the main library, fonts, plrender, and pltek, for the default precision (probably single on a workstation). This is just an abbreviation for typing % make libs fonts plrender pltek. To make one of the example programs,
% make x01cfor the first C demo, or
% make x01ffor the first Fortran demo (other example programs are similar). To make all the C program or Fortran program demos, specify cdemos or fdemos as the target.
Finally, you must move the PLplot library, fonts, and utilities to a more permanent location, for example:
% mv ../lib/*.lib /usr/local/plplot % mv *.fnt *.idx *.lkp /usr/local/plplot % mv plrender pltek /usr/local/plplotif you are installing into system directories, or
% mv ../lib/*.lib ~/lib % mv *.fnt *.idx *.lkp ~/lib % mv plrender pltek ~/binif you are installing in your directory tree only (note under SUNOS you must run ranlib on libraries after moving them). You should then test the library again using one of the example programs to ensure that everything works perfectly. After you are finished, you may delete everything in the tmp directory.
Note that starting with PLplot version 4.0, the *.idx and the *.lkp files are no longer generated. The info they contained has been stuffed into the *.fnt files. This means when you move the font files to their permanent locale, you only need to do
mv *.fnt wherever
If you have any difficutly with installing the PLplot files into their permanent places, your local unix system wizard may be able to help you.