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 < prev    next >
Makefile  |  1998-03-19  |  6KB  |  154 lines

  1. # Makefile for ppm tools.
  2. #
  3. # Copyright (C) 1989, 1991 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. # Default values, usually overridden by top-level Makefile.
  13. CC =        gcc2
  14. CFLAGS =     -ansi -O -m68000 -ucc -T/r0 -D_OSK -DOSK -I.. -mremote 
  15.  
  16. RGBDEF =    -DRGB_DB="""/dd/sys/rgb.txt"""
  17.  
  18. ODIR = .
  19. LDFLAGS = -L/dd/lib -nocol -m68000 -los9lib.l -ctrap -l/dd/blarslib/blarslib.l
  20.  
  21. PGMDIR =    ../pgm
  22. INCLUDEPGM =    -I$(PGMDIR)
  23. LIBPGM =    $(PGMDIR)/libpgm.l
  24. DEFPGM =    $(PGMDIR)/pgm.h
  25. DEFLIBPGM = $(PGMDIR)/libpgm.h
  26.  
  27. PBMDIR =    ../pbm
  28. INCLUDEPBM =    -I$(PBMDIR)
  29. LIBPBM =    $(PBMDIR)/libpbm.l
  30. DEFPBM =    $(PBMDIR)/pbm.h ../pbmplus.h
  31. DEFLIBPBM = $(PBMDIR)/libpbm.h
  32.  
  33. SHELL =     ksh
  34. INCLUDE =   -I.. $(INCLUDEPGM) $(INCLUDEPBM)
  35. ALLCFLAGS = $(CFLAGS) $(RGBDEF) $(INCLUDE)
  36. LIBPPM =    libppm.l
  37.  
  38. BINARIES =  bmptoppm gouldtoppm hpcdtoppm ilbmtoppm imgtoppm mtvtoppm \
  39.         pcxtoppm pgmtoppm pi1toppm picttoppm \
  40.         pjtoppm ppm3d ppmbrighten ppmchange ppmdim ppmdist ppmdither ppmflash ppmhist ppmmake \
  41.         ppmmix ppmnorm ppmntsc ppmquant ppmrelief ppmshift ppmspread ppmtoacad \
  42.         ppmtobmp  ppmtogif ppmtoicr \
  43.         ppmtoilbm ppmtomitsu ppmtopcx ppmtopgm ppmtopi1 ppmtopict \
  44.         ppmtopj ppmtopjxl ppmtopuzz ppmtorgb3 ppmtosixel \
  45.         ppmtotga ppmtouil ppmtoxpm ppmtoyuv ppmtoyuvsplit qrttoppm \
  46.         rawtoppm rgb3toppm sldtoppm spctoppm sputoppm \
  47.         tgatoppm ximtoppm xpmtoppm xvminitoppm yuvtoppm yuvsplittoppm \
  48.         ppmforge ppmpat ppmqvga ppmtomap
  49.  
  50. SCRIPTS =   ppmquantall
  51.  
  52. OBJECTS =  bmptoppm.r gouldtoppm.r hpcdtoppm.r ilbmtoppm.r imgtoppm.r mtvtoppm.r \
  53.         pcxtoppm.r pgmtoppm.r pi1toppm.r picttoppm.r \
  54.         pjtoppm.r ppm3d.r ppmbrighten.r ppmchange.r ppmdim.r ppmdist.r ppmdither.r ppmflash.r ppmhist.r ppmmake.r \
  55.         ppmmix.r ppmnorm.r ppmntsc.r ppmquant.r ppmrelief.r ppmshift.r ppmspread.r ppmtoacad.r \
  56.         ppmtobmp.r  ppmtogif.r ppmtoicr.r \
  57.         ppmtoilbm.r ppmtomitsu.r ppmtopcx.r ppmtopgm.r ppmtopi1.r ppmtopict.r \
  58.         ppmtopj.r ppmtopjxl.r ppmtopuzz.r ppmtorgb3.r ppmtosixel.r \
  59.         ppmtotga.r ppmtouil.r ppmtoxpm.r ppmtoyuv.r ppmtoyuvsplit.r qrttoppm.r \
  60.         rawtoppm.r rgb3toppm.r sldtoppm.r spctoppm.r sputoppm.r \
  61.         tgatoppm.r ximtoppm.r xpmtoppm.r xvminitoppm.r yuvtoppm.r yuvsplittoppm.r \
  62.         ppmforge.r ppmpat.r ppmqvga.r ppmtomap.r
  63.  
  64. .c.r:
  65.     $(CC) $(CFLAGS) -c -o $*.r $*.c
  66.  
  67. all.done:   $(BINARIES)
  68.    echo all done
  69.  
  70. merge:      ppmmerge
  71. ppmmerge:   ppmmerge.c $(OBJECTS) $(LIBPPM) $(LIBPGM) $(LIBPBM)
  72.     $(CC) $(ALLCFLAGS) $(LDFLAGS) -o ../cmds/$@ $@.c $(OBJECTS) -l$(LIBPPM)\
  73.       -l$(LIBPGM) -l$(LIBPBM)
  74.  
  75. # Rule for plain programs.
  76. $(BINARIES):    ppm.h $(DEFPGM) $(DEFPBM) $(LIBPPM) $(LIBPGM) $(LIBPBM)
  77.     $(CC) $(ALLCFLAGS) $(LDFLAGS) -o ../cmds/$@ $@.c -l$(LIBPPM) -l$(LIBPGM) -l$(LIBPBM)
  78.  
  79. # Rule for objects.
  80. $(OBJECTS): ppm.h $(DEFPGM) $(DEFPBM)
  81.     $(CC) $(ALLCFLAGS) "-Dmain=$*_main" -c $*.c
  82.  
  83. # And libraries.
  84. $(LIBPBM):
  85.     cd $(PBMDIR) ; make lib
  86. $(LIBPGM):
  87.     cd $(PGMDIR) ; make lib
  88. lib:        $(LIBPPM)
  89. $(LIBPPM):  libppm1.r libppm2.r libppm3.r libppm4.r libppm5.r bitio.r
  90.    merge libppm1.r libppm2.r libppm3.r libppm4.r libppm5.r bitio.r >-$(LIBPPM)
  91.  
  92. libppm1.r:  ppm.h $(DEFPGM) $(DEFPBM) libppm.h libppm1.c
  93.     $(CC) $(ALLCFLAGS) -c libppm1.c
  94. libppm2.r:  ppm.h $(DEFPGM) $(DEFPBM) libppm.h libppm2.c $(DEFLIBPGM) \
  95.         $(DEFLIBPBM)
  96.     $(CC) $(ALLCFLAGS) -c libppm2.c
  97. libppm3.r:  ppm.h $(DEFPGM) $(DEFPBM) ppmcmap.h libppm.h libppm3.c
  98.     $(CC) $(ALLCFLAGS) -c libppm3.c
  99. libppm4.r:  ppm.h $(DEFPGM) $(DEFPBM) libppm4.c
  100.     $(CC) $(ALLCFLAGS) -c libppm4.c
  101. libppm5.r:  ppm.h $(DEFPGM) $(DEFPBM) ppmdraw.h libppm5.c
  102.     $(CC) $(ALLCFLAGS) -c libppm5.c
  103.  
  104. # Other dependencies.
  105. bmptoppm bmptoppm.r:        bmptoppm.c
  106. gouldtoppm gouldtoppm.r:    gouldtoppm.c
  107. ilbmtoppm ilbmtoppm.r:      ilbmtoppm.c ilbm.h
  108. imgtoppm imgtoppm.r:        imgtoppm.c
  109. mtvtoppm mtvtoppm.r:        mtvtoppm.c
  110. pcxtoppm pcxtoppm.r:        pcxtoppm.c
  111. pgmtoppm pgmtoppm.r:        pgmtoppm.c
  112. pi1toppm pi1toppm.r:        pi1toppm.c
  113. picttoppm picttoppm.r:      picttoppm.c
  114. pjtoppm pjtoppm.r:      pjtoppm.c
  115. ppmdither ppmdither.r:      ppmdither.c
  116. ppmforge ppmforge.r:        ppmforge.c
  117. ppmhist ppmhist.r:      ppmhist.c ppmcmap.h
  118. ppmmake ppmmake.r:      ppmmake.c
  119. ppmpat ppmpat.r:        ppmpat.c ppmdraw.h
  120. ppmquant ppmquant.r:        ppmquant.c $(PGMDIR)/dithers.h ppmcmap.h
  121. ppmrelief ppmrelief.r:      ppmrelief.c
  122. ppmtoacad ppmtoacad.r:      ppmtoacad.c ppmcmap.h autocad.h
  123. ppmtogif ppmtogif.r:        ppmtogif.c ppmcmap.h
  124. ppmtoicr ppmtoicr.r:        ppmtoicr.c ppmcmap.h
  125. ppmtoilbm ppmtoilbm.r:      ppmtoilbm.c ilbm.h ppmcmap.h
  126. ppmtopcx ppmtopcx.r:        ppmtopcx.c ppmcmap.h
  127. ppmtopgm ppmtopgm.r:        ppmtopgm.c
  128. ppmtopi1 ppmtopi1.r:        ppmtopi1.c ppmcmap.h
  129. ppmtopict ppmtopict.r:      ppmtopict.c ppmcmap.h
  130. ppmtopj ppmtopj.r:           ppmtopj.c
  131. ppmtopjxl ppmtopjxl.r:      ppmtopjxl.c
  132. ppmtopuzz ppmtopuzz.r:      ppmtopuzz.c ppmcmap.h
  133. ppmtorgb3 ppmtorgb3.r:      ppmtorgb3.c
  134. ppmtosixel ppmtosixel.r:    ppmtosixel.c ppmcmap.h
  135. ppmtotga ppmtotga.r:        ppmtotga.c ppmcmap.h
  136. ppmtouil ppmtouil.r:        ppmtouil.c ppmcmap.h
  137. ppmtoxpm ppmtoxpm.r:        ppmtoxpm.c ppmcmap.h
  138. ppmtoyuv ppmtoyuv.r:        ppmtoyuv.c
  139. qrttoppm qrttoppm.r:        qrttoppm.c
  140. rawtoppm rawtoppm.r:        rawtoppm.c
  141. rgb3toppm rgb3toppm.r:      rgb3toppm.c
  142. sldtoppm sldtoppm.r:        sldtoppm.c ppmdraw.h autocad.h
  143. spctoppm spctoppm.r:        spctoppm.c
  144. sputoppm sputoppm.r:        sputoppm.c
  145. tgatoppm tgatoppm.r:        tgatoppm.c tga.h
  146. ximtoppm ximtoppm.r:        ximtoppm.c xim.h
  147. xpmtoppm xpmtoppm.r:        xpmtoppm.c
  148. yuvtoppm yuvtoppm.r:        yuvtoppm.c
  149. bmptoppm bmptoppm.r:        bmptoppm.c
  150. ppmtobmp ppmtobmp.r:        ppmtobmp.c
  151.  
  152.  
  153.  
  154.