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