home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilsm / netpbmsca / mf_unx < prev   
Encoding:
Text File  |  1993-11-29  |  5.8 KB  |  135 lines

  1. # Makefile for pbmplus tools.
  2. #
  3. # Copyright (C) 1989, 1991 by Jef Poskanzer.
  4. #
  5. # Permission to use, copy, modify, and distribute this software and its
  6. # documentation for any purpose and without fee is hereby granted, 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.  This software is provided "as is" without express or
  10. # implied warranty.
  11.  
  12. # CONFIGURE: gcc makes things go faster on some machines, but not everyone
  13. # has it.  Warning: do not use gcc's -finline-functions or -fstrength-reduce
  14. # flags, they can produce incorrect code.  (This is with gcc versions 1.35,
  15. # 1.36, and 1.37, later versions may fix these bugs.)  Also, on some systems
  16. # gcc can't compile pnmconvol - dunno why.  And on some systems you can't
  17. # use the -ansi flag, it gives compilation errors in <math.h>.
  18. #CC =        cc
  19. CC =        gcc
  20. #CC =        gcc -fcombine-regs -fpcc-struct-return
  21. #CC =        gcc -ansi -pedantic -fcombine-regs -fpcc-struct-return
  22.  
  23. # CONFIGURE: cc flags go here.
  24. CFLAGS =    -O
  25. #CFLAGS =    -g
  26. #CFLAGS =    -g -O
  27.  
  28. # CONFIGURE: ld flags go here.  Eunice users may want to use -noshare so that
  29. # the binaries can run standalone.
  30. LDFLAGS =    -s
  31. #LDFLAGS =    
  32. #LDFLAGS =    -noshare
  33.  
  34. # CONFIGURE: PBMPLUS's support for TIFF files depends on the library from
  35. # Sam Leffler's TIFF Software package - see the OTHER.SYSTEMS file for a
  36. # full description and access information.  To configure PBMPLUS to use the
  37. # library: first, if necessary, fetch the TIFF Software, unpack it in a
  38. # scratch directory somewhere, and move the libtiff subdirectory right here
  39. # into the PBMPLUS top-level directory.  Configure and "make" in the
  40. # libtiff directory.  Yes, you do have to do the TIFF make by hand, the
  41. # general PBMPLUS make will *not* make libtiff.  Finally, uncomment the
  42. # following five definitions.
  43. #
  44. # Libtiff is pretty good about portability, but there are some machines
  45. # it has problems on.  If you run into problems, you may wish to contact
  46. # Sam directly, at the address listed in the OTHER.SYSTEMS file.
  47. #
  48. # By the way, you must have at least version 2.4 of libtiff.  Earlier
  49. # versions will not work.
  50. TIFFDEF =    -DLIBTIFF
  51. TIFFINC =    -I../libtiff
  52. TIFFLIB =    ../libtiff/libtiff.a
  53. TIFFBINARIES =    tifftopnm pnmtotiff
  54. TIFFOBJECTS =    tifftopnm.o pnmtotiff.o
  55.  
  56. # CONFIGURE: Define the directory that you want the binaries copied to.
  57. # If you need scripts and binaries to be in different directories, you
  58. # can set that up too.
  59. INSTALLBINARIES =    /usr/local/netpbm
  60. INSTALLSCRIPTS =    $(INSTALLBINARIES)
  61.  
  62. # CONFIGURE: Define the directories that you want the manual sources copied to,
  63. # plus the suffix you want them to have.
  64. INSTALLMANUALS1 =    /usr/local/man/man1
  65. SUFFIXMANUALS1 =    1
  66. INSTALLMANUALS3 =    /usr/local/man/man3
  67. SUFFIXMANUALS3 =    3
  68. INSTALLMANUALS5 =    /usr/local/man/man5
  69. SUFFIXMANUALS5 =    5
  70.  
  71. # CONFIGURE: Normally the man pages are installed using "cp".  By changing
  72. # this define you can use something else, for example a script that calls
  73. # compress or pack. The ../mantocat is used on systems which use man pages
  74. # in the "cat" format.
  75. MANCP =            cp
  76. #MANCP =        ../mantocat
  77.  
  78. # CONFIGURE: Normally the Makefiles build and install separate binaries for
  79. # each program.  However, on some systems (especially those without shared
  80. # libraries) this can mean a lot of space.  In this case you might try
  81. # building a "merge" instead.  The idea here is to link all the binaries
  82. # together into one huge executable, with a tiny dispatch program as the
  83. # main.  Then the merged binary is installed with file-system links for
  84. # each program it includes.  The dispatch routine can tell which program
  85. # to run by looking at argv[0].  On a Sun3 under SunOS 3.5 the space for
  86. # executables went from 2.9 meg to .36 meg.
  87. #
  88. # Note that if you make a "merge", the executables don't get created
  89. # until you do the install.
  90. #all:        binaries
  91. #install:    install.bin install.man
  92. all:        merge
  93. install:    install.merge install.man
  94.  
  95. # End of configurable definitions.
  96.  
  97. SHELL =        /bin/sh
  98. MAKE =        make
  99. SUBDIRS =    pbm pgm ppm pnm
  100.  
  101. binaries:
  102.     ./stamp-date
  103.     for i in $(SUBDIRS) ; do \
  104.         ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' binaries ); \
  105.     done
  106.  
  107. merge:
  108.     ./stamp-date
  109.     for i in $(SUBDIRS) ; do \
  110.         ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' merge ); \
  111.     done
  112.  
  113. install.bin:
  114.     -mkdir $(INSTALLBINARIES)
  115.     for i in $(SUBDIRS) ; do \
  116.         ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' 'INSTALLSCRIPTS=$(INSTALLSCRIPTS)' install.bin ); \
  117.     done
  118.  
  119. install.merge:
  120.     -mkdir $(INSTALLBINARIES)
  121.     for i in $(SUBDIRS) ; do \
  122.         ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' 'INSTALLSCRIPTS=$(INSTALLSCRIPTS)' install.merge ); \
  123.     done
  124.  
  125. install.man:
  126.     for i in $(SUBDIRS) ; do \
  127.         ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'TIFFBINARIES=$(TIFFBINARIES)' 'INSTALLMANUALS1=$(INSTALLMANUALS1)' 'SUFFIXMANUALS1=$(SUFFIXMANUALS1)' 'INSTALLMANUALS3=$(INSTALLMANUALS3)' 'SUFFIXMANUALS3=$(SUFFIXMANUALS3)' 'INSTALLMANUALS5=$(INSTALLMANUALS5)' 'SUFFIXMANUALS5=$(SUFFIXMANUALS5)' 'MANCP=$(MANCP)' install.man ); \
  128.     done
  129.  
  130. clean:
  131.     rm -f *.shar *.shar? art.* compile.h *~
  132.     for i in $(SUBDIRS) libtiff ; do \
  133.         ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) clean ); \
  134.     done
  135.