home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / NETWORK / netpbm_src.lzh / NETPBM / PNM / Makefile.dice < prev    next >
Makefile  |  1996-11-18  |  11KB  |  266 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. # CONFIG: generate executable with debugging information
  14. #DEBUG =     -s -d1
  15. # CONFIG: use memory pools
  16. #MPOOL =     -L/amiga -l mpool
  17.  
  18. CC =            dcc
  19. CFLAGS =        -E DCC_ERRORS -ms -mu -gs $(DEBUG)
  20. TIFFDEF =       -DLIBTIFF
  21. LDFLAGS =       $(MPOOL) /amiga/dice_stack.o
  22. BINDIR  =       bin
  23. MERGE =         pnmmerge
  24.  
  25. # where to install the binaries, libraries and important header files
  26. INSTALLBIN =    bin:pbmplus
  27. INSTALLLIB =    dlib:local
  28. INSTALLINCL=    dinclude:local
  29. # install which headers
  30. HEADERS=        pnm.h /pbmplus.h
  31.  
  32. PBMDIR =        /pbm
  33. INCLUDEPBM =    -I$(PBMDIR)
  34. RLIBPBM =       $(PBMDIR)/pbmsr.lib
  35. RLLIBPBM =      $(PBMDIR)/pbmrl.lib
  36. SLIBPBM =       $(PBMDIR)/pbms.lib
  37. SLLIBPBM =      $(PBMDIR)/pbml.lib
  38. DEFPBM =        $(PBMDIR)/pbm.h /pbmplus.h
  39. DEFLIBPBM =     $(PBMDIR)/libpbm.h
  40.  
  41. PGMDIR =        /pgm
  42. INCLUDEPGM =    -I$(PGMDIR)
  43. RLIBPGM =       $(PGMDIR)/pgmsr.lib
  44. RLLIBPGM =      $(PGMDIR)/pgmrl.lib
  45. SLIBPGM =       $(PGMDIR)/pgms.lib
  46. SLLIBPGM =      $(PGMDIR)/pgml.lib
  47. DEFPGM =        $(PGMDIR)/pgm.h
  48. DEFLIBPGM =     $(PGMDIR)/libpgm.h
  49.  
  50. PPMDIR =        /ppm
  51. INCLUDEPPM =    -I$(PPMDIR)
  52. RLIBPPM =       $(PPMDIR)/ppmsr.lib
  53. RLLIBPPM =      $(PPMDIR)/ppmrl.lib
  54. SLIBPPM =       $(PPMDIR)/ppms.lib
  55. SLLIBPPM =      $(PPMDIR)/ppml.lib
  56. DEFPPM =        $(PPMDIR)/ppm.h
  57. DEFLIBPPM =     $(PPMDIR)/libppm.h
  58.  
  59. TIFFDIR =       /libtiff
  60. TIFFINC =       -I$(TIFFDIR)
  61. TIFFLIB =       $(TIFFDIR)/libtiff.lib
  62.  
  63. INCLUDE =       -I/ $(INCLUDEPPM) $(INCLUDEPGM) $(INCLUDEPBM)
  64. RALLCFLAGS =    $(CFLAGS) $(INCLUDE) $(TIFFDEF) $(TIFFINC) -proto -mRR
  65. SALLCFLAGS =    $(CFLAGS) $(INCLUDE) $(TIFFDEF) $(TIFFINC) -proto
  66. MALLCFLAGS =    $(CFLAGS) $(INCLUDE) $(TIFFDEF) $(TIFFINC) -mC -mD
  67. DEFPNM =        pnm.h
  68. #DEFLIBPNM =     libpnm.h
  69. RLIBPNM =        pnmsr.lib
  70. RLLIBPNM =       pnmrl.lib
  71. SLIBPNM =       pnms.lib
  72. SLLIBPNM =      pnml.lib
  73. LIBRARIES =     $(RLIBPNM) $(RLLIBPNM) $(SLIBPNM) $(SLLIBPNM)
  74.  
  75. BINS =          pnmarith pnmcat pnmconvol pnmcrop pnmcut \
  76.                 pnmdepth pnmenlarge pnmfile pnmflip pnmgamma pnmhistmap \
  77.                 pnminvert pnmnoraw pnmpaste pnmtile \
  78.                 pnmtoddif pnmtorast pnmtoxwd rasttopnm xwdtopnm \
  79.                 pnmcomp zeisstopnm pnmpad pnmtosir sirtopnm \
  80.                 sgitopnm pnmtosgi
  81.  
  82. MATHBINS =      pnmrotate pnmscale pnmshear pnmtops \
  83.                 pnmnlfilt fitstopnm pnmalias pnmtofits
  84.  
  85. LMATHBINS =     giftopnm
  86.  
  87. TIFFBINS =      tifftopnm pnmtotiff
  88.  
  89. BINARIES =      $(BINS) $(MATHBINS) $(TIFFBINS) $(LMATHBINS)
  90.  
  91. SCRIPTS =       anytopnm pnmindex pnmmargin pnmsmooth pstopnm
  92.  
  93. OBJS =          pnmarith.om pnmcat.om pnmconvol.om pnmcrop.om pnmcut.om \
  94.                 pnmdepth.om pnmenlarge.om pnmfile.om pnmflip.om pnmhistmap.om \
  95.                 pnminvert.om pnmnoraw.om pnmpaste.om pnmscale.om pnmtile.om \
  96.                 pnmtoddif.om pnmtops.om pnmtorast.om pnmtoxwd.om rasttopnm.om \
  97.                 xwdtopnm.om pnmgamma.om pnmrotate.om pnmshear.om pnmcomp.om \
  98.                 zeisstopnm.om pnmnlfilt.om pnmpad.om pnmtosir.om sirtopnm.om \
  99.                 giftopnm.om fitstopnm.om pnmalias.om pnmtofits.om \
  100.                 sgitopnm.om pnmtosgi.om
  101.  
  102. TIFFOBJECTS =   tifftopnm.om pnmtotiff.om
  103.  
  104. OBJECTS =       $(OBJS) $(TIFFOBJECTS)
  105.  
  106.  
  107. all:            lib binaries
  108.  
  109. bindir:
  110.                 -makedir $(BINDIR)
  111.  
  112. binaries:       lib bindir $(BINARIES)
  113.  
  114. lib:            $(LIBRARIES)
  115.  
  116. merge:          $(SLLIBPNM) bindir $(MERGE)
  117.  
  118.  
  119. # Rules for merged binary
  120. .c.om:       $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $<
  121.         $(CC) -proto $(MALLCFLAGS) "-Dmain=$*_main" -c $*.c -o $*.om
  122. $(MERGE):       pnmmerge.c $(OBJECTS) $(SLLIBPNM) $(SLLIBPPM) $(SLLIBPGM) $(SLLIBPBM) $(TIFFLIB)
  123.         $(CC) $(MALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c $(OBJECTS) -l $(SLLIBPNM) -l $(SLLIBPPM) -l $(SLLIBPGM) -l $(SLLIBPBM) -l $(TIFFLIB) -lm
  124. # Rule for objects.
  125. #$(OBJECTS):     $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM)
  126. #        $(CC) -mD -mC $(SALLCFLAGS) -c $*.c "-Dmain=$*_main"
  127.  
  128.  
  129. # Rules for plain programs.
  130. $(BINS):        $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(RLIBPNM) $(RLIBPPM) $(RLIBPGM) $(RLIBPBM)
  131.         $(CC) -r $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLIBPNM) -l $(RLIBPPM) -l $(RLIBPGM) -l $(RLIBPBM)
  132.  
  133. # Rule for math-dependent programs.
  134. $(MATHBINS):    $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(RLIBPNM) $(RLIBPPM) $(RLIBPGM) $(RLIBPBM)
  135.         $(CC) -r $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLIBPNM) -l $(RLIBPPM) -l $(RLIBPGM) -l $(RLIBPBM) -lm
  136.  
  137. $(LMATHBINS):   $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(RLLIBPNM) $(RLLIBPPM) $(RLLIBPGM) $(RLLIBPBM)
  138.         $(CC) -mD -mC $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLLIBPNM) -l $(RLLIBPPM) -l $(RLLIBPGM) -l $(RLLIBPBM) -lm
  139.  
  140. # Rules for TIFF programs.
  141. $(TIFFBINS):    $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(SLLIBPNM) $(SLLIBPPM) $(SLLIBPGM) $(SLLIBPBM) $(TIFFLIB)
  142.         $(CC) -mD -mC $(SALLCFLAGS) $(LDFLAGS) $@.c -o $(BINDIR)/$@ -l $(SLLIBPNM) -l $(SLLIBPPM) -l $(SLLIBPGM) -l $(SLLIBPBM) -l $(TIFFLIB) -lm
  143.  
  144.  
  145. # And libraries.
  146. #$(LIBPBM):
  147. #        cd $(PBMDIR) ; make lib
  148. #$(LIBPGM) FOO:
  149. #        cd $(PGMDIR) ; make lib
  150. #$(LIBPPM) BAR:
  151. #        cd $(PPMDIR) ; make lib
  152.  
  153. # small data version
  154. $(RLIBPNM):      libpnm1.or libpnm2.or libpnm3.or libpnm4.or
  155.         -delete $(RLIBPNM)
  156.         join libpnm1.or libpnm2.or libpnm3.or libpnm4.or to $(RLIBPNM)
  157. libpnm1.or:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c
  158.         $(CC) -r $(RALLCFLAGS) -S -o $@ -c libpnm1.c
  159. libpnm2.or:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  160.         $(CC) -r $(RALLCFLAGS) -S -o $@ -c libpnm2.c
  161. libpnm3.or:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  162.         $(CC) -r $(RALLCFLAGS) -S -o $@ -c libpnm3.c
  163. libpnm4.or:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) rast.h libpnm4.c
  164.         $(CC) -r $(RALLCFLAGS) -S -o $@ -c libpnm4.c
  165.  
  166. # small data version, not registerized (arguments on stack)
  167. $(SLIBPNM):     libpnm1.os libpnm2.os libpnm3.os libpnm4.os
  168.         -delete $(SLIBPNM)
  169.         join libpnm1.os libpnm2.os libpnm3.os libpnm4.os to $(SLIBPNM)
  170. libpnm1.os:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c
  171.         $(CC) -r $(SALLCFLAGS) -S -o $@ -c libpnm1.c
  172. libpnm2.os:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  173.         $(CC) -r $(SALLCFLAGS) -S -o $@ -c libpnm2.c
  174. libpnm3.os:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  175.         $(CC) -r $(SALLCFLAGS) -S -o $@ -c libpnm3.c
  176. libpnm4.os:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) rast.h libpnm4.c
  177.         $(CC) -r $(SALLCFLAGS) -S -o $@ -c libpnm4.c
  178.  
  179. # large data version
  180. $(RLLIBPNM):     libpnm1.olr libpnm2.olr libpnm3.olr libpnm4.olr
  181.         -delete $(RLLIBPNM)
  182.         join libpnm1.olr libpnm2.olr libpnm3.olr libpnm4.olr to $(RLLIBPNM)
  183. libpnm1.olr:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c
  184.         $(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpnm1.c
  185. libpnm2.olr:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  186.         $(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpnm2.c
  187. libpnm3.olr:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  188.         $(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpnm3.c
  189. libpnm4.olr:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) rast.h libpnm4.c
  190.         $(CC) -mD $(RALLCFLAGS) -S -o $@ -c libpnm4.c
  191.  
  192. # large data version, not registerized (arguments on stack)
  193. $(SLLIBPNM):      libpnm1.ols libpnm2.ols libpnm3.ols libpnm4.ols
  194.         -delete $(SLLIBPNM)
  195.         join libpnm1.ols libpnm2.ols libpnm3.ols libpnm4.ols to $(SLLIBPNM)
  196. libpnm1.ols:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c
  197.         $(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpnm1.c
  198. libpnm2.ols:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  199.         $(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpnm2.c
  200. libpnm3.ols:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) $(DEFLIBPGM) $(DEFLIBPBM)
  201.         $(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpnm3.c
  202. libpnm4.ols:      $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) rast.h libpnm4.c
  203.         $(CC) -mD $(SALLCFLAGS) -S -o $@ -c libpnm4.c
  204.  
  205.  
  206. # Other dependencies.
  207. pnmarith pnmarith.om:            pnmarith.c
  208. pnmcat pnmcat.om:                pnmcat.c
  209. pnmconvol pnmconvol.om:          pnmconvol.c
  210. pnmcrop pnmcrop.om:              pnmcrop.c
  211. pnmcut pnmcut.om:                pnmcut.c
  212. pnmdepth pnmdepth.om:            pnmdepth.c
  213. pnmenlarge pnmenlarge.om:        pnmenlarge.c
  214. pnmfile pnmfile.om:              pnmfile.c
  215. pnmflip pnmflip.om:              pnmflip.c
  216. pnmgamma pnmgamma.om:            pnmgamma.c
  217. pnminvert pnminvert.om:          pnminvert.c
  218. pnmhistmap pnmhistmao.om:        pnmhistmap.c
  219. pnmnoraw pnmnoraw.om:            pnmnoraw.c
  220. pnmpaste pnmpaste.om:            pnmpaste.c
  221. pnmrotate pnmrotate.om:          pnmrotate.c
  222. pnmscale pnmscale.om:            pnmscale.c
  223. pnmshear pnmshear.om:            pnmshear.c
  224. pnmtile pnmtile.om:              pnmtile.c
  225. pnmtoddif pnmtoddif.om:          pnmtoddif.c
  226. pnmtops pnmtops.om:              pnmtops.c
  227. pnmtorast pnmtorast.om:          pnmtorast.c rast.h
  228. pnmtotiff pnmtotiff.om:          pnmtotiff.c
  229. pnmtoxwd pnmtoxwd.om:            pnmtoxwd.c x11wd.h
  230. rasttopnm rasttopnm.om:          rasttopnm.c rast.h
  231. tifftopnm tifftopnm.om:          tifftopnm.c
  232. xwdtopnm xwdtopnm.om:            xwdtopnm.c x10wd.h x11wd.h
  233. pnmcomp pnmcomp.om:              pnmcomp.c
  234. zeisstopnm zeisstopnm.om:        zeisstopnm.c
  235. pnmnlfilt pnmnlfilt.om:          pnmnlfilt.c
  236. pnmpad pnmpad.om:                pnmpad.c
  237. zeisstopnm zeisstopnm.om:        zeisstopnm.c
  238. pnmtosir pnmtosir.om:            pnmtosir.c
  239. sirtopnm sirtopnm.om:            sirtopnm.c
  240. giftopnm giftopnm.om:            giftopnm.c
  241. fitstopnm fitstopnm.om:          fitstopnm.c
  242. pnmalias pnmalias.om:            pnmalias.c
  243. pnmtofits pnmtofits.om:          pnmtofits.c
  244. sgitopnm sgitopnm.om:            sgitopnm.c sgi.h
  245. pnmtosgi pnmtosgi.om:            pnmtosgi.c sgi.h
  246.  
  247. clean:
  248.         -delete \#?.om \#?.os \#?.or \#?.ols \#?.olr DCC_ERRORS
  249.  
  250. cleanall:   clean
  251.         -delete \#?.lib
  252.         -delete $(BINDIR) all
  253.  
  254. installlib:     lib
  255.         copy $(LIBRARIES) to $(INSTALLLIB)
  256.         copy $(HEADERS) to $(INSTALLINCL)
  257.  
  258. installbin:     binaries
  259.         copy $(BINDIR) all to $(INSTALLBIN)
  260.  
  261. installall:     installlib installbin
  262.  
  263. install:
  264.         @echo "Please select: installlib, installbin, installall"
  265.  
  266.