home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / xloadimg.zip / xloadimage.4.1 / tiff / Makefile.aix < prev    next >
Makefile  |  1993-10-21  |  7KB  |  234 lines

  1. #    $Header: /usr/people/sam/tiff/libtiff/RCS/Makefile.aix,v 1.13 92/03/18 12:11:22 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. # This Makefile is designed for IBM RS6000, AIX 3.x.
  25. # Check up the CONFIGURE: comments for AIX 2.2.1 and building shared library
  26. #
  27. # The library will be installed in $(DESTDIR)/lib and the included
  28. # files in $(DESTDIR)/include
  29. DESTDIR=/usr/local
  30. #
  31. AR=    /bin/ar
  32. #
  33. # SHELL, CTAGS, RANLIB and INSTALL is not defined in standard make for AIX
  34. #
  35. #    CONFIGURE: AIX2.2.1 "RANLIB=echo ranlib"
  36. #        ( ranlib for AIX3.x is for compatibility only )
  37. RANLIB=/usr/bin/ranlib
  38. SHELL=/bin/sh
  39. #    CONFIGURE: AIX2.2.1 "CTAGS=ctags -w"
  40. CTAGS=ctags -tw
  41. #
  42. # NOTE: The AIX versions of install is execute by root only, or SYSV versions.
  43. #    CONFIGURE: (The /bin/cp variant should work on both 2.2 and 3.x)
  44. # INSTALL=/usr/ucb/install -c -m 444
  45. INSTALL=/bin/cp
  46. #
  47. NULL=
  48.  
  49. IPATH=    -I.
  50. #
  51. # Library-wide configuration defines:
  52. #    MMAP_SUPPORT    add support for memory mapping read-only files
  53. #    COLORIMETRY_SUPPORT add support for 6.0 colorimetry tags
  54. #    JPEG_SUPPORT    add support for 6.0 JPEG tags & JPEG algorithms
  55. #    YCBCR_SUPPORT    add support for 6.0 YCbCr tags
  56. #    CMYK_SUPPORT    add support for 6.0 CMYK tags
  57. #
  58. # Compression configuration defines:
  59. #    CCITT_SUPPORT    add support for CCITT Group 3 & 4 algorithms
  60. #    PACKBITS_SUPPORT    add support for Macintosh PackBits algorithm
  61. #    LZW_SUPPORT    add support for LZW algorithm
  62. #    THUNDER_SUPPORT    add support for ThunderScan 4-bit RLE algorithm
  63. #    NEXT_SUPPORT    add support for NeXT 2-bit RLE algorithm
  64. #    JPEG_SUPPORT    add support for JPEG DCT algorithm
  65. #
  66. # Note that if you change the library-wide configuration, you'll
  67. # need to manual force a full rebuild.  Changing the configuration
  68. # of which compression algorithms are included in the library is
  69. # automatically handled (i.e. tif_compress.o has a dependency on
  70. # the Makefile).
  71. #
  72. # CONFIGURE:
  73. CONF_COMPRESSION=\
  74.     -DPACKBITS_SUPPORT \
  75.     -DLZW_SUPPORT \
  76.     -DCCITT_SUPPORT \
  77.     -DTHUNDER_SUPPORT  \
  78.     -DNEXT_SUPPORT  \
  79.     ${NULL}
  80. #
  81. # CONFIGURE: AIX 3.2    : add -DMMAP_SUPPORT (?)
  82. #            AIX 2.1.1    : -DUSE_VARARGS=1 -DUSE_PROTOTYPES=0 -DUSE_CONST=0
  83. CONF_LIBRARY=\
  84.     -DUSE_VARARGS=0 \
  85.     -DUSE_PROTOTYPES=1 \
  86.     -DUSE_CONST=1 \
  87.     -DHAVE_IEEEFP=1 \
  88.     -DCOLORIMETRY_SUPPORT \
  89.     -DJPEG_SUPPORT \
  90.     -DYCBCR_SUPPORT \
  91.     -DCMYK_SUPPORT \
  92.     ${NULL}
  93. CFLAGS=    -O -Dunix ${SHLIB_FLAGS} ${IPATH} ${CONF_LIBRARY}
  94. #
  95. INCS=    tiff.h tiffio.h
  96. SRCS=    tif_fax3.c \
  97.     tif_fax4.c \
  98.     tif_aux.c \
  99.     tif_ccittrle.c \
  100.     tif_close.c \
  101.     tif_compat.c \
  102.     tif_compress.c \
  103.     tif_dir.c \
  104.     tif_dirinfo.c \
  105.     tif_dirread.c \
  106.     tif_dirwrite.c \
  107.     tif_dumpmode.c \
  108.     tif_error.c \
  109.     tif_getimage.c \
  110.     tif_jpeg.c \
  111.     tif_flush.c \
  112.     tif_lzw.c \
  113.     tif_next.c \
  114.     tif_open.c \
  115.     tif_packbits.c \
  116.     tif_print.c \
  117.     tif_read.c \
  118.     tif_swab.c \
  119.     tif_strip.c \
  120.     tif_thunder.c \
  121.     tif_tile.c \
  122.     tif_version.c \
  123.     tif_warning.c \
  124.     tif_write.c \
  125.     ${NULL}
  126. OBJS=    tif_fax3.o \
  127.     tif_fax4.o \
  128.     tif_aux.o \
  129.     tif_ccittrle.o \
  130.     tif_close.o \
  131.     tif_compat.o \
  132.     tif_compress.o \
  133.     tif_dir.o \
  134.     tif_dirinfo.o \
  135.     tif_dirread.o \
  136.     tif_dirwrite.o \
  137.     tif_dumpmode.o \
  138.     tif_error.o \
  139.     tif_getimage.o \
  140.     tif_jpeg.o \
  141.     tif_flush.o \
  142.     tif_lzw.o \
  143.     tif_next.o \
  144.     tif_open.o \
  145.     tif_packbits.o \
  146.     tif_print.o \
  147.     tif_read.o \
  148.     tif_strip.o \
  149.     tif_swab.o \
  150.     tif_thunder.o \
  151.     tif_tile.o \
  152.     tif_version.o \
  153.     tif_warning.o \
  154.     tif_write.o \
  155.     ${NULL}
  156.  
  157. # CONFIGURE: Compile libtiff as a Shared Library
  158. # Remove the comment if you want to build libtiff as a shared library:
  159. #
  160. #SHLIB_FLAGS=    -bM\:SRE
  161.  
  162. #
  163. ALL=    libtiff.a
  164.  
  165. all:     ${ALL}
  166.  
  167. ${ALL}:    ${OBJS}
  168.     @if [ -n "$(SHLIB_FLAGS)" ]; then \
  169.         echo "\n\tBuilding $@ as a shared libary, assumes that" ;\
  170.         echo "\t\tall .o files is compiled with $(SHLIB_FLAGS).\n" ;\
  171.         set -x ;\
  172.         rm -f $@~ ; \
  173.         $(AR) clq $@~ $(OBJS) ;\
  174.         dump -g $@~ | sed -n -e 's/^[     ]*[0-9][0-9]*[     ]*\([^     .][^     ]*\)$$/\1/p' > $@.syms ;\
  175.         $(LD) -o shr.o $@~ -H512 -T512 -bM\:SRE -bE\:$@.syms -lc -lm ;\
  176.         rm -f $@~ ;\
  177.         $(AR) clq $@~ shr.o ;\
  178.         rm -f $@.syms $@ shr.o ;\
  179.         mv $@~ $@ ;\
  180.     else \
  181.         echo "\t${AR} rc libtiff.a $?" ;\
  182.         ${AR} rc libtiff.a $? ;\
  183.     fi
  184.     #    ranlib for AIX is for compatibility only
  185.     # ${RANLIB} libtiff.a
  186.  
  187. ${OBJS}: tiffio.h tiff.h tiffcompat.h tiffioP.h
  188. tif_compress.o: tif_compress.c Makefile
  189.     ${CC} -c ${CFLAGS} ${CONF_COMPRESSION} tif_compress.c
  190. tif_fax3.o: tif_fax3.c g3states.h t4.h tif_fax3.h
  191.  
  192. # CONFIGURE: Remove '-c' in AIX 2.1.1
  193. g3states.h: mkg3states.c t4.h
  194.     ${CC} -o mkg3states ${CFLAGS} mkg3states.c
  195.     ./mkg3states -c > g3states.h
  196.  
  197. install: all installh
  198.     -test -d ${DESTDIR}/lib || mkdir ${DESTDIR}/lib
  199.     -@for i in ${ALL}; do \
  200.         if cmp -s $$i ${DESTDIR}/lib/$$i ; then \
  201.         echo "${DESTDIR}/lib/$$i is up to date" ; \
  202.         else \
  203.         rm -f ${DESTDIR}/lib/$$i ;\
  204.             echo "    ${INSTALL} $$i ${DESTDIR}/lib/$$i" ; \
  205.             ${INSTALL} $$i ${DESTDIR}/lib/$$i; \
  206.         fi \
  207.     done
  208.     #    ranlib for AIX is for compatibility only
  209.     # ${RANLIB} -t ${DESTDIR}/lib/libtiff.a
  210.  
  211. installh: ${INCS}
  212.     -test -d ${DESTDIR}/include || mkdir ${DESTDIR}/include
  213.     -@for i in ${INCS}; do \
  214.         h=`basename $$i`; \
  215.         if cmp -s $$i ${DESTDIR}/include/$$h ; then \
  216.         echo "${DESTDIR}/include/$$h is up to date" ; \
  217.         else \
  218.         rm -f ${DESTDIR}/include/$$h ;\
  219.             echo "    ${INSTALL} $$i ${DESTDIR}/include/$$h" ; \
  220.             ${INSTALL} $$i ${DESTDIR}/include/$$h; \
  221.         fi \
  222.     done
  223.  
  224. clean:
  225.     rm -f ${ALL} ${OBJS} core a.out mkg3states g3states.h err errs
  226.  
  227. tags:    ${SRCS}
  228.     ${CTAGS} ${SRCS}
  229.  
  230. # EOF
  231.