home *** CD-ROM | disk | FTP | other *** search
/ Encyclopedia of Graphics File Formats Companion / GFF_CD.ISO / software / unix / jpeg / jpegv4a.tar / makefile.unix < prev    next >
Makefile  |  1993-02-18  |  7KB  |  173 lines

  1. # Makefile for Independent JPEG Group's software
  2.  
  3. # This makefile is suitable for Unix-like systems with non-ANSI compilers.
  4. # If you have an ANSI compiler, makefile.ansi is a better starting point.
  5.  
  6. # Read SETUP instructions before saying "make" !!
  7.  
  8. # The name of your C compiler:
  9. CC= cc
  10.  
  11. # You may need to adjust these cc options:
  12. CFLAGS= -O
  13. # In particular:
  14. #   Add -DBSD if on a pure BSD system (see jinclude.h).
  15. #   Add -DVMS if on a VMS system (see ansi2knr.c).
  16. #   Add -DMSDOS if on an MSDOS system (see ansi2knr.c).
  17. #   Add -DMEM_STATS to enable gathering of memory usage statistics.
  18. #   You may also want to add -DTWO_FILE_COMMANDLINE or -D switches for other
  19. #   symbols listed in jconfig.h, if you prefer not to change jconfig.h.
  20.  
  21. # Link-time cc options:
  22. LDFLAGS= 
  23.  
  24. # To link any special libraries, add the necessary -l commands here.
  25. # In particular, on some versions of HP-UX (and probably other SysV-derived
  26. # systems) there is a faster alternate malloc(3) library that you can use
  27. # by adding "-lmalloc" to this line.
  28. LDLIBS= 
  29.  
  30. # miscellaneous OS-dependent stuff
  31. # linker
  32. LN= $(CC)
  33. # file deletion command
  34. RM= rm -f
  35. # library (.a) file creation command
  36. AR= ar rc
  37. # second step in .a creation (use "touch" if not needed)
  38. AR2= ranlib
  39.  
  40.  
  41. # source files (independently compilable files)
  42. SOURCES= jbsmooth.c jcarith.c jccolor.c jcdeflts.c jcexpand.c jchuff.c \
  43.         jcmain.c jcmaster.c jcmcu.c jcpipe.c jcsample.c jdarith.c jdcolor.c \
  44.         jddeflts.c jdhuff.c jdmain.c jdmaster.c jdmcu.c jdpipe.c jdsample.c \
  45.         jerror.c jquant1.c jquant2.c jfwddct.c jrevdct.c jutils.c jmemmgr.c \
  46.         jrdjfif.c jrdgif.c jrdppm.c jrdrle.c jrdtarga.c jwrjfif.c jwrgif.c \
  47.         jwrppm.c jwrrle.c jwrtarga.c
  48. # virtual source files (not present in distribution file, see SETUP)
  49. VIRTSOURCES= jmemsys.c
  50. # system-dependent implementations of virtual source files
  51. SYSDEPFILES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemdos.h \
  52.         jmemdosa.asm
  53. # files included by source files
  54. INCLUDES= jinclude.h jconfig.h jpegdata.h jversion.h jmemsys.h
  55. # documentation, test, and support files
  56. DOCS= README SETUP USAGE CHANGELOG cjpeg.1 djpeg.1 architecture codingrules
  57. MAKEFILES= makefile.ansi makefile.unix makefile.manx makefile.sas \
  58.         makcjpeg.st makdjpeg.st makljpeg.st makefile.mc5 makefile.mc6 \
  59.         makefile.bcc makefile.icc makljpeg.icc makefile.mms makefile.vms \
  60.         makvms.opt
  61. OTHERFILES= ansi2knr.c ckconfig.c example.c
  62. TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg
  63. DISTFILES= $(DOCS) $(MAKEFILES) $(SOURCES) $(SYSDEPFILES) $(INCLUDES) \
  64.         $(OTHERFILES) $(TESTFILES)
  65. # objectfiles common to cjpeg and djpeg
  66. COMOBJECTS= jutils.o jerror.o jmemmgr.o jmemsys.o
  67. # compression objectfiles
  68. CLIBOBJECTS= jcmaster.o jcdeflts.o jcarith.o jccolor.o jcexpand.o jchuff.o \
  69.         jcmcu.o jcpipe.o jcsample.o jfwddct.o jwrjfif.o jrdgif.o jrdppm.o \
  70.         jrdrle.o jrdtarga.o
  71. COBJECTS= jcmain.o $(CLIBOBJECTS) $(COMOBJECTS)
  72. # decompression objectfiles
  73. DLIBOBJECTS= jdmaster.o jddeflts.o jbsmooth.o jdarith.o jdcolor.o jdhuff.o \
  74.         jdmcu.o jdpipe.o jdsample.o jquant1.o jquant2.o jrevdct.o jrdjfif.o \
  75.         jwrgif.o jwrppm.o jwrrle.o jwrtarga.o
  76. DOBJECTS= jdmain.o $(DLIBOBJECTS) $(COMOBJECTS)
  77. # These objectfiles are included in libjpeg.a
  78. LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
  79.  
  80.  
  81. all: ansi2knr cjpeg djpeg
  82. # By default, libjpeg.a is not built unless you explicitly request it.
  83. # You can add libjpeg.a to the line above if you want it built by default.
  84.  
  85.  
  86. # This rule causes ansi2knr to be invoked.  If you use this makefile,
  87. # make sure PROTO is not defined by jconfig.h.
  88.  
  89. .c.o:
  90.     ./ansi2knr $*.c tmpansi.c
  91.     $(CC) $(CFLAGS) -c tmpansi.c
  92.     mv tmpansi.o $*.o
  93.     $(RM) tmpansi.c
  94.  
  95. ansi2knr: ansi2knr.c
  96.     $(CC) $(CFLAGS) -o ansi2knr ansi2knr.c
  97.  
  98.  
  99. cjpeg: ansi2knr $(COBJECTS)
  100.     $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) $(LDLIBS)
  101.  
  102. djpeg: ansi2knr $(DOBJECTS)
  103.     $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) $(LDLIBS)
  104.  
  105. # libjpeg.a is useful if you are including the JPEG software in a larger
  106. # program; you'd include it in your link, rather than the individual modules.
  107. libjpeg.a: ansi2knr $(LIBOBJECTS)
  108.     $(RM) libjpeg.a
  109.     $(AR) libjpeg.a  $(LIBOBJECTS)
  110.     $(AR2) libjpeg.a
  111.  
  112. jmemsys.c:
  113.     echo You must select a system-dependent jmemsys.c file.
  114.     echo Please read the SETUP directions.
  115.     exit 1
  116.  
  117. clean:
  118.     $(RM) *.o cjpeg djpeg libjpeg.a ansi2knr core tmpansi.* testout.*
  119.  
  120. distribute:
  121.     $(RM) jpegsrc.tar*
  122.     tar cvf jpegsrc.tar $(DISTFILES)
  123.     compress -v jpegsrc.tar
  124.  
  125. test: cjpeg djpeg
  126.     $(RM) testout.ppm testout.gif testout.jpg
  127.     ./djpeg testorig.jpg >testout.ppm
  128.     ./djpeg -gif testorig.jpg >testout.gif
  129.     ./cjpeg testimg.ppm >testout.jpg
  130.     cmp testimg.ppm testout.ppm
  131.     cmp testimg.gif testout.gif
  132.     cmp testimg.jpg testout.jpg
  133.  
  134.  
  135. jbsmooth.o : jbsmooth.c jinclude.h jconfig.h jpegdata.h 
  136. jcarith.o : jcarith.c jinclude.h jconfig.h jpegdata.h 
  137. jccolor.o : jccolor.c jinclude.h jconfig.h jpegdata.h 
  138. jcdeflts.o : jcdeflts.c jinclude.h jconfig.h jpegdata.h 
  139. jcexpand.o : jcexpand.c jinclude.h jconfig.h jpegdata.h 
  140. jchuff.o : jchuff.c jinclude.h jconfig.h jpegdata.h 
  141. jcmain.o : jcmain.c jinclude.h jconfig.h jpegdata.h jversion.h 
  142. jcmaster.o : jcmaster.c jinclude.h jconfig.h jpegdata.h 
  143. jcmcu.o : jcmcu.c jinclude.h jconfig.h jpegdata.h 
  144. jcpipe.o : jcpipe.c jinclude.h jconfig.h jpegdata.h 
  145. jcsample.o : jcsample.c jinclude.h jconfig.h jpegdata.h 
  146. jdarith.o : jdarith.c jinclude.h jconfig.h jpegdata.h 
  147. jdcolor.o : jdcolor.c jinclude.h jconfig.h jpegdata.h 
  148. jddeflts.o : jddeflts.c jinclude.h jconfig.h jpegdata.h 
  149. jdhuff.o : jdhuff.c jinclude.h jconfig.h jpegdata.h 
  150. jdmain.o : jdmain.c jinclude.h jconfig.h jpegdata.h jversion.h 
  151. jdmaster.o : jdmaster.c jinclude.h jconfig.h jpegdata.h 
  152. jdmcu.o : jdmcu.c jinclude.h jconfig.h jpegdata.h 
  153. jdpipe.o : jdpipe.c jinclude.h jconfig.h jpegdata.h 
  154. jdsample.o : jdsample.c jinclude.h jconfig.h jpegdata.h 
  155. jerror.o : jerror.c jinclude.h jconfig.h jpegdata.h 
  156. jquant1.o : jquant1.c jinclude.h jconfig.h jpegdata.h 
  157. jquant2.o : jquant2.c jinclude.h jconfig.h jpegdata.h 
  158. jfwddct.o : jfwddct.c jinclude.h jconfig.h jpegdata.h 
  159. jrevdct.o : jrevdct.c jinclude.h jconfig.h jpegdata.h 
  160. jutils.o : jutils.c jinclude.h jconfig.h jpegdata.h 
  161. jmemmgr.o : jmemmgr.c jinclude.h jconfig.h jpegdata.h jmemsys.h 
  162. jrdjfif.o : jrdjfif.c jinclude.h jconfig.h jpegdata.h 
  163. jrdgif.o : jrdgif.c jinclude.h jconfig.h jpegdata.h 
  164. jrdppm.o : jrdppm.c jinclude.h jconfig.h jpegdata.h 
  165. jrdrle.o : jrdrle.c jinclude.h jconfig.h jpegdata.h 
  166. jrdtarga.o : jrdtarga.c jinclude.h jconfig.h jpegdata.h 
  167. jwrjfif.o : jwrjfif.c jinclude.h jconfig.h jpegdata.h 
  168. jwrgif.o : jwrgif.c jinclude.h jconfig.h jpegdata.h 
  169. jwrppm.o : jwrppm.c jinclude.h jconfig.h jpegdata.h 
  170. jwrrle.o : jwrrle.c jinclude.h jconfig.h jpegdata.h 
  171. jwrtarga.o : jwrtarga.c jinclude.h jconfig.h jpegdata.h 
  172. jmemsys.o : jmemsys.c jinclude.h jconfig.h jpegdata.h jmemsys.h 
  173.