home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilsm / netpbmsca / pgm / Makefile next >
Encoding:
Makefile  |  1994-02-21  |  3.4 KB  |  97 lines

  1. # Makefile for pgm 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. # Horrible hack again
  13. EQ = =
  14.  
  15. CC =        gcc
  16. CFLAGS =    -O2 -IUnix:
  17. LDFLAGS =    
  18.  
  19. PBMDIR =    ^.pbm
  20. INCLUDEPBM =    -I$(PBMDIR)
  21. INCLUDE =    -I.. $(INCLUDEPBM)
  22. LIBPBM =    $(PBMDIR).libpbm
  23. DEFPBM =    $(PBMDIR).h.pbm ^.h.pbmplus
  24. DEFLIBPBM =    $(PBMDIR).h.libpbm
  25.  
  26. ALLCFLAGS =    $(CFLAGS) $(INCLUDE)
  27. LIBPGM =    libpgm
  28.  
  29. OBJECTS =    o.biorad2pgm o.fitstopgm o.fstopgm o.hipstopgm o.lispmtopgm \
  30.         o.pbmtopgm o.pgmbentley o.pgmenhance o.pgmhist o.pgmnoise \
  31.         o.pgmnorm o.pgmoil o.pgmramp o.pgmtofits o.pgmtofs o.pgmtolispm \
  32.         o.pgmtopbm o.psidtopgm o.spottopgm \
  33.         o.rawtopgm o.pgmcrater o.pgmedge o.pgmtexture
  34.  
  35. all:        merge
  36.  
  37. merge:        pgmmerge
  38. pgmmerge:    c.pgmmerge $(OBJECTS) $(LIBPGM) $(LIBPBM)
  39.     $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c o.* $(LIBPBM)
  40.  
  41. $(LIBPGM):    o.libpgm1 o.libpgm2
  42.     libfile -co $@ $^
  43.  
  44. o.libpgm1:    h.pgm $(DEFPBM) h.libpgm c.libpgm1
  45.     $(CC) $(ALLCFLAGS) -c libpgm1.c
  46. o.libpgm2:    h.pgm $(DEFPBM) h.libpgm c.libpgm2 $(DEFLIBPBM)
  47.     $(CC) $(ALLCFLAGS) -c libpgm2.c
  48.  
  49. # Other dependencies.
  50. o.biorad2pgm:    c.biorad2pgm
  51.     $(CC) $(ALLCFLAGS) -c biorad2pgm.c -Dmain$(EQ)bioradtopgm_main
  52. o.fitstopgm:        c.fitstopgm
  53.     $(CC) $(ALLCFLAGS) -c fitstopgm.c -Dmain$(EQ)fitstopgm_main
  54. o.fstopgm:        c.fstopgm
  55.     $(CC) $(ALLCFLAGS) -c fstopgm.c -Dmain$(EQ)fstopgm_main
  56. o.hipstopgm:        c.hipstopgm
  57.     $(CC) $(ALLCFLAGS) -c hipstopgm.c -Dmain$(EQ)hipstopgm_main
  58. o.lispmtopgm:    c.lispmtopgm
  59.     $(CC) $(ALLCFLAGS) -c lispmtopgm.c -Dmain$(EQ)lispmtopgm_main
  60. o.pbmtopgm:        c.pbmtopgm
  61.     $(CC) $(ALLCFLAGS) -c pbmtopgm.c -Dmain$(EQ)pbmtopgm_main
  62. o.pgmbentley:    c.pgmbentley
  63.     $(CC) $(ALLCFLAGS) -c pgmbentley.c -Dmain$(EQ)pgmbentley_main 
  64. o.pgmcrater:        c.pgmcrater
  65.     $(CC) $(ALLCFLAGS) -c pgmcrater.c -Dmain$(EQ)pgmcrater_main 
  66. o.pgmedge:        c.pgmedge 
  67.     $(CC) $(ALLCFLAGS) -c pgmedge.c -Dmain$(EQ)pgmedge_main
  68. o.pgmenhance:    c.pgmenhance
  69.     $(CC) $(ALLCFLAGS) -c pgmenhance.c -Dmain$(EQ)pgmenhance_main
  70. o.pgmhist:        c.pgmhist
  71.     $(CC) $(ALLCFLAGS) -c pgmhist.c -Dmain$(EQ)pgmhist_main
  72. o.pgmnoise:        c.pgmnoise
  73.     $(CC) $(ALLCFLAGS) -c pgmnoise.c -Dmain$(EQ)pgmnoise_main
  74. o.pgmnorm:        c.pgmnorm
  75.     $(CC) $(ALLCFLAGS) -c pgmnorm.c -Dmain$(EQ)pgmnorm_main
  76. o.pgmoil:        c.pgmoil
  77.     $(CC) $(ALLCFLAGS) -c pgmoil.c -Dmain$(EQ)pgmoil_main
  78. o.pgmramp:        c.pgmramp
  79.     $(CC) $(ALLCFLAGS) -c pgmramp.c -Dmain$(EQ)pgmramp_main
  80. o.pgmtexture:    c.pgmtexture
  81.     $(CC) $(ALLCFLAGS) -c bugrept.c -o $@ -Dmain$(EQ)pgmtexture_main
  82.     #$(CC) $(ALLCFLAGS) -c pgmtexture.c -Dmain$(EQ)pgmtexture_main
  83. o.pgmtopbm:        c.pgmtopbm h.dithers $(DEFPBM)
  84.     $(CC) $(ALLCFLAGS) -c pgmtopbm.c -Dmain$(EQ)pgmtopbm_main
  85. o.pgmtofits:        c.pgmtofits
  86.     $(CC) $(ALLCFLAGS) -c pgmtofits.c -Dmain$(EQ)pgmtofits_main
  87. o.pgmtofs:        c.pgmtofs
  88.     $(CC) $(ALLCFLAGS) -c pgmtofs.c -Dmain$(EQ)pgmtofs_main
  89. o.pgmtolispm:    c.pgmtolispm
  90.     $(CC) $(ALLCFLAGS) -c pgmtolispm.c -Dmain$(EQ)pgmtolispm_main
  91. o.psidtopgm:        c.psidtopgm
  92.     $(CC) $(ALLCFLAGS) -c psidtopgm.c -Dmain$(EQ)psidtopgm_main
  93. o.rawtopgm:        c.rawtopgm
  94.     $(CC) $(ALLCFLAGS) -c rawtopgm.c -Dmain$(EQ)rawtopgm_main
  95. o.spottopgm:        c.spottopgm
  96.     $(CC) $(ALLCFLAGS) -c spottopgm.c -Dmain$(EQ)spottopgm_main
  97.