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

  1. # Makefile for pbmplus 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: define which of the four sub-packages you want to make.  PBM
  13. # is required; PNM is recommended; and if you want PPM you must have PGM
  14. # too.  This means there are only six possibilities:
  15. SUBDIRS =    pbm pgm ppm pnm
  16. # SUBDIRS =    pbm pgm ppm
  17. # SUBDIRS =    pbm pgm pnm
  18. # SUBDIRS =    pbm pgm
  19. # SUBDIRS =    pbm pnm
  20. # SUBDIRS =    pbm
  21.  
  22. # CONFIGURE: gcc makes things go about 20% faster, but not everyone has it.
  23. # Warning: do not use gcc's -finline-functions flag, it can produce incorrect
  24. # code.  (This is with gcc version 1.35, later versions may fix this.)
  25. # CC =        cc
  26. CC =        gcc -fstrength-reduce -fcombine-regs
  27.  
  28. # CONFIGURE: cc flags go here.  Warning: do not use -O with gcc, it can
  29. # produce incorrect code.  (Again version 1.35.  Yes, this is a separate
  30. # bug from the -finline-functions bug.)
  31. # CFLAGS =    -O
  32. CFLAGS =    -g
  33. # CFLAGS =    
  34.  
  35. # CONFIGURE: ld flags go here.
  36. # LDFLAGS =    -s
  37. LDFLAGS =    
  38.  
  39. # CONFIGURE: Define the directory that you want the binaries copied to.
  40. INSTALLBINARIES =    /usr/new/pbm
  41.  
  42. # CONFIGURE: Define the _section_ that you want the manual sources copied to.
  43. INSTALLMANUALS =    l
  44.  
  45. all:
  46.     for i in $(SUBDIRS) ; do \
  47.         ( cd $$i ; make $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' 'INSTALLMANUALS=$(INSTALLMANUALS)' all ); \
  48.     done
  49.  
  50. install:
  51.     for i in $(SUBDIRS) ; do \
  52.         ( cd $$i ; make $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' 'INSTALLMANUALS=$(INSTALLMANUALS)' install ); \
  53.     done
  54.  
  55. clean:
  56.     for i in $(SUBDIRS) ; do \
  57.         ( cd $$i ; make $(MFLAGS) clean ); \
  58.     done
  59.  
  60.  
  61. # Sharchive stuff.
  62.  
  63. shar:        pbmplus.shar pbm.shar pgm.shar ppm.shar pnm.shar
  64.  
  65. pbmplus.shar:    README CHANGES FORMATS OTHER.SYSTEMS TIPS Imakefile \
  66.         pbmplus.h compataliases
  67.     shar -v -c -p X README CHANGES FORMATS OTHER.SYSTEMS TIPS Makefile Imakefile pbmplus.h compataliases > $@
  68.  
  69. pbm.shar:    pbm.shar1 pbm.shar2 pbm.shar3 pbm.shar4 pbm.shar5 pbm.shar6
  70. pbm.shar1:    pbm/Makefile pbm/Imakefile pbm/pbm.h pbm/icontopbm.c \
  71.         pbm/icontopbm.1 pbm/macptopbm.c pbm/macptopbm.1 \
  72.         pbm/rasttopbm.c pbm/rasttopbm.1 pbm/xbmtopbm.c \
  73.         pbm/xbmtopbm.1 pbm/xwdtopbm.c
  74.     shar -v -c -p X pbm/Makefile pbm/Imakefile pbm/pbm.h pbm/icontopbm.c pbm/icontopbm.1 pbm/macptopbm.c pbm/macptopbm.1 pbm/rasttopbm.c pbm/rasttopbm.1 pbm/xbmtopbm.c pbm/xbmtopbm.1 pbm/xwdtopbm.c > $@
  75. pbm.shar2:    pbm/xwdtopbm.1 pbm/pbmtoicon.c pbm/pbmtoicon.1 \
  76.         pbm/pbmtoptx.c pbm/pbmtoptx.1 pbm/pbmtorast.c pbm/pbmtorast.1 \
  77.         pbm/pbmtoxbm.c pbm/pbmtoxbm.1 pbm/pbmtox10bm.c \
  78.         pbm/pbmtox10bm.1 pbm/pbmtoascii.c pbm/pbmtoascii.1 \
  79.         pbm/pbmpaste.c pbm/pbmpaste.1 pbm/g3topbm.c pbm/g3topbm.1
  80.     shar -v -c -p X pbm/xwdtopbm.1 pbm/pbmtoicon.c pbm/pbmtoicon.1 pbm/pbmtoptx.c pbm/pbmtoptx.1 pbm/pbmtorast.c pbm/pbmtorast.1 pbm/pbmtoxbm.c pbm/pbmtoxbm.1 pbm/pbmtox10bm.c pbm/pbmtox10bm.1 pbm/pbmtoascii.c pbm/pbmtoascii.1 pbm/pbmpaste.c pbm/pbmpaste.1 pbm/g3topbm.c pbm/g3topbm.1 > $@
  81. pbm.shar3:    pbm/pbmmake.c pbm/pbmmake.1 pbm/pbmtolj.c \
  82.         pbm/pbmtolj.1 pbm/pbmtomacp.c pbm/pbmtomacp.1 \
  83.         pbm/pbmtoxwd.c \
  84.         pbm/pbmtoxwd.1 pbm/brushtopbm.c pbm/brushtopbm.1 \
  85.         pbm/libpbm1.c pbm/libpbm2.c pbm/libpbm3.c pbm/libpbm4.c
  86.     shar -v -c -p X pbm/pbmmake.c pbm/pbmmake.1 pbm/pbmtolj.c pbm/pbmtolj.1 pbm/pbmtomacp.c pbm/pbmtomacp.1 pbm/pbmtoxwd.c pbm/pbmtoxwd.1 pbm/brushtopbm.c pbm/brushtopbm.1 pbm/libpbm1.c pbm/libpbm2.c pbm/libpbm3.c pbm/libpbm4.c > $@
  87. pbm.shar4:    pbm/pbm.5 pbm/libpbm.h pbm/macp.h pbm/x10wd.h \
  88.         pbm/x11wd.h pbm/tiff.h pbm/bitreverse.h pbm/pbmreduce.c \
  89.         pbm/pbmreduce.1 pbm/gemtopbm.c pbm/gemtopbm.1 pbm/pbmtogo.c \
  90.         pbm/pbmtogo.1 pbm/pbmlife.c pbm/pbmlife.1 pbm/pcxtopbm.c
  91.     shar -v -c -p X pbm/pbm.5 pbm/libpbm.h pbm/macp.h pbm/x10wd.h pbm/x11wd.h pbm/tiff.h pbm/bitreverse.h pbm/pbmreduce.c pbm/pbmreduce.1 pbm/gemtopbm.c pbm/gemtopbm.1 pbm/pbmtogo.c pbm/pbmtogo.1 pbm/pbmlife.c pbm/pbmlife.1 pbm/pcxtopbm.c > $@
  92. pbm.shar5:    pbm/pcxtopbm.1 pbm/pbmupc.c pbm/pbmupc.1 \
  93.         pbm/tifftopbm.c pbm/tifftopbm.1 pbm/mgr.h pbm/mgrtopbm.c \
  94.         pbm/mgrtopbm.1
  95.     shar -v -c -p X pbm/pcxtopbm.1 pbm/pbmupc.c pbm/pbmupc.1 pbm/tifftopbm.c pbm/tifftopbm.1 pbm/mgr.h pbm/mgrtopbm.c pbm/mgrtopbm.1 > $@
  96. pbm.shar6:    pbm/cmuwm.h pbm/cmuwmtopbm.c pbm/cmuwmtopbm.1 \
  97.         pbm/pbmtocmuwm.c pbm/pbmtocmuwm.1 pbm/pbmmask.c pbm/pbmmask.1 \
  98.         pbm/pbmtobbnbg.c pbm/pbmtobbnbg.1 pbm/pbmtomgr.c pbm/pbmtomgr.1
  99.     shar -v -c -p X pbm/cmuwm.h pbm/cmuwmtopbm.c pbm/cmuwmtopbm.1 pbm/pbmtocmuwm.c pbm/pbmtocmuwm.1 pbm/pbmmask.c pbm/pbmmask.1 pbm/pbmtobbnbg.c pbm/pbmtobbnbg.1 pbm/pbmtomgr.c pbm/pbmtomgr.1 > $@
  100.  
  101. pgm.shar:    pgm.shar1 pgm.shar2
  102. pgm.shar1:    pgm/Makefile pgm/Imakefile pgm/pgm.5 pgm/libpgm1.c \
  103.         pgm/libpgm2.c pgm/pgm.h pgm/libpgm.h pgm/fstopgm.c \
  104.         pgm/fstopgm.1 pgm/hipstopgm.c pgm/hipstopgm.1 pgm/pgmenhance.c \
  105.         pgm/pgmenhance.1 pgm/pgmhist.c pgm/pgmhist.1 pgm/pgmnorm.c \
  106.         pgm/pgmnorm.1
  107.     shar -v -c -p X pgm/Makefile pgm/Imakefile pgm/pgm.5 pgm/libpgm1.c pgm/libpgm2.c pgm/pgm.h pgm/libpgm.h pgm/fstopgm.c pgm/fstopgm.1 pgm/hipstopgm.c pgm/hipstopgm.1 pgm/pgmenhance.c pgm/pgmenhance.1 pgm/pgmhist.c pgm/pgmhist.1 pgm/pgmnorm.c pgm/pgmnorm.1 > $@
  108. pgm.shar2:    pgm/pgmtopbm.c pgm/pgmtopbm.1 pgm/dithers.h \
  109.         pgm/pgmtops.c pgm/pgmtops.1 pgm/psidtopgm.c pgm/psidtopgm.1 \
  110.         pgm/fitstopgm.c pgm/fitstopgm.1
  111.     shar -v -c -p X pgm/pgmtopbm.c pgm/pgmtopbm.1 pgm/dithers.h pgm/pgmtops.c pgm/pgmtops.1 pgm/psidtopgm.c pgm/psidtopgm.1 pgm/fitstopgm.c pgm/fitstopgm.1 > $@
  112.  
  113. ppm.shar:    ppm.shar1 ppm.shar2 ppm.shar3 ppm.shar4 ppm.shar5 ppm.shar6 \
  114.         ppm.shar7
  115. ppm.shar1:    ppm/Makefile ppm/Imakefile ppm/ppm.5 ppm/libppm1.c \
  116.         ppm/libppm2.c ppm/libppm3.c ppm/libppm4.c ppm/libppm5.c \
  117.         ppm/convolscripts/ppmsmooth
  118.     shar -v -c -p X ppm/Makefile ppm/Imakefile ppm/ppm.5 ppm/libppm1.c ppm/libppm2.c ppm/libppm3.c ppm/libppm4.c ppm/libppm5.c ppm/convolscripts/ppmsmooth > $@
  119. ppm.shar2:    ppm/ppm.h ppm/ppmcmap.h ppm/ppmdraw.h ppm/libppm.h \
  120.         ppm/tga.h ppm/mtvtoppm.c ppm/mtvtoppm.1 ppm/giftoppm.c \
  121.         ppm/giftoppm.1 ppm/ppmrotate.c ppm/ppmrotate.1
  122.     shar -v -c -p X ppm/ppm.h ppm/ppmcmap.h ppm/ppmdraw.h ppm/libppm.h ppm/tga.h ppm/mtvtoppm.c ppm/mtvtoppm.1 ppm/giftoppm.c ppm/giftoppm.1 ppm/ppmrotate.c ppm/ppmrotate.1 > $@
  123. ppm.shar3:    ppm/ppmscale.c ppm/ppmscale.1 ppm/ppmshear.c \
  124.         ppm/ppmshear.1 ppm/ppmpat.c
  125.     shar -v -c -p X ppm/ppmscale.c ppm/ppmscale.1 ppm/ppmshear.c ppm/ppmshear.1 ppm/ppmpat.c > $@
  126. ppm.shar4:    ppm/ppmpat.1 ppm/ppmconvol.c ppm/ppmconvol.1 \
  127.         ppm/ppmtopgm.c ppm/ppmtopgm.1 ppm/ppmtorast.c ppm/ppmtorast.1 \
  128.         ppm/rasttoppm.c ppm/rasttoppm.1
  129.     shar -v -c -p X ppm/ppmpat.1 ppm/ppmconvol.c ppm/ppmconvol.1 ppm/ppmtopgm.c ppm/ppmtopgm.1 ppm/ppmtorast.c ppm/ppmtorast.1 ppm/rasttoppm.c ppm/rasttoppm.1 > $@
  130. ppm.shar5:    ppm/ppmcscale.c ppm/ppmcscale.1 ppm/ilbmtoppm.c \
  131.         ppm/ilbm.h ppm/ilbmtoppm.1 ppm/ppmquant.c ppm/ppmquant.1 \
  132.         ppm/ppmarith.c ppm/ppmarith.1
  133.     shar -v -c -p X ppm/ppmcscale.c ppm/ppmcscale.1 ppm/ilbmtoppm.c ppm/ilbm.h ppm/ilbmtoppm.1 ppm/ppmquant.c ppm/ppmquant.1 ppm/ppmarith.c ppm/ppmarith.1 > $@
  134. ppm.shar6:    ppm/qrttoppm.c ppm/qrttoppm.1 ppm/ppmtops.c \
  135.         ppm/ppmtops.1 ppm/ppmtogif.c ppm/ppmtogif.1 ppm/ppmtoilbm.c \
  136.         ppm/ppmtoilbm.1
  137.     shar -v -c -p X ppm/qrttoppm.c ppm/qrttoppm.1 ppm/ppmtops.c ppm/ppmtops.1 ppm/ppmtogif.c ppm/ppmtogif.1 ppm/ppmtoilbm.c ppm/ppmtoilbm.1 > $@
  138. ppm.shar7:    ppm/tgatoppm.c ppm/tgatoppm.1 ppm/ppmhist.c \
  139.         ppm/ppmhist.1 ppm/xwdtoppm.c ppm/xwdtoppm.1 ppm/ppmtoxwd.c \
  140.         ppm/ppmtoxwd.1 ppm/imgtoppm.c ppm/imgtoppm.1
  141.     shar -v -c -p X ppm/tgatoppm.c ppm/tgatoppm.1 ppm/ppmhist.c ppm/ppmhist.1 ppm/xwdtoppm.c ppm/xwdtoppm.1 ppm/ppmtoxwd.c ppm/ppmtoxwd.1 ppm/imgtoppm.c ppm/imgtoppm.1 > $@
  142.  
  143. pnm.shar:    pnm.shar1 pnm.shar2
  144. pnm.shar1:    pnm/Makefile pnm/Imakefile pnm/pnm.5 pnm/libpnm1.c \
  145.         pnm/libpnm2.c pnm/libpnm3.c pnm/pnm.h pnm/pnmcat.c \
  146.         pnm/pnmcat.1 pnm/pnmcrop.c pnm/pnmcrop.1 pnm/pnmcut.c \
  147.         pnm/pnmcut.1 pnm/pnmenlarge.c pnm/pnmenlarge.1
  148.     shar -v -c -p X pnm/Makefile pnm/Imakefile pnm/pnm.5 pnm/libpnm1.c pnm/libpnm2.c pnm/libpnm3.c pnm/pnm.h pnm/pnmcat.c pnm/pnmcat.1 pnm/pnmcrop.c pnm/pnmcrop.1 pnm/pnmcut.c pnm/pnmcut.1 pnm/pnmenlarge.c pnm/pnmenlarge.1 > $@
  149. pnm.shar2:    pnm/pnmflip.c pnm/pnmflip.1 pnm/pnminvert.c pnm/pnminvert.1 \
  150.         pnm/pnmpaste.c pnm/pnmpaste.1 pnm/pnmtile.c pnm/pnmtile.1
  151.     shar -v -c -p X pnm/pnmflip.c pnm/pnmflip.1 pnm/pnminvert.c pnm/pnminvert.1 pnm/pnmpaste.c pnm/pnmpaste.1 pnm/pnmtile.c pnm/pnmtile.1 > $@
  152.  
  153.  
  154. # Imakefile stuff.  Ignore if you're not an X11 type.
  155.  
  156.             TOP = ../../../../../usr/src/new/X11
  157.  
  158.              RM = rm -f
  159.              MV = mv
  160.         UTILSRC = $(TOP)/util
  161.        IMAKESRC = $(UTILSRC)/imake
  162.        IRULESRC = $(UTILSRC)/imake.includes
  163.           IMAKE = $(IMAKESRC)/imake
  164.   IMAKE_DEFINES =
  165.       IMAKE_CMD = $(NEWTOP)$(IMAKE) -TImake.tmpl -I$(NEWTOP)$(IRULESRC) \
  166.             -s Makefile $(IMAKE_DEFINES)
  167. Makefile: Imakefile \
  168.     $(IRULESRC)/Imake.tmpl \
  169.     $(IRULESRC)/Imake.rules \
  170.     $(IRULESRC)/site.def \
  171.     $(IRULESRC)/$(MACROFILE)
  172.     -@if [ -f Makefile ]; then \
  173.     echo "$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
  174.     $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  175.     else exit 0; fi
  176.     $(IMAKE_CMD) -DTOPDIR=$(TOP)
  177.  
  178. Makefiles:
  179.     @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
  180.     for i in $(SUBDIRS) ;\
  181.     do \
  182.     echo "Making Makefiles in $$i..."; \
  183.     $(MAKE) subdirMakefiles NEWTOP=../ MAKEFILE_SUBDIR=$$i;\
  184.     done
  185.  
  186. subdirMakefiles:
  187.     $(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
  188.     -@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then \
  189.     echo "$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak"; \
  190.     $(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
  191.     else exit 0; fi
  192.     cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=../$(TOP); \
  193.     $(MAKE) $(MFLAGS) Makefiles
  194.