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 / PPM / Makefile.dice < prev    next >
Makefile  |  1996-11-18  |  13KB  |  303 lines

  1. # Makefile for ppm tools, for use with Amiga DICE
  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. #RGBDEF =        -DRGB_DB="RGBDEF"
  21. LDFLAGS =       $(MPOOL) /amiga/dice_stack.o
  22. BINDIR =        bin
  23. MERGE=          ppmmerge
  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=        ppm.h ppmcmap.h ppmdraw.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. INCLUDE =       -I/ $(INCLUDEPGM) $(INCLUDEPBM)
  51. RALLCFLAGS =    $(CFLAGS) $(RGBDEF) $(INCLUDE) -proto -mRR
  52. SALLCFLAGS =    $(CFLAGS) $(RGBDEF) $(INCLUDE) -proto
  53. MALLCFLAGS =    $(CFLAGS) $(RGBDEF) $(INCLUDE) -mC -mD
  54. DEFPPM =        ppm.h
  55. DEFLIBPPM =     libppm.h
  56. RLIBPPM =       ppmsr.lib
  57. RLLIBPPM =      ppmrl.lib
  58. SLIBPPM =       ppms.lib
  59. SLLIBPPM =      ppml.lib
  60.  
  61.  
  62. LIBRARIES =     $(RLIBPPM) $(RLLIBPPM) $(SLIBPPM) $(SLLIBPPM)
  63.  
  64. BINS =          gouldtoppm hpcdtoppm imgtoppm mtvtoppm \
  65.                 pcxtoppm pi1toppm pjtoppm ppm3d ppmchange ppmdither \
  66.                 ppmhist ppmquant ppmrelief ppmshift ppmspread \
  67.                 ppmtogif ppmtoicr ppmtoilbm ppmtopcx ppmtopgm ppmtopi1 \
  68.                 ppmtopict ppmtopj ppmtopuzz ppmtorgb3 ppmtosixel \
  69.                 ppmtotga ppmtouil ppmtoxpm ppmtoyuv qrttoppm \
  70.                 rawtoppm rgb3toppm ximtoppm yuvtoppm \
  71.                 bmptoppm ppmtobmp ppmdist ppmtoyuvsplit yuvsplittoppm \
  72.                 ppmbrighten ppmtomitsu picttoppm xvminitoppm
  73.  
  74. MATHBINS =      ilbmtoppm ppmtoacad pgmtoppm ppmforge ppmmake sldtoppm \
  75.                 xpmtoppm  ppmtopjxl ppmnorm ppmdim ppmflash ppmmix \
  76.                 ppmntsc
  77.  
  78. LBINS    =      spctoppm sputoppm tgatoppm \
  79.                 ppmtomap
  80.  
  81. LMATHBINS =     ppmqvga
  82.  
  83. SLBINS =        ppmpat
  84.  
  85. BINARIES =      $(BINS) $(MATHBINS) $(LBINS) $(SLBINS) $(LMATHBINS)
  86.  
  87. SCRIPTS =       ppmquantall
  88.  
  89. OBJECTS =       gouldtoppm.om hpcdtoppm.om ilbmtoppm.om imgtoppm.om mtvtoppm.om \
  90.                 pcxtoppm.om pgmtoppm.om pi1toppm.om picttoppm.om \
  91.                 pjtoppm.om ppm3d.om ppmchange.om ppmdim.om ppmdither.om ppmflash.om ppmhist.om \
  92.                 ppmmake.om ppmmix.om ppmntsc.om ppmquant.om ppmrelief.om \
  93.                 ppmshift.om ppmspread.om \
  94.                 ppmtoacad.om ppmtogif.om ppmtoicr.om \
  95.                 ppmtoilbm.om ppmtopcx.om ppmtopgm.om ppmtopi1.om ppmtopict.om \
  96.                 ppmtopj.om ppmtopuzz.om ppmtorgb3.om ppmtosixel.om \
  97.                 ppmtotga.om ppmtouil.om ppmtoxpm.om ppmtoyuv.om qrttoppm.om \
  98.                 rawtoppm.om rgb3toppm.om sldtoppm.om spctoppm.om sputoppm.om \
  99.                 tgatoppm.om ximtoppm.om xpmtoppm.om yuvtoppm.om \
  100.                 ppmforge.om ppmpat.om bmptoppm.om ppmtobmp.om ppmdist.om \
  101.                 ppmtomap.om ppmtoyuvsplit.om yuvsplittoppm.om \
  102.                 ppmbrighten.om ppmtomitsu.om ppmtopjxl.om ppmnorm.om \
  103.                 ppmqvga.om xvminitoppm.om
  104.  
  105. all:            lib binaries
  106.  
  107. bindir:
  108.                 -makedir $(BINDIR)
  109.  
  110. binaries:       lib bindir $(BINARIES)
  111.  
  112. lib:            $(LIBRARIES)
  113.  
  114. merge:          lib bindir $(MERGE)
  115.  
  116.  
  117. # Rules for merged binary
  118. .c.om:       $(DEFPPM) $(DEFPGM) $(DEFPBM) $<
  119.         $(CC) -proto $(MALLCFLAGS) "-Dmain=$*_main" -c $*.c -o $*.om
  120. $(MERGE):   ppmmerge.c $(OBJECTS) $(SLLIBPPM) $(SLLIBPGM) $(SLLIBPBM)
  121.         $(CC) $(MALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c $(OBJECTS) -l $(SLLIBPPM) -l $(SLLIBPGM) -l $(SLLIBPBM) -lm
  122. #$(OBJECTS):     $(DEFPPM) $(DEFPGM) $(DEFPBM)
  123. #        $(CC) -mD -mC $(SALLCFLAGS) "-Dmain=$*_main" -c $*.c
  124.  
  125.  
  126. # Rule for plain programs.
  127. $(BINS):        $(DEFPPM) $(DEFPGM) $(DEFPBM) $(RLIBPPM) $(RLIBPGM) $(RLIBPBM)
  128.         $(CC) -r $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLIBPPM) -l $(RLIBPGM) -l $(RLIBPBM)
  129.  
  130. $(LBINS):       $(DEFPPM) $(DEFPGM) $(DEFPBM) $(RLLIBPPM) $(RLLIBPGM) $(RLLIBPBM)
  131.         $(CC) -mD -mC $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLLIBPPM) -l $(RLLIBPGM) -l $(RLLIBPBM)
  132.  
  133. $(SLBINS):      $(DEFPPM) $(DEFPGM) $(DEFPBM) $(SLLIBPPM) $(SLLIBPGM) $(SLLIBPBM)
  134.         $(CC) -mD -mC $(SALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(SLLIBPPM) -l $(SLLIBPGM) -l $(SLLIBPBM)
  135.  
  136. # Rule for math-dependent programs.
  137. $(MATHBINS):    $(DEFPPM) $(DEFPGM) $(DEFPBM) $(RLIBPPM) $(RLIBPGM) $(RLIBPBM)
  138.         $(CC) -r $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLIBPPM) -l $(RLIBPGM) -l $(RLIBPBM) -lm
  139.  
  140. $(LMATHBINS):   $(DEFPPM) $(DEFPGM) $(DEFPBM) $(RLLIBPPM) $(RLLIBPGM) $(RLLIBPBM)
  141.         $(CC) -mD -mC $(RALLCFLAGS) $(LDFLAGS) -o $(BINDIR)/$@ $@.c -l $(RLLIBPPM) -l $(RLLIBPGM) -l $(RLLIBPBM) -lm
  142.  
  143.  
  144. # And libraries.
  145. #$(LIBPBM):
  146. #        cd $(PBMDIR) ; make lib
  147. #$(LIBPGM):
  148. #        cd $(PGMDIR) ; make lib
  149.  
  150. # small data version of libppm
  151. $(RLIBPPM):      libppm1.or libppm2.or libppm3.or libppm4.or libppm5.or bitio.or
  152.         -delete $(RLIBPPM)
  153.         join libppm1.or libppm2.or libppm3.or libppm4.or libppm5.or bitio.or to $(RLIBPPM)
  154. libppm1.or:      $(DEFPPM) $(DEFPGM) $(DEFPBM) $(DEFLIBPPM) libppm1.c
  155.         $(CC) -r $(RALLCFLAGS) -S -o $@ -c libppm1.c
  156. libppm2.or:      $(DEFPPM) $(DEFPGM) $(DEFPBM) $(DEFLIBPPM) libppm2.c $(DEFLIBPGM) $(DEFLIBPBM)
  157.         $(CC) -r $(RALLCFLAGS) -S -o $@ -c libppm2.c
  158. libppm3.or:      $(DEFPPM) $(DEFPGM) $(DEFPBM) ppmcmap.h $(DEFLIBPPM) libppm3.c
  159.         $(CC) -r $(RALLCFLAGS) -S -o $@ -c libppm3.c
  160. libppm4.or:      $(DEFPPM) $(DEFPGM) $(DEFPBM) libppm4.c
  161.         $(CC) -r $(RALLCFLAGS) -S -o $@ -c libppm4.c
  162. libppm5.or:      $(DEFPPM) $(DEFPGM) $(DEFPBM) ppmdraw.h libppm5.c
  163.         $(CC) -r $(RALLCFLAGS) -S -o $@ -c libppm5.c
  164. bitio.or:        bitio.h /pbmplus.h bitio.c
  165.         $(CC) -r $(RALLCFLAGS) -S -o $@ -c bitio.c
  166.  
  167. # small data version of libppm, not registerized (arguments on stack)
  168. $(SLIBPPM):     libppm1.os libppm2.os libppm3.os libppm4.os libppm5.os bitio.os
  169.         -delete $(SLIBPPM)
  170.         join libppm1.os libppm2.os libppm3.os libppm4.os libppm5.os bitio.os to $(SLIBPPM)
  171. libppm1.os:      $(DEFPPM) $(DEFPGM) $(DEFPBM) $(DEFLIBPPM) libppm1.c
  172.         $(CC) -r $(SALLCFLAGS) -S -o $@ -c libppm1.c
  173. libppm2.os:      $(DEFPPM) $(DEFPGM) $(DEFPBM) $(DEFLIBPPM) libppm2.c $(DEFLIBPGM) $(DEFLIBPBM)
  174.         $(CC) -r $(SALLCFLAGS) -S -o $@ -c libppm2.c
  175. libppm3.os:      $(DEFPPM) $(DEFPGM) $(DEFPBM) ppmcmap.h $(DEFLIBPPM) libppm3.c
  176.         $(CC) -r $(SALLCFLAGS) -S -o $@ -c libppm3.c
  177. libppm4.os:      $(DEFPPM) $(DEFPGM) $(DEFPBM) libppm4.c
  178.         $(CC) -r $(SALLCFLAGS) -S -o $@ -c libppm4.c
  179. libppm5.os:      $(DEFPPM) $(DEFPGM) $(DEFPBM) ppmdraw.h libppm5.c
  180.         $(CC) -r $(SALLCFLAGS) -S -o $@ -c libppm5.c
  181. bitio.os:        bitio.h /pbmplus.h bitio.c
  182.         $(CC) -r $(SALLCFLAGS) -S -o $@ -c bitio.c
  183.  
  184. # large data version of libppm
  185. $(RLLIBPPM):    libppm1.olr libppm2.olr libppm3.olr libppm4.olr libppm5.olr bitio.olr
  186.         -delete $(RLLIBPPM)
  187.         join libppm1.olr libppm2.olr libppm3.olr libppm4.olr libppm5.olr bitio.olr to $(RLLIBPPM)
  188. libppm1.olr:      $(DEFPPM) $(DEFPGM) $(DEFPBM) $(DEFLIBPPM) libppm1.c
  189.         $(CC) -mD $(RALLCFLAGS) -S -o $@ -c libppm1.c
  190. libppm2.olr:      $(DEFPPM) $(DEFPGM) $(DEFPBM) $(DEFLIBPPM) libppm2.c $(DEFLIBPGM) $(DEFLIBPBM)
  191.         $(CC) -mD $(RALLCFLAGS) -S -o $@ -c libppm2.c
  192. libppm3.olr:      $(DEFPPM) $(DEFPGM) $(DEFPBM) ppmcmap.h $(DEFLIBPPM) libppm3.c
  193.         $(CC) -mD $(RALLCFLAGS) -S -o $@ -c libppm3.c
  194. libppm4.olr:      $(DEFPPM) $(DEFPGM) $(DEFPBM) libppm4.c
  195.         $(CC) -mD $(RALLCFLAGS) -S -o $@ -c libppm4.c
  196. libppm5.olr:      $(DEFPPM) $(DEFPGM) $(DEFPBM) ppmdraw.h libppm5.c
  197.         $(CC) -mD $(RALLCFLAGS) -S -o $@ -c libppm5.c
  198. bitio.olr:        bitio.h /pbmplus.h bitio.c
  199.         $(CC) -mD $(RALLCFLAGS) -S -o $@ -c bitio.c
  200.  
  201. # large data version, not registerized (arguments on stack)
  202. $(SLLIBPPM):    libppm1.ols libppm2.ols libppm3.ols libppm4.ols libppm5.ols bitio.ols
  203.         -delete $(SLLIBPPM)
  204.         join libppm1.ols libppm2.ols libppm3.ols libppm4.ols libppm5.ols bitio.ols to $(SLLIBPPM)
  205. libppm1.ols:      $(DEFPPM) $(DEFPGM) $(DEFPBM) $(DEFLIBPPM) libppm1.c
  206.         $(CC) -mD $(SALLCFLAGS) -S -o $@ -c libppm1.c
  207. libppm2.ols:      $(DEFPPM) $(DEFPGM) $(DEFPBM) $(DEFLIBPPM) libppm2.c $(DEFLIBPGM) $(DEFLIBPBM)
  208.         $(CC) -mD $(SALLCFLAGS) -S -o $@ -c libppm2.c
  209. libppm3.ols:      $(DEFPPM) $(DEFPGM) $(DEFPBM) ppmcmap.h $(DEFLIBPPM) libppm3.c
  210.         $(CC) -mD $(SALLCFLAGS) -S -o $@ -c libppm3.c
  211. libppm4.ols:      $(DEFPPM) $(DEFPGM) $(DEFPBM) libppm4.c
  212.         $(CC) -mD $(SALLCFLAGS) -S -o $@ -c libppm4.c
  213. libppm5.ols:      $(DEFPPM) $(DEFPGM) $(DEFPBM) ppmdraw.h libppm5.c
  214.         $(CC) -mD $(SALLCFLAGS) -S -o $@ -c libppm5.c
  215. bitio.ols:        bitio.h /pbmplus.h bitio.c
  216.         $(CC) -mD $(SALLCFLAGS) -S -o $@ -c bitio.c
  217.  
  218.  
  219. # Other dependencies.
  220. gouldtoppm gouldtoppm.om:        gouldtoppm.c
  221. hpcdtoppm hpcdtoppm.om:          hpcdtoppm.c
  222. ilbmtoppm ilbmtoppm.om:          ilbmtoppm.c ilbm.h
  223. imgtoppm imgtoppm.om:            imgtoppm.c
  224. mtvtoppm mtvtoppm.om:            mtvtoppm.c
  225. pcxtoppm pcxtoppm.om:            pcxtoppm.c
  226. pgmtoppm pgmtoppm.om:            pgmtoppm.c
  227. pi1toppm pi1toppm.om:            pi1toppm.c
  228. picttoppm picttoppm.om:          picttoppm.c
  229. pjtoppm pjtoppm.om:              pjtoppm.c
  230. ppm3d ppm3d.om:                  ppm3d.c
  231. ppmchange ppmchange.om:          ppmchange.c
  232. ppmdim ppmdim.om:                ppmdim.c
  233. ppmdither ppmdither.om:          ppmdither.c
  234. ppmflash ppmflash.om:            ppmflash.c
  235. ppmforge ppmforge.om:            ppmforge.c
  236. ppmhist ppmhist.om:              ppmhist.c ppmcmap.h
  237. ppmmake ppmmake.om:              ppmmake.c
  238. ppmmix ppmmix.om:                ppmmix.c
  239. ppmntsc ppmntsc.om:              ppmntsc.c
  240. ppmpat ppmpat.om:                ppmpat.c ppmdraw.h
  241. ppmquant ppmquant.om:            ppmquant.c $(PGMDIR)/dithers.h ppmcmap.h
  242. ppmrelief ppmrelief.om:          ppmrelief.c
  243. ppmshift ppmshift.om:            ppmshift.c
  244. ppmspread ppmspread.om:          ppmspread.c
  245. ppmtoacad ppmtoacad.om:          ppmtoacad.c ppmcmap.h autocad.h
  246. ppmtogif ppmtogif.om:            ppmtogif.c ppmcmap.h
  247. ppmtoicr ppmtoicr.om:            ppmtoicr.c ppmcmap.h
  248. ppmtoilbm ppmtoilbm.om:          ppmtoilbm.c ilbm.h ppmcmap.h
  249. ppmtopcx ppmtopcx.om:            ppmtopcx.c ppmcmap.h
  250. ppmtopgm ppmtopgm.om:            ppmtopgm.c
  251. ppmtopi1 ppmtopi1.om:            ppmtopi1.c ppmcmap.h
  252. ppmtopict ppmtopict.om:          ppmtopict.c ppmcmap.h
  253. ppmtopj ppmtopj.om:              ppmtopj.c
  254. ppmtopuzz ppmtopuzz.om:          ppmtopuzz.c ppmcmap.h
  255. ppmtorgb3 ppmtorgb3.om:          ppmtorgb3.c
  256. ppmtosixel ppmtosixel.om:        ppmtosixel.c ppmcmap.h
  257. ppmtotga ppmtotga.om:            ppmtotga.c ppmcmap.h
  258. ppmtouil ppmtouil.om:            ppmtouil.c ppmcmap.h
  259. ppmtoxpm ppmtoxpm.om:            ppmtoxpm.c ppmcmap.h
  260. ppmtoyuv ppmtoyuv.om:            ppmtoyuv.c
  261. qrttoppm qrttoppm.om:            qrttoppm.c
  262. rawtoppm rawtoppm.om:            rawtoppm.c
  263. rgb3toppm rgb3toppm.om:          rgb3toppm.c
  264. sldtoppm sldtoppm.om:            sldtoppm.c ppmdraw.h autocad.h
  265. spctoppm spctoppm.om:            spctoppm.c
  266. sputoppm sputoppm.om:            sputoppm.c
  267. tgatoppm tgatoppm.om:            tgatoppm.c tga.h
  268. ximtoppm ximtoppm.om:            ximtoppm.c xim.h
  269. xpmtoppm xpmtoppm.om:            xpmtoppm.c
  270. yuvtoppm yuvtoppm.om:            yuvtoppm.c
  271. bmptoppm bmtoppm.om:             bmptoppm.c bmp.h bitio.h
  272. ppmtobmp ppmtobmp.om:            ppmtobmp.c bmp.h ppmcmap.h bitio.h
  273. ppmdist ppmdist.om:              ppmdist.c ppmcmap.h
  274. ppmtomap ppmtomap.om:            ppmtomap.c ppmcmap.h
  275. ppmtoyuvsplit ppmtoyuvsplit.om:  ppmtoyuvsplit.c
  276. yuvsplittoppm yuvsplittoppm.om:  yuvsplittoppm.c
  277. ppmbrighten ppmbrighten.om:      ppmbrighten.c
  278. ppmtomitsu ppmtomitsu.om:        ppmtomitsu.c mitsu.h ppmcmap.h
  279. ppmtopjxl ppmtopjxl.om:          ppmtopjxl.c ppmcmap.h
  280. ppmnorm ppmnorm.om:              ppmnorm.c lum.h
  281. ppmqvga ppmqvga.om:              ppmqvga.c
  282. xvminitoppm xvminitoppm.om:      xvminitoppm.c
  283.  
  284. clean:
  285.         -delete \#?.om \#?.os \#?.or \#?.ols \#?.olr DCC_ERRORS
  286.  
  287. cleanall:   clean
  288.         -delete \#?.lib
  289.         -delete $(BINDIR) all
  290.  
  291. installlib:     lib
  292.         copy $(LIBRARIES) to $(INSTALLLIB)
  293.         copy $(HEADERS) to $(INSTALLINCL)
  294.  
  295. installbin:     binaries
  296.         copy $(BINDIR) all to $(INSTALLBIN)
  297.  
  298. installall:     installlib installbin
  299.  
  300. install:
  301.         @echo "Please select: installlib, installbin, installall"
  302.  
  303.