home *** CD-ROM | disk | FTP | other *** search
/ Practical Algorithms for Image Analysis / Practical Algorithms for Image Analysis.iso / TARFILE.GZ / tarfile / libtiff / contrib / dosdjgpp / Makefile.tools < prev    next >
Encoding:
Makefile  |  1999-09-11  |  5.9 KB  |  218 lines

  1. #    $Header: /usr/people/sam/tiff/tools/RCS/Makefile.in,v 1.17 1996/02/09 05:55:00 sam Exp $
  2. #
  3. # manually derived from Makefile.in for DJGPP v2.x (GNU C for DOS/386).
  4. #
  5. # TIFF Library Tools
  6. #
  7. # Copyright (c) 1988-1996 Sam Leffler
  8. # Copyright (c) 1991-1996 Silicon Graphics, Inc.
  9. # Permission to use, copy, modify, distribute, and sell this software and 
  10. # its documentation for any purpose is hereby granted without fee, provided
  11. # that (i) the above copyright notices and this permission notice appear in
  12. # all copies of the software and related documentation, and (ii) the names of
  13. # Sam Leffler and Silicon Graphics may not be used in any advertising or
  14. # publicity relating to the software without the specific, prior written
  15. # permission of Stanford and Silicon Graphics.
  16. # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  17. # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  18. # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  19. # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  20. # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  21. # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  22. # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
  23. # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
  24. # OF THIS SOFTWARE.
  25. #
  26. DEPTH    = ..
  27. SRCDIR    = .
  28. LIBDIR    = ${DEPTH}/libtiff
  29.  
  30. NULL    =
  31. CC    = gcc
  32. #
  33. COPTS    = 
  34. OPTIMIZER=-O
  35. IPATH    = -I. -I${SRCDIR} -I${LIBDIR}
  36. CFLAGS    = ${COPTS} ${OPTIMIZER} ${IPATH}
  37. #
  38. LIBTIFF    = ${DEPTH}/libtiff/libtiff.a
  39. LIBJPEG    = #@LIBJPEG@
  40. LIBGZ    = #@LIBGZ@
  41. LIBS    = ${LIBTIFF} ${LIBJPEG} ${LIBGZ}
  42. #
  43. OBJS=    \
  44.     fax2tiff.o \
  45.     fax2ps.o \
  46.     gif2tiff.o \
  47.     pal2rgb.o \
  48.     ppm2tiff.o \
  49.     rgb2ycbcr.o \
  50.     ras2tiff.o \
  51.     thumbnail.o \
  52.     tiff2bw.o \
  53.     tiff2ps.o \
  54.     tiffcmp.o \
  55.     tiffcp.o \
  56.     tiffdither.o \
  57.     tiffdump.o \
  58.     tiffinfo.o \
  59.     tiffmedian.o \
  60.     tiffsplit.o \
  61.     ${NULL}
  62. TARGETS    =\
  63.     fax2tiff \
  64.     fax2ps \
  65.     gif2tiff \
  66.     pal2rgb \
  67.     ppm2tiff \
  68.     rgb2ycbcr \
  69.     thumbnail \
  70.     ras2tiff \
  71.     tiff2bw \
  72.     tiff2ps \
  73.     tiffcmp \
  74.     tiffcp \
  75.     tiffdither \
  76.     tiffdump \
  77.     tiffinfo \
  78.     tiffmedian \
  79.     tiffsplit \
  80.     ${NULL}
  81.  
  82. all:    ${TARGETS}
  83.  
  84. clean:
  85.     rm -f ${TARGETS} ${addsuffix .exe, ${TARGETS}} ${OBJS}
  86.     rm -f sgigt.o tiffgt sgisv.o tiffsv sgi2tiff.o sgi2tiff ycbcr 
  87.  
  88. #
  89. # System-independent tools
  90. #
  91.  
  92. tiffinfo: tiffinfo.o ${LIBTIFF}
  93.     ${CC} -o tiffinfo ${CFLAGS} tiffinfo.o ${LIBS}
  94. tiffinfo.o: ${SRCDIR}/tiffinfo.c
  95.     ${CC} -c ${CFLAGS} ${SRCDIR}/tiffinfo.c
  96.  
  97. tiffcmp:tiffcmp.o ${LIBTIFF}
  98.     ${CC} -o tiffcmp ${CFLAGS} tiffcmp.o ${LIBS}
  99. tiffcmp.o: ${SRCDIR}/tiffcmp.c
  100.     ${CC} -c ${CFLAGS} ${SRCDIR}/tiffcmp.c
  101.  
  102. tiffcp:    tiffcp.o ${LIBTIFF}
  103.     ${CC} -o tiffcp ${CFLAGS} tiffcp.o ${LIBS}
  104. tiffcp.o: ${SRCDIR}/tiffcp.c
  105.     ${CC} -c ${CFLAGS} ${SRCDIR}/tiffcp.c
  106.  
  107. tiffdump: tiffdump.o
  108.     ${CC} -o tiffdump ${CFLAGS} tiffdump.o ${LIBS}
  109. tiffdump.o: ${SRCDIR}/tiffdump.c
  110.     ${CC} -c ${CFLAGS} ${SRCDIR}/tiffdump.c
  111.  
  112. tiffmedian: tiffmedian.o ${LIBTIFF}
  113.     ${CC} -o tiffmedian ${CFLAGS} tiffmedian.o ${LIBS}
  114. tiffmedian.o: ${SRCDIR}/tiffmedian.c
  115.     ${CC} -c ${CFLAGS} ${SRCDIR}/tiffmedian.c
  116.  
  117. tiffsplit: tiffsplit.o ${LIBTIFF}
  118.     ${CC} -o tiffsplit ${CFLAGS} tiffsplit.o ${LIBS}
  119. tiffsplit.o: ${SRCDIR}/tiffsplit.c
  120.     ${CC} -c ${CFLAGS} ${SRCDIR}/tiffsplit.c
  121.  
  122. tiff2ps: tiff2ps.o ${LIBTIFF}
  123.     ${CC} -o tiff2ps ${CFLAGS} tiff2ps.o ${LIBS}
  124. tiff2ps.o: ${SRCDIR}/tiff2ps.c
  125.     ${CC} -c ${CFLAGS} ${SRCDIR}/tiff2ps.c
  126.  
  127. #
  128. # Junky stuff... programs that are more examples of how
  129. # to use the library than full-blown useful tools.
  130. #
  131.  
  132. # convert RGB image to B&W
  133. tiff2bw: tiff2bw.o ${LIBTIFF}
  134.     ${CC} -o tiff2bw ${CFLAGS} tiff2bw.o ${LIBS}
  135. tiff2bw.o: ${SRCDIR}/tiff2bw.c
  136.     ${CC} -c ${CFLAGS} ${SRCDIR}/tiff2bw.c
  137.  
  138. # convert B&W image to bilevel w/ FS dithering
  139. tiffdither: tiffdither.o ${LIBTIFF}
  140.     ${CC} -o tiffdither ${CFLAGS} tiffdither.o ${LIBS}
  141. tiffdither.o: ${SRCDIR}/tiffdither.c
  142.     ${CC} -c ${CFLAGS} ${SRCDIR}/tiffdither.c
  143.  
  144. # simple Sun rasterfile converter
  145. ras2tiff: ras2tiff.o ${LIBTIFF}
  146.     ${CC} -o ras2tiff ${CFLAGS} ras2tiff.o ${LIBS}
  147. ras2tiff.o: ${SRCDIR}/ras2tiff.c
  148.     ${CC} -c ${CFLAGS} ${SRCDIR}/ras2tiff.c
  149.  
  150. # simple GIF converter
  151. gif2tiff: gif2tiff.o ${LIBTIFF}
  152.     ${CC} -o gif2tiff ${CFLAGS} gif2tiff.o ${LIBS}
  153. gif2tiff.o: ${SRCDIR}/gif2tiff.c
  154.     ${CC} -c ${CFLAGS} ${SRCDIR}/gif2tiff.c
  155.  
  156. # very limited PBM converter
  157. ppm2tiff: ppm2tiff.o ${LIBTIFF}
  158.     ${CC} -o ppm2tiff ${CFLAGS} ppm2tiff.o ${LIBS}
  159. ppm2tiff.o: ${SRCDIR}/ppm2tiff.c
  160.     ${CC} -c ${CFLAGS} ${SRCDIR}/ppm2tiff.c
  161.  
  162. # Group 3/4 FAX file converter
  163. fax2tiff: fax2tiff.o ${LIBTIFF}
  164.     ${CC} -o fax2tiff ${CFLAGS} fax2tiff.o ${LIBS}
  165. fax2tiff.o: ${SRCDIR}/fax2tiff.c
  166.     ${CC} -c -I${LIBDIR} -I${DEPTH}/libtiff ${CFLAGS} ${SRCDIR}/fax2tiff.c
  167.  
  168. # Group 3/4 FAX to encoded PS converter
  169. fax2ps: fax2ps.o ${LIBTIFF}
  170.     ${CC} -o fax2ps ${CFLAGS} fax2ps.o ${LIBS}
  171. fax2ps.o: ${SRCDIR}/fax2ps.c
  172.     ${CC} -c ${CFLAGS} ${SRCDIR}/fax2ps.c
  173.  
  174. # convert Palette image to RGB
  175. pal2rgb: pal2rgb.o ${LIBTIFF}
  176.     ${CC} -o pal2rgb ${CFLAGS} pal2rgb.o ${LIBS}
  177. pal2rgb.o: ${SRCDIR}/pal2rgb.c
  178.     ${CC} -c ${CFLAGS} ${SRCDIR}/pal2rgb.c
  179.  
  180. # convert RGB image to YCbCr
  181. rgb2ycbcr: rgb2ycbcr.o ${LIBTIFF}
  182.     ${CC} -o rgb2ycbcr ${CFLAGS} rgb2ycbcr.o ${LIBS}
  183. rgb2ycbcr.o: ${SRCDIR}/rgb2ycbcr.c
  184.     ${CC} -c ${CFLAGS} ${SRCDIR}/rgb2ycbcr.c
  185.  
  186. # generate thumbnail images from fax (example of SubIFD usage)
  187. thumbnail: thumbnail.o ${LIBTIFF}
  188.     ${CC} -o thumbnail ${CFLAGS} thumbnail.o ${LIBS}
  189. thumbnail.o: ${SRCDIR}/thumbnail.c
  190.     ${CC} -c ${CFLAGS} ${SRCDIR}/thumbnail.c
  191.  
  192. #
  193. # System-specific tools.
  194. #
  195.  
  196. #
  197. # sgi2tiff converts SGI RGB images to TIFF; it requires
  198. # the SGI image library -limage.
  199. #
  200. sgi2tiff: sgi2tiff.o ${LIBTIFF}
  201.     ${CC} -o sgi2tiff ${CFLAGS} sgi2tiff.o -limage ${LIBS}
  202. sgi2tiff.o: ${SRCDIR}/sgi2tiff.c
  203.     ${CC} -c ${CFLAGS} ${SRCDIR}/sgi2tiff.c
  204.  
  205. # SGI versions of tiffgt & tiffsv that require -lgl
  206. tiffgt:    sgigt.o ${LIBTIFF}
  207.     ${CC} -o tiffgt ${CFLAGS} sgigt.o ${LIBS} -lgutil -lgl_s
  208. sgigt.o: ${SRCDIR}/sgigt.c
  209.     ${CC} -c ${CFLAGS} ${SRCDIR}/sgigt.c
  210.  
  211. tiffsv:    sgisv.o ${LIBTIFF}
  212.     ${CC} -o tiffsv ${CFLAGS} sgisv.o ${LIBS} -lgutil -lgl_s
  213. sgisv.o: ${SRCDIR}/sgisv.c
  214.     ${CC} -c ${CFLAGS} ${SRCDIR}/sgisv.c
  215.