home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / NETWORK / netpbm_src.lzh / NETPBM / Pbmplus.tmpl < prev    next >
Text File  |  1996-11-18  |  7KB  |  218 lines

  1. /* Imake template and rules for PBMPLUS
  2.  *
  3.  * Copyright (C) 1991 Rainer Klute
  4.  *
  5.  * Permission to use, copy, modify, distribute, and sell this software and
  6.  * its documentation for any purpose is hereby granted without fee, provided
  7.  * that the above copyright notice appear in all copies and that both that
  8.  * copyright notice and this permission notice appear in supporting
  9.  * documentation, and that the copyright holder's name not be used in
  10.  * advertising or publicity pertaining to distribution of the software
  11.  * without specific, written prior permission. The copyright holder makes
  12.  * no representations about the suitability of this software for any
  13.  * purpose. It is provided "as is" without express or implied warranty.
  14.  */
  15.  
  16. /* Set where to install PbmPLus */
  17.          BINDIR = /usr/X11R6/pbmplus
  18.          MANDIR = /usr/X11R6/man
  19.       MANSUFFIX = 1p
  20.  
  21. /* CONFIGURE: PBMPLUS's support for TIFF files depends on the library from
  22.  * Sam Leffler's TIFF Software package - see the OTHER.SYSTEMS file for a
  23.  * full description and access information.  To configure PBMPLUS to use the
  24.  * library: first, if necessary, fetch the TIFF Software, unpack it in a
  25.  * scratch directory somewhere, and move the libtiff subdirectory right here
  26.  * into the PBMPLUS top-level directory.  Then move the file Imakefile.tiff
  27.  * to libtiff/Imakefile.
  28.  *
  29.  * Libtiff is pretty good about portability, but there are some machines
  30.  * it has problems on.  If you run into problems, you may wish to contact
  31.  * Sam directly, at the address listed in the OTHER.SYSTEMS file.
  32.  *
  33.  * By the way, you must have at least version 2.4 of libtiff.  Earlier
  34.  * versions will not work.
  35.  */
  36. #ifndef BuildLibTiff
  37. #define BuildLibTiff     YES
  38. #endif
  39.  
  40. /* CONFIGURE: You may edit the symbol definitions below as you see fit,
  41.  * e.g. change the definition of "InstallLibraries" and "InstallIncludes"
  42.  * to "YES" if you want to have the libraries and include files installed.
  43.  */
  44. #ifndef InstallBinaries
  45. #define InstallBinaries  YES
  46. #endif
  47. #ifndef InstallManuals
  48. #define InstallManuals   YES
  49. #endif
  50. #ifndef InstallLibraries
  51. #define InstallLibraries NO
  52. #endif
  53. #ifndef InstallIncludes
  54. #define InstallIncludes  NO
  55. #endif
  56.  
  57. /* CONFIGURE: Normally the Imakefiles build and install separate binaries for
  58.  * each program.  However, on some systems (especially those without shared
  59.  * libraries) this can mean a lot of space.  In this case you might try
  60.  * building a "merge" instead.  The idea here is to link all the binaries
  61.  * together into one huge executable, with a tiny dispatch program as the
  62.  * main.  Then the merged binary is installed with file-system links for
  63.  * each program it includes.  The dispatch routine can tell which program
  64.  * to run by looking at argv[0].  On a Sun3 under SunOS 3.5 the space for
  65.  * executables went from 2.9 meg to .36 meg.
  66.  *
  67.  * Note that if you make a "merge", the executables don't get created
  68.  * until you do the install.
  69.  */
  70. #ifndef InstallMerged
  71. #define InstallMerged NO
  72. #endif
  73.  
  74.  
  75. /* CONFIGURE: Where to install PBMPLUS (defaults to the X11 directories). */
  76. #ifndef PbmplusDir
  77. #define PbmplusDir    /* defaults to nothing */
  78. #endif
  79. #ifndef PbmplusBinDir
  80. #define PbmplusBinDir $(BINDIR)
  81. #endif
  82. #ifndef PbmplusManDir
  83. #define PbmplusManDir $(MANDIR)
  84. #endif
  85. #ifndef PbmplusLibDir
  86. #define PbmplusLibDir $(USRLIBDIR)
  87. #endif
  88. #ifndef PbmplusIncDir
  89. #define PbmplusIncDir $(INCDIR)
  90. #endif
  91.  
  92. /* End of configurable definitions. */
  93.  
  94. /* Subdirectories: */
  95. #ifndef PbmDir
  96. #define PbmDir TOPDIR/pbm
  97. #endif
  98. #ifndef PgmDir
  99. #define PgmDir TOPDIR/pgm
  100. #endif
  101. #ifndef PpmDir
  102. #define PpmDir TOPDIR/ppm
  103. #endif
  104. #ifndef PnmDir
  105. #define PnmDir TOPDIR/pnm
  106. #endif
  107. #ifndef TiffDir
  108. #define TiffDir TOPDIR/libtiff
  109. #endif
  110.  
  111. /* Libraries: */
  112. #ifndef LibPbm
  113. #define LibPbm $(PBMDIR)/libpbm.a
  114. #endif
  115. #ifndef LibPgm
  116. #define LibPgm $(PGMDIR)/libpgm.a
  117. #endif
  118. #ifndef LibPpm
  119. #define LibPpm $(PPMDIR)/libppm.a
  120. #endif
  121. #ifndef LibPnm
  122. #define LibPnm $(PNMDIR)/libpnm.a
  123. #endif
  124. #ifndef LibTiff
  125. #define LibTiff $(TIFFDIR)/libtiff.a
  126. #endif
  127.  
  128. /* Dependency libraries: */
  129. #ifndef DepLibPbm
  130. #define DepLibPbm LibPbm
  131. #endif
  132. #ifndef DepLibPgm
  133. #define DepLibPgm LibPgm
  134. #endif
  135. #ifndef DepLibPpm
  136. #define DepLibPpm LibPpm
  137. #endif
  138. #ifndef DepLibPnm
  139. #define DepLibPnm LibPnm
  140. #endif
  141. #ifndef DepLibTiff
  142. #define DepLibTiff LibTiff
  143. #endif
  144.  
  145.    PBMPLUSDIR = PbmplusDir
  146. PBMPLUSBINDIR = PbmplusBinDir
  147. PBMPLUSMANDIR = PbmplusManDir
  148. PBMPLUSLIBDIR = PbmplusLibDir
  149. PBMPLUSINCDIR = PbmplusIncDir
  150.  
  151.        PBMDIR = PbmDir
  152.        PGMDIR = PgmDir
  153.        PPMDIR = PpmDir
  154.        PNMDIR = PnmDir
  155.       TIFFDIR = TiffDir
  156.  
  157.        LIBPBM = LibPbm
  158.        LIBPGM = LibPgm
  159.        LIBPPM = LibPpm
  160.        LIBPNM = LibPnm
  161.       LIBTIFF = LibTiff
  162.     DEPLIBPBM = DepLibPbm
  163.     DEPLIBPGM = DepLibPgm
  164.     DEPLIBPPM = DepLibPpm
  165.     DEPLIBPNM = DepLibPnm
  166.    DEPLIBTIFF = DepLibTiff
  167.  
  168. #if InstallMerged
  169.  
  170. #ifndef InstallPbmplusPrograms
  171. #define InstallPbmplusPrograms(list,dest,flags)                             @@\
  172. install:: list                                                              @@\
  173.     MakeDir($(DESTDIR)dest)                                             @@\
  174.     stamp-date                                                          @@\
  175.     @case '${MFLAGS}' in *[i]*) set +e;; esac; \                        @@\
  176.     for i in list; do \                                                 @@\
  177.         (set -x; cd $(DESTDIR)dest; $(RM) $$i;  \                   @@\
  178.         $(LN) $(MERGE) $$i); \                                      @@\
  179.     done
  180. #endif /* InstallPbmplusPrograms */
  181.  
  182. #ifndef NormalPbmplusProgramTarget
  183. #define NormalPbmplusProgramTarget(program)                                 @@\
  184. program.o: program.c                                                        @@\
  185.     ObjectCompile("-Dmain=$*_main")                                     @@\
  186.     LinkFile(program,$(MERGE))
  187. #endif /* NormalPbmplusProgramTarget */
  188.  
  189. #ifndef NormalPbmplusMathProgramTarget
  190. #define NormalPbmplusMathProgramTarget(program) \                           @@\
  191. NormalPbmplusProgramTarget(program)
  192. #endif /* NormalPbmplusMathProgramTarget */
  193.  
  194. #else
  195.  
  196. #ifndef NormalPbmplusProgramTarget
  197. #define NormalPbmplusProgramTarget(program) \                               @@\
  198. NormalProgramTarget(program,program.o,$(CURRENTDEPLIBS),$(CURRENTLIBS),)
  199. #endif /* NormalPbmplusProgramTarget */
  200.  
  201. #ifndef NormalPbmplusMathProgramTarget
  202. #define NormalPbmplusMathProgramTarget(program)                             @@\
  203. NormalProgramTarget(program,program.o,$(CURRENTDEPLIBS),$(CURRENTLIBS),-lm)
  204. #endif /* NormalPbmplusMathProgramTarget */
  205.  
  206. #ifndef InstallPbmplusPrograms
  207. #define InstallPbmplusPrograms(list,dest,flags)                             @@\
  208. install:: list                                                              @@\
  209.     MakeDir($(DESTDIR)dest)                                             @@\
  210.     @case '${MFLAGS}' in *[i]*) set +e;; esac; \                        @@\
  211.     for i in list; do \                                                 @@\
  212.         (set -x; $(RM) $(DESTDIR)dest/$$i; \                        @@\
  213.         $(INSTALL) -c flags $$i $(DESTDIR)dest); \                  @@\
  214.     done
  215. #endif /* InstallPbmplusPrograms */
  216.  
  217. #endif /* InstallMerged */
  218.