home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Graphics / graphics-16000.iso / general / convrtrs / pbmplus / ntpbmsrc.lha / netpbm / pnm / Makefile.amiga < prev    next >
Makefile  |  1993-12-02  |  10KB  |  248 lines

  1. # Makefile for pnm tools.
  2. #
  3. # Copyright (C) 1989, 1991 by Jef Poskanzer.
  4. # Modified for Amiga DICE by Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)
  5. #
  6. # Permission to use, copy, modify, and distribute this software and its
  7. # documentation for any purpose and without fee is hereby granted, provided
  8. # that the above copyright notice appear in all copies and that both that
  9. # copyright notice and this permission notice appear in supporting
  10. # documentation.  This software is provided "as is" without express or
  11. # implied warranty.
  12.  
  13. CC =            dcc
  14. CFLAGS =        -O0 -E DCC_ERRORS -T RAM: -ms -mu -gs -proto
  15. TIFFDEF =       -DLIBTIFF
  16. LDFLAGS =
  17. BINDIR  =       bin
  18. MERGE =         pnmmerge
  19.  
  20. # where to install the binaries, libraries and important header files
  21. INSTALLBIN =    bin:pbmplus
  22. INSTALLLIB =    dlib:local
  23. INSTALLINCL=    dinclude:local
  24. # install which headers
  25. HEADERS=        pnm.h /pbmplus.h
  26.  
  27. PBMDIR =        /pbm
  28. INCLUDEPBM =    -I$(PBMDIR)
  29. RLIBPBM =       $(PBMDIR)/pbmsr.lib
  30. RLLIBPBM =      $(PBMDIR)/pbmrl.lib
  31. SLIBPBM =       $(PBMDIR)/pbms.lib
  32. SLLIBPBM =      $(PBMDIR)/pbml.lib
  33. DEFPBM =        $(PBMDIR)/pbm.h /pbmplus.h
  34. DEFLIBPBM =     $(PBMDIR)/libpbm.h
  35.  
  36. PGMDIR =        /pgm
  37. INCLUDEPGM =    -I$(PGMDIR)
  38. RLIBPGM =       $(PGMDIR)/pgmsr.lib
  39. RLLIBPGM =      $(PGMDIR)/pgmrl.lib
  40. SLIBPGM =       $(PGMDIR)/pgms.lib
  41. SLLIBPGM =      $(PGMDIR)/pgml.lib
  42. DEFPGM =        $(PGMDIR)/pgm.h
  43. DEFLIBPGM =     $(PGMDIR)/libpgm.h
  44.  
  45. PPMDIR =        /ppm
  46. INCLUDEPPM =    -I$(PPMDIR)
  47. RLIBPPM =       $(PPMDIR)/ppmsr.lib
  48. RLLIBPPM =      $(PPMDIR)/ppmrl.lib
  49. SLIBPPM =       $(PPMDIR)/ppms.lib
  50. SLLIBPPM =      $(PPMDIR)/ppml.lib
  51. DEFPPM =        $(PPMDIR)/ppm.h
  52. DEFLIBPPM =     $(PPMDIR)/libppm.h
  53.  
  54. TIFFDIR =       /libtiff
  55. TIFFINC =       -I$(TIFFDIR)
  56. TIFFLIB =       $(TIFFDIR)/libtiff.lib
  57.  
  58. INCLUDE =       -I/ $(INCLUDEPPM) $(INCLUDEPGM) $(INCLUDEPBM)
  59. RALLCFLAGS =    $(CFLAGS) $(INCLUDE) $(TIFFDEF) $(TIFFINC) -mRR
  60. SALLCFLAGS =    $(CFLAGS) $(INCLUDE) $(TIFFDEF) $(TIFFINC)
  61. DEFPNM =        pnm.h
  62. #DEFLIBPNM =     libpnm.h
  63. RLIBPNM =        pnmsr.lib
  64. RLLIBPNM =       pnmrl.lib
  65. SLIBPNM =       pnms.lib
  66. SLLIBPNM =      pnml.lib
  67. LIBRARIES =     $(RLIBPNM) $(RLLIBPNM) $(SLIBPNM) $(SLLIBPNM)
  68.  
  69. BINS =          pnmarith pnmcat pnmconvol pnmcrop pnmcut \
  70.                 pnmdepth pnmenlarge pnmfile pnmflip pnmgamma pnmhistmap \
  71.                 pnminvert pnmnoraw pnmpaste pnmtile \
  72.                 pnmtoddif pnmtorast pnmtoxwd rasttopnm xwdtopnm \
  73.                 pnmcomp zeisstopnm pnmpad pnmtosir sirtopnm
  74.  
  75. MATHBINS =      pnmrotate pnmscale pnmshear pnmtops \
  76.                 pnmnlfilt
  77.  
  78. LMATHBINS =     giftopnm
  79.  
  80. TIFFBINS =      tifftopnm pnmtotiff
  81.  
  82. BINARIES =      $(BINS) $(MATHBINS) $(TIFFBINS) $(LMATHBINS)
  83.  
  84. SCRIPTS =       anytopnm pnmindex pnmmargin pnmsmooth
  85.  
  86. OBJS =          pnmarith.o pnmcat.o pnmconvol.o pnmcrop.o pnmcut.o \
  87.                 pnmdepth.o pnmenlarge.o pnmfile.o pnmflip.o pnmhistmap.o \
  88.                 pnminvert.o pnmnoraw.o pnmpaste.o pnmscale.o pnmtile.o \
  89.                 pnmtoddif.o \
  90.                 pnmtops.o pnmtorast.o pnmtoxwd.o rasttopnm.o xwdtopnm.o \
  91.                 pnmgamma.o pnmrotate.o pnmshear.o \
  92.                 pnmcomp.o zeisstopnm.o pnmnlfilt.o pnmpad.o \
  93.                 pnmtosir.o sirtopnm.o giftopnm.o
  94.  
  95. TIFFOBJECTS =   tifftopnm.o pnmtotiff.o
  96.  
  97. OBJECTS =       $(OBJS) $(TIFFOBJECTS)
  98.  
  99.  
  100. all:            lib binaries
  101.  
  102. bindir:
  103.                 -makedir $(BINDIR)
  104.  
  105. binaries:       lib bindir $(BINARIES)
  106.  
  107. lib:            $(LIBRARIES)
  108.  
  109. merge:          $(SLLIBPNM) bindir $(MERGE)
  110.  
  111.  
  112. # Rules for plain programs.
  113. $(BINS):        $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(RLIBPNM) $(RLIBPPM) $(RLIBPGM) $(RLIBPBM)
  114.         $(CC) -r $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLIBPNM) -l $(RLIBPPM) -l $(RLIBPGM) -l $(RLIBPBM)
  115.  
  116. $(LMATHBINS):   $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(RLLIBPNM) $(RLLIBPPM) $(RLLIBPGM) $(RLLIBPBM)
  117.         $(CC) -mD -mC $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLLIBPNM) -l $(RLLIBPPM) -l $(RLLIBPGM) -l $(RLLIBPBM) -lm
  118.  
  119. $(TIFFBINS):    $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(SLLIBPNM) $(SLLIBPPM) $(SLLIBPGM) $(SLLIBPBM) $(TIFFLIB)
  120.         $(CC) -mD -mC $(SALLCFLAGS) $(LDFLAGS) $@.c -o $(BINDIR)/$@ -l $(SLLIBPNM) -l $(SLLIBPPM) -l $(SLLIBPGM) -l $(SLLIBPBM) -l $(TIFFLIB) -lm
  121.  
  122. # Rule for math-dependent programs.
  123. $(MATHBINS):    $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(RLIBPNM) $(RLIBPPM) $(RLIBPGM) $(RLIBPBM)
  124.         $(CC) -r $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLIBPNM) -l $(RLIBPPM) -l $(RLIBPGM) -l $(RLIBPBM) -lm
  125.  
  126. #merged binaries, all objects must be compiled with large-data, stack-args
  127. #$(MERGE):       pnmmerge.c $(OBJECTS) $(SLLIBPNM) $(SLLIBPPM) $(SLLIBPGM) $(SLLIBPBM)
  128. #        $(CC) -mD -mC $(SALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c $(OBJECTS) -l $(SLLIBPNM) -l $(SLLIBPPM) -l $(SLLIBPGM) -l $(SLLIBPBM) -lm
  129. # Rule for objects.
  130. #$(OBJECTS):     $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM)
  131. #        $(CC) -mD -mC $(SALLCFLAGS) -c $*.c "-Dmain=$*_main"
  132.  
  133. # And libraries.
  134. #$(LIBPBM):
  135. #        cd $(PBMDIR) ; make lib
  136. #$(LIBPGM) FOO:
  137. #        cd $(PGMDIR) ; make lib
  138. #$(LIBPPM) BAR:
  139. #        cd $(PPMDIR) ; make lib
  140.  
  141. # small data version
  142. $(RLIBPNM):      libpnm1.or libpnm2.or libpnm3.or libpnm4.or
  143.         -delete $(RLIBPNM)
  144.         join libpnm1.or libpnm2.or libpnm3.or libpnm4.or to $(RLIBPNM)
  145. libpnm1.or:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c
  146.         $(CC) -r $(RALLCFLAGS) -S -o $@ -c libpnm1.c
  147. libpnm2.or:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  148.         $(CC) -r $(RALLCFLAGS) -S -o $@ -c libpnm2.c
  149. libpnm3.or:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  150.         $(CC) -r $(RALLCFLAGS) -S -o $@ -c libpnm3.c
  151. libpnm4.or:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) rast.h libpnm4.c
  152.         $(CC) -r $(RALLCFLAGS) -S -o $@ -c libpnm4.c
  153.  
  154. # small data version, not registerized (arguments on stack)
  155. $(SLIBPNM):     libpnm1.o libpnm2.o libpnm3.o libpnm4.o
  156.         -delete $(SLIBPNM)
  157.         join libpnm1.o libpnm2.o libpnm3.o libpnm4.o to $(SLIBPNM)
  158. libpnm1.o:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c
  159.         $(CC) -r $(SALLCFLAGS) -S -o $@ -c libpnm1.c
  160. libpnm2.o:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  161.         $(CC) -r $(SALLCFLAGS) -S -o $@ -c libpnm2.c
  162. libpnm3.o:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  163.         $(CC) -r $(SALLCFLAGS) -S -o $@ -c libpnm3.c
  164. libpnm4.o:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) rast.h libpnm4.c
  165.         $(CC) -r $(SALLCFLAGS) -S -o $@ -c libpnm4.c
  166.  
  167. # large data version
  168. $(RLLIBPNM):     libpnm1.olr libpnm2.olr libpnm3.olr libpnm4.olr
  169.         -delete $(RLLIBPNM)
  170.         join libpnm1.olr libpnm2.olr libpnm3.olr libpnm4.olr to $(RLLIBPNM)
  171. libpnm1.olr:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c
  172.         $(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpnm1.c
  173. libpnm2.olr:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  174.         $(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpnm2.c
  175. libpnm3.olr:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  176.         $(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpnm3.c
  177. libpnm4.olr:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) rast.h libpnm4.c
  178.         $(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpnm4.c
  179.  
  180. # large data version, not registerized (arguments on stack)
  181. $(SLLIBPNM):      libpnm1.ol libpnm2.ol libpnm3.ol libpnm4.ol
  182.         -delete $(SLLIBPNM)
  183.         join libpnm1.ol libpnm2.ol libpnm3.ol libpnm4.ol to $(SLLIBPNM)
  184. libpnm1.ol:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c
  185.         $(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpnm1.c
  186. libpnm2.ol:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  187.         $(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpnm2.c
  188. libpnm3.ol:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  189.         $(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpnm3.c
  190. libpnm4.ol:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) rast.h libpnm4.c
  191.         $(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpnm4.c
  192.  
  193.  
  194. # Other dependencies.
  195. pnmarith pnmarith.o:            pnmarith.c
  196. pnmcat pnmcat.o:                pnmcat.c
  197. pnmconvol pnmconvol.o:          pnmconvol.c
  198. pnmcrop pnmcrop.o:              pnmcrop.c
  199. pnmcut pnmcut.o:                pnmcut.c
  200. pnmdepth pnmdepth.o:            pnmdepth.c
  201. pnmenlarge pnmenlarge.o:        pnmenlarge.c
  202. pnmfile pnmfile.o:              pnmfile.c
  203. pnmflip pnmflip.o:              pnmflip.c
  204. pnmgamma pnmgamma.o:            pnmgamma.c
  205. pnminvert pnminvert.o:          pnminvert.c
  206. pnmhistmap pnmhistmao.o:    pnmhistmap.c
  207. pnmnoraw pnmnoraw.o:            pnmnoraw.c
  208. pnmpaste pnmpaste.o:            pnmpaste.c
  209. pnmrotate pnmrotate.o:          pnmrotate.c
  210. pnmscale pnmscale.o:            pnmscale.c
  211. pnmshear pnmshear.o:            pnmshear.c
  212. pnmtile pnmtile.o:              pnmtile.c
  213. pnmtoddif pnmtoddif.o:          pnmtoddif.c
  214. pnmtops pnmtops.o:              pnmtops.c
  215. pnmtorast pnmtorast.o:          pnmtorast.c rast.h
  216. pnmtotiff pnmtotiff.o:          pnmtotiff.c
  217. pnmtoxwd pnmtoxwd.o:            pnmtoxwd.c x11wd.h
  218. rasttopnm rasttopnm.o:          rasttopnm.c rast.h
  219. tifftopnm tifftopnm.o:          tifftopnm.c
  220. xwdtopnm xwdtopnm.o:            xwdtopnm.c x10wd.h x11wd.h
  221. pnmcomp pnmcomp.o:              pnmcomp.c
  222. zeisstopnm zeisstopnm.o:        zeisstopnm.c
  223. pnmnlfilt pnmnlfilt.o:          pnmnlfilt.c
  224. pnmpad pnmpad.o:                pnmpad.c
  225. zeisstopnm zeisstopnm.o:        zeisstopnm.c
  226. pnmtosir pnmtosir.o:            pnmtosir.c
  227. sirtopnm sirtopnm.o:            sirtopnm.c
  228.  
  229. clean:
  230.         -delete \#?.o \#?.or \#?.ol \#?.olr DCC_ERRORS
  231.  
  232. cleanall:   clean
  233.         -delete \#?.lib
  234.         -delete $(BINDIR) all
  235.  
  236. installlib:     lib
  237.         copy $(LIBRARIES) to $(INSTALLLIB)
  238.         copy $(HEADERS) to $(INSTALLINCL)
  239.  
  240. installbin:     binaries
  241.         copy $(BINDIR) all to $(INSTALLBIN)
  242.  
  243. installall:     installlib installbin
  244.  
  245. install:
  246.         @echo "Please select: installlib, installbin, installall"
  247.  
  248.