home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / xv221src / tiff / makefile < prev    next >
Encoding:
Makefile  |  1992-12-31  |  6.1 KB  |  210 lines

  1. #    $Header: /usr/people/sam/tiff/libtiff/RCS/Makefile.sun,v 1.36 92/02/19 14:25:29 sam Exp $
  2. #
  3. # Tag Image File Format Library
  4. #
  5. # Copyright (c) 1988, 1989, 1990, 1991, 1992 Sam Leffler
  6. # Copyright (c) 1991, 1992 Silicon Graphics, Inc.
  7. # Permission to use, copy, modify, distribute, and sell this software and 
  8. # its documentation for any purpose is hereby granted without fee, provided
  9. # that (i) the above copyright notices and this permission notice appear in
  10. # all copies of the software and related documentation, and (ii) the names of
  11. # Sam Leffler and Silicon Graphics may not be used in any advertising or
  12. # publicity relating to the software without the specific, prior written
  13. # permission of Stanford and Silicon Graphics.
  14. # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  15. # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  16. # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  17. # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  18. # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  19. # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  20. # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
  21. # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
  22. # OF THIS SOFTWARE.
  23. #
  24. DESTDIR=.
  25. #
  26. AR=    /djgpp/bin/ar
  27. RANLIB=    /djgpp/bin/ranlib
  28. NULL=
  29. CC = gcc
  30. IPATH=    -I.
  31. #
  32. # Library-wide configuration defines:
  33. #    MMAP_SUPPORT    add support for memory mapping read-only files
  34. #    COLORIMETRY_SUPPORT add support for 6.0 colorimetry tags
  35. #    JPEG_SUPPORT    add support for 6.0 JPEG tags & JPEG algorithms
  36. #    YCBCR_SUPPORT    add support for 6.0 YCbCr tags
  37. #    CMYK_SUPPORT    add support for 6.0 CMYK tags
  38. #
  39. # Compression configuration defines:
  40. #    CCITT_SUPPORT    add support for CCITT Group 3 & 4 algorithms
  41. #    PACKBITS_SUPPORT    add support for Macintosh PackBits algorithm
  42. #    LZW_SUPPORT    add support for LZW algorithm
  43. #    THUNDER_SUPPORT    add support for ThunderScan 4-bit RLE algorithm
  44. #    NEXT_SUPPORT    add support for NeXT 2-bit RLE algorithm
  45. #    JPEG_SUPPORT    add support for JPEG DCT algorithm
  46. #
  47. # Note that if you change the library-wide configuration, you'll
  48. # need to manual force a full rebuild.  Changing the configuration
  49. # of which compression algorithms are included in the library is
  50. # automatically handled (i.e. tif_comprs.o has a dependency on
  51. # the Makefile).
  52. #
  53. CONF_COMPRESSION=\
  54.     -DPACKBITS_SUPPORT \
  55.     -DLZW_SUPPORT \
  56.     -DCCITT_SUPPORT \
  57.     -DTHUNDER_SUPPORT  \
  58.     -DNEXT_SUPPORT  \
  59.         $(NULL)
  60. #CONF_LIBRARY=\
  61. #        -DUSE_VARARGS=1\
  62. #        -DUSE_PROTOTYPES=0\
  63. #        -DHAVE_IEEEFP=1 \
  64. #        -DCOLORIMETRY_SUPPORT \
  65. #        -DYCBCR_SUPPORT \
  66. #        $(NULL)
  67.  
  68. CONF_LIBRARY=\
  69.         -DUSE_VARARGS=0\
  70.         -DUSE_PROTOTYPES=1\
  71.     -DHAVE_IEEEFP=1 \
  72.     -DCOLORIMETRY_SUPPORT \
  73.     -DYCBCR_SUPPORT \
  74.         $(NULL)
  75.  
  76. CFLAGS= -O -fomit-frame-pointer -fstrength-reduce -finline-functions -DMSDOS -Dunix
  77. # $(IPATH) $(CONF_LIBRARY)
  78. # CFLAGS= -O -DMSDOS -Dunix $(IPATH) $(CONF_LIBRARY)
  79. .c.o:
  80.         echo $(CFLAGS) > barf.ccc
  81.         echo $(IPATH) >> barf.ccc
  82.         echo $(CONF_LIBRARY) >> barf.ccc
  83.         echo -c $*.c >> barf.ccc
  84.         $(CC) @barf.ccc
  85.  
  86.  
  87. #
  88. INCS=    tiff.h tiffio.h
  89. SRCS=    tif_fax3.c \
  90.     tif_fax4.c \
  91.     tif_aux.c \
  92.     tif_ccittrle.c \
  93.     tif_close.c \
  94.     tif_compat.c \
  95.     tif_cmpress.c \
  96.     tif_dir.c \
  97.     tif_dirinfo.c \
  98.     tif_dirread.c \
  99.     tif_dirwrite.c \
  100.     tif_dumpmode.c \
  101.     tif_error.c \
  102.     tif_getimage.c \
  103.     tif_jpeg.c \
  104.     tif_flush.c \
  105.     tif_lzw.c \
  106.     tif_next.c \
  107.     tif_open.c \
  108.     tif_packbits.c \
  109.     tif_print.c \
  110.     tif_read.c \
  111.     tif_swab.c \
  112.     tif_strip.c \
  113.     tif_thunder.c \
  114.     tif_tile.c \
  115.     tif_version.c \
  116.     tif_warning.c \
  117.     tif_write.c \
  118.         $(NULL)
  119.  
  120. OBJS=    tif_fax3.o \
  121.     tif_fax4.o \
  122.     tif_aux.o \
  123.     tif_ccittrle.o \
  124.     tif_close.o \
  125.     tif_compat.o \
  126.     tif_cmpress.o \
  127.     tif_dir.o \
  128.     tif_dirinfo.o \
  129.     tif_dirread.o \
  130.     tif_dirwrite.o \
  131.     tif_dumpmode.o \
  132.     tif_error.o \
  133.     tif_getimage.o \
  134.     tif_jpeg.o \
  135.     tif_flush.o \
  136.     tif_lzw.o \
  137.     tif_next.o \
  138.     tif_open.o \
  139.     tif_packbits.o \
  140.     tif_print.o \
  141.     tif_read.o \
  142.     tif_strip.o \
  143.     tif_swab.o \
  144.     tif_thunder.o \
  145.     tif_tile.o \
  146.     tif_version.o \
  147.     tif_warning.o \
  148.     tif_write.o \
  149.         $(NULL)
  150.  
  151. all:     libtiff.a
  152.  
  153. libtiff.a: g3states.h $(OBJS) libtiff.lnk
  154.         $(AR) rc @libtiff.lnk
  155.         $(RANLIB) libtiff.a
  156.  
  157. libtiff.lnk:
  158.         if exist libtiff.lnk del libtiff.lnk
  159.         echo libtiff.a >> libtiff.lnk
  160.         echo tif_fax3.o tif_fax4.o tif_aux.o tif_ccittrle.o >> libtiff.lnk
  161.         echo tif_close.o tif_compat.o tif_cmpress.o tif_dir.o >> libtiff.lnk
  162.         echo tif_dirinfo.o tif_dirread.o tif_dirwrite.o >> libtiff.lnk
  163.         echo tif_dumpmode.o tif_error.o tif_getimage.o >> libtiff.lnk
  164.         echo tif_jpeg.o tif_flush.o tif_lzw.o tif_next.o >> libtiff.lnk
  165.         echo tif_open.o tif_packbits.o tif_print.o tif_read.o >> libtiff.lnk
  166.         echo tif_strip.o tif_swab.o tif_thunder.o tif_tile.o >> libtiff.lnk
  167.         echo tif_version.o tif_warning.o tif_write.o >> libtiff.lnk
  168.  
  169.  
  170. $(OBJS): tiffio.h tiff.h tiffcompat.h tiffioP.h
  171.  
  172. tif_cmpress.o: tif_cmpress.c Makefile
  173.         echo $(CFLAGS) > barf.ccc
  174.         echo $(CONF_COMPRESSION) >> barf.ccc
  175.         echo $(CONF_LIBRARY) >> barf.ccc
  176.         echo -c tif_cmpress.c >> barf.ccc
  177.         $(CC) @barf.ccc
  178.  
  179. #tif_fax3.o: tif_fax3.c g3states.h t4.h tif_fax3.h
  180.  
  181. g3states.h: mkg3states.c t4.h
  182.         echo $(CFLAGS) > barf.ccc
  183.         echo $(IPATH) >> barf.ccc
  184.         echo $(CONF_LIBRARY) >> barf.ccc
  185.         echo -o mkg3states mkg3states.c >> barf.ccc
  186.         $(CC) @barf.ccc
  187.         go32 ./mkg3states > g3states.h
  188.  
  189. install: all installh
  190.         -for i in $(ALL); do \
  191.                 $(INSTALL) -c -m 644 $$i $(DESTDIR)/lib/$$i; \
  192.                 $(RANLIB) $(DESTDIR)/lib/$$i; \
  193.     done
  194.  
  195. installh: $(INCS)
  196.         -for i in $(INCS); do \
  197.         h=`basename $$i`; \
  198.             cmp -s $$i $(DESTDIR)/include/$$h || \
  199.                 $(INSTALL) -c -m 444 $$i $(DESTDIR)/include/$$h; \
  200.     done
  201.  
  202. clean:
  203.         rm -f $(ALL) $(OBJS) core a.out mkg3states g3states.h
  204.  
  205. tags:   $(SRCS)
  206.         $(CTAGS) $(SRCS)
  207.