home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 309.lha / PBM_PLUS / pnm / Imakefile < prev    next >
Makefile  |  1980-12-04  |  2KB  |  80 lines

  1. # Imakefile for pnm tools.
  2. #
  3. # Copyright (C) 1989 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: You can compile PNM without PPM.  If you don't want PPM,
  13. # comment out the next five lines.  This will make the PNM programs use
  14. # less memory.
  15. PPMOPT =    -DPPM
  16. PPMDIR =    ../ppm
  17. INCLUDEPPM =    -I$(PPMDIR)
  18. LIBPPM =    $(PPMDIR)/libppm.a
  19. DEFPPM =    $(PPMDIR)/ppm.h ../pbmplus.h
  20. DEFLIBPPM =    $(PPMDIR)/libppm.h
  21.  
  22. # CONFIGURE: Likewise here: if you don't have PGM, comment these lines out.
  23. PGMOPT =    -DPGM
  24. PGMDIR =    ../pgm
  25. INCLUDEPGM =    -I$(PGMDIR)
  26. LIBPGM =    $(PGMDIR)/libpgm.a
  27. DEFPGM =    $(PGMDIR)/pgm.h
  28. DEFLIBPGM =    $(PGMDIR)/libpgm.h
  29.  
  30. # PBM is required, don't comment these lines out.
  31. PBMOPT =    -DPBM
  32. PBMDIR =    ../pbm
  33. INCLUDEPBM =    -I$(PBMDIR)
  34. LIBPBM =    $(PBMDIR)/libpbm.a
  35. DEFPBM =    $(PBMDIR)/pbm.h
  36. DEFLIBPBM =    $(PBMDIR)/libpbm.h
  37.  
  38. INCLUDE =    $(INCLUDEPPM) $(INCLUDEPGM) $(INCLUDEPBM)
  39. ALLCFLAGS =    $(CFLAGS) $(PPMOPT) $(PGMOPT) $(PBMOPT) $(INCLUDE)
  40. LIBPNM =    libpnm.a
  41.  
  42. PORTBINARIES =    pnmcat pnmcrop pnmcut pnmenlarge pnmflip pnminvert pnmpaste \
  43.         pnmtile
  44.  
  45. PORTMANUALS =    pnm.5 pnmcat.1 pnmcrop.1 pnmcut.1 pnmenlarge.1 pnmflip.1 \
  46.         pnminvert.1 pnmpaste.1 pnmtile.1
  47.  
  48. BINARIES =    $(PORTBINARIES)
  49.  
  50. all:        binaries
  51. install:    installbinaries
  52.  
  53. binaries:    $(BINARIES)
  54.  
  55. installbinaries:    binaries
  56.     cp $(BINARIES) $(INSTALLBINARIES)
  57.  
  58. installmanuals:
  59.     cp $(PORTMANUALS) /usr/man/man$(INSTALLMANUALS)
  60.  
  61. # Rule for plain programs.
  62. $(PORTBINARIES):    pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) \
  63.             $(LIBPPM) $(LIBPGM) $(LIBPBM)
  64.     $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM)
  65.  
  66. # And library.
  67. $(LIBPNM):    libpnm1.o libpnm2.o libpnm3.o
  68.     -rm $(LIBPNM)
  69.     ar rc $(LIBPNM) libpnm1.o libpnm2.o libpnm3.o
  70.     -ranlib $(LIBPNM)
  71.  
  72. libpnm1.o:    pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c
  73.     $(CC) $(ALLCFLAGS) -c libpnm1.c
  74. libpnm2.o:    pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) \
  75.         $(DEFLIBPGM) $(DEFLIBPBM)
  76.     $(CC) $(ALLCFLAGS) -c libpnm2.c
  77. libpnm3.o:    pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) \
  78.         $(DEFLIBPGM) $(DEFLIBPBM)
  79.     $(CC) $(ALLCFLAGS) -c libpnm3.c
  80.