home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilsm / netpbmsca / pnm / Makefile next >
Encoding:
Makefile  |  1994-02-22  |  5.2 KB  |  145 lines

  1. # Makefile for pnm 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. EQ= =
  13.  
  14. CC =        gcc
  15. CFLAGS =    -O2 -DARCH
  16. TIFFDEF =    -DLIBTIFF
  17. TIFFINC =       -I^.libtiff
  18. TIFFLIB =       ^.libtiff.libtiff
  19. TIFFBINARIES =  tifftopnm pnmtotiff
  20. TIFFOBJECTS =   o.tifftopnm o.pnmtotiff
  21. LDFLAGS =    
  22.  
  23. PPMDIR =    ^.ppm
  24. INCLUDEPPM =    -I$(PPMDIR)
  25. LIBPPM =    $(PPMDIR).libppm
  26. DEFPPM =    $(PPMDIR).h.ppm
  27. DEFLIBPPM =    $(PPMDIR).h.libppm
  28.  
  29. PGMDIR =    ^.pgm
  30. INCLUDEPGM =    -I$(PGMDIR)
  31. LIBPGM =    $(PGMDIR).libpgm
  32. DEFPGM =    $(PGMDIR).h.pgm
  33. DEFLIBPGM =    $(PGMDIR).h.libpgm
  34.  
  35. PBMDIR =    ^.pbm
  36. INCLUDEPBM =    -I$(PBMDIR)
  37. LIBPBM =    $(PBMDIR).libpbm
  38. DEFPBM =    $(PBMDIR).h.pbm ^.h.pbmplus
  39. DEFLIBPBM =    $(PBMDIR).h.libpbm
  40.  
  41. INCLUDE =    -I^ $(INCLUDEPPM) $(INCLUDEPGM) $(INCLUDEPBM)
  42. ALLCFLAGS =    $(CFLAGS) $(INCLUDE) $(TIFFDEF) $(TIFFINC)
  43. LIBPNM =    libpnm
  44.  
  45. PORTOBJECTS =    o.giftopnm \
  46.         o.pnmarith o.pnmcat o.pnmcomp o.pnmconvol o.pnmcrop o.pnmcut \
  47.         o.pnmdepth o.pnmenlarge o.pnmfile o.pnmflip o.pnmhistmap \
  48.         o.pnminvert o.pnmnoraw o.pnmpad o.pnmpaste \
  49.         o.pnmtile o.pnmtoddif o.pnmtops o.pnmtorast \
  50.         o.pnmtosir o.pnmtoxwd \
  51.         o.rasttopnm o.sirtopnm o.xwdtopnm o.zeisstopnm \
  52.         o.pnmgamma o.pnmnlfilt o.pnmrotate o.pnmscale o.pnmshear
  53. OBJECTS =    $(PORTOBJECTS) $(TIFFOBJECTS)
  54.  
  55. all:        merge
  56.  
  57. merge:        pnmmerge
  58. pnmmerge:    c.pnmmerge $(OBJECTS) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM)
  59.     $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c o.* $(LIBPPM) $(LIBPGM) $(LIBPBM) $(TIFFLIB)
  60.  
  61. lib:        $(LIBPNM)
  62. $(LIBPNM):    o.libpnm1 o.libpnm2 o.libpnm3 o.libpnm4
  63.     libfile -co libpnm $^
  64.  
  65. o.libpnm1:    h.pnm $(DEFPPM) $(DEFPGM) $(DEFPBM) c.libpnm1
  66.     $(CC) $(ALLCFLAGS) -c libpnm1.c
  67. o.libpnm2:    h.pnm $(DEFPPM) $(DEFPGM) $(DEFPBM) c.libpnm2 $(DEFLIBPPM) \
  68.         $(DEFLIBPGM) $(DEFLIBPBM)
  69.     $(CC) $(ALLCFLAGS) -c libpnm2.c
  70. o.libpnm3:    h.pnm $(DEFPPM) $(DEFPGM) $(DEFPBM) c.libpnm3 $(DEFLIBPPM) \
  71.         $(DEFLIBPGM) $(DEFLIBPBM)
  72.     $(CC) $(ALLCFLAGS) -c libpnm3.c
  73. o.libpnm4:    h.pnm $(DEFPPM) $(DEFPGM) $(DEFPBM) h.rast c.libpnm4
  74.     $(CC) $(ALLCFLAGS) -c libpnm4.c
  75.  
  76. # Other dependencies.
  77. o.pnmnlfilt:        c.pnmnlfilt
  78.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)$(basename $@)_main bughuge.c -o $@
  79.     #$(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmnlfilt_main pnmnlfilt.c
  80. o.giftopnm:        c.giftopnm
  81.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)giftopnm_main giftopnm.c
  82. o.pnmarith:        c.pnmarith
  83.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmarith_main pnmarith.c
  84. o.pnmcat:        c.pnmcat
  85.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmcat_main pnmcat.c
  86. o.pnmcomp:        c.pnmcomp
  87.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmcomp_main pnmcomp.c
  88. o.pnmconvol:        c.pnmconvol
  89.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmconvol_main pnmconvol.c
  90. o.pnmcrop:        c.pnmcrop
  91.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmcrop_main pnmcrop.c
  92. o.pnmcut:        c.pnmcut
  93.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmcut_main pnmcut.c
  94. o.pnmdepth:        c.pnmdepth
  95.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmdepth_main pnmdepth.c
  96. o.pnmenlarge:    c.pnmenlarge
  97.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmenlarge_main pnmenlarge.c
  98. o.pnmfile:        c.pnmfile
  99.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmfile_main pnmfile.c
  100. o.pnmflip:        c.pnmflip
  101.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmflip_main pnmflip.c
  102. o.pnmgamma:        c.pnmgamma
  103.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmgamma_main pnmgamma.c
  104. o.pnmhistmap:    c.pnmhistmap
  105.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmhistmap_main pnmhistmap.c
  106. o.pnminvert:        c.pnminvert
  107.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnminvert_main pnminvert.c
  108. o.pnmnoraw:        c.pnmnoraw
  109.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmnoraw_main pnmnoraw.c
  110. o.pnmpad:        c.pnmpad
  111.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmpad_main pnmpad.c
  112. o.pnmpaste:        c.pnmpaste
  113.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmpaste_main pnmpaste.c
  114. o.pnmrotate:        c.pnmrotate
  115.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmrotate_main pnmrotate.c
  116. o.pnmscale:        c.pnmscale
  117.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmscale_main pnmscale.c
  118. o.pnmshear:        c.pnmshear
  119.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmshear_main pnmshear.c
  120. o.pnmtile:        c.pnmtile
  121.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmtile_main pnmtile.c
  122. o.pnmtoddif:        c.pnmtoddif
  123.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmtoddif_main pnmtoddif.c
  124. o.pnmtops:        c.pnmtops
  125.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)$(basename $@)_main bugrept.c -o $@
  126.     #$(CC) $(ALLCFLAGS) -c -Dmain$(EQ)$(basename $@)_main pnmtops.c
  127. o.pnmtosir:        c.pnmtosir
  128.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmtosir_main pnmtosir.c
  129. o.pnmtorast:        c.pnmtorast h.rast
  130.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmtorast_main pnmtorast.c
  131. o.pnmtotiff:        c.pnmtotiff
  132.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmtotiff_main pnmtotiff.c
  133. o.pnmtoxwd:        c.pnmtoxwd h.x11wd
  134.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)pnmtoxwd_main pnmtoxwd.c
  135. o.rasttopnm:        c.rasttopnm h.rast
  136.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)rasttopnm_main rasttopnm.c
  137. o.sirtopnm:        c.sirtopnm
  138.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)sirtopnm_main sirtopnm.c
  139. o.tifftopnm:        c.tifftopnm
  140.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)tifftopnm_main tifftopnm.c
  141. o.xwdtopnm:        c.xwdtopnm h.x10wd h.x11wd
  142.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)xwdtopnm_main xwdtopnm.c
  143. o.zeisstopnm:    c.zeisstopnm
  144.     $(CC) $(ALLCFLAGS) -c -Dmain$(EQ)zeisstopnm_main zeisstopnm.c
  145.