home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / compresn / jpegv3sr / makefile.uni < prev    next >
Makefile  |  1992-03-17  |  7KB  |  168 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)
  49. VIRTSOURCES= jmemsys.c
  50. # system-dependent implementations of 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 egetopt.c
  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.         makefile.mc5 makefile.mc6 makcjpeg.lnk makdjpeg.lnk makefile.bcc \
  59.         makcjpeg.lst makdjpeg.lst makefile.pwc makcjpeg.cf makdjpeg.cf \
  60.         makljpeg.cf makefile.mms makefile.vms 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. clean:
  113.     $(RM) *.o cjpeg djpeg libjpeg.a ansi2knr core tmpansi.* testout.*
  114.  
  115. distribute:
  116.     $(RM) jpegsrc.tar*
  117.     tar cvf jpegsrc.tar $(DISTFILES)
  118.     compress -v jpegsrc.tar
  119.  
  120. test: cjpeg djpeg
  121.     $(RM) testout.ppm testout.gif testout.jpg
  122.     ./djpeg testorig.jpg >testout.ppm
  123.     ./djpeg -G testorig.jpg >testout.gif
  124.     ./cjpeg testimg.ppm >testout.jpg
  125.     cmp testimg.ppm testout.ppm
  126.     cmp testimg.gif testout.gif
  127.     cmp testimg.jpg testout.jpg
  128.  
  129.  
  130. jbsmooth.o : jbsmooth.c jinclude.h jconfig.h jpegdata.h 
  131. jcarith.o : jcarith.c jinclude.h jconfig.h jpegdata.h 
  132. jccolor.o : jccolor.c jinclude.h jconfig.h jpegdata.h 
  133. jcdeflts.o : jcdeflts.c jinclude.h jconfig.h jpegdata.h 
  134. jcexpand.o : jcexpand.c jinclude.h jconfig.h jpegdata.h 
  135. jchuff.o : jchuff.c jinclude.h jconfig.h jpegdata.h 
  136. jcmain.o : jcmain.c jinclude.h jconfig.h jpegdata.h jversion.h egetopt.c 
  137. jcmaster.o : jcmaster.c jinclude.h jconfig.h jpegdata.h 
  138. jcmcu.o : jcmcu.c jinclude.h jconfig.h jpegdata.h 
  139. jcpipe.o : jcpipe.c jinclude.h jconfig.h jpegdata.h 
  140. jcsample.o : jcsample.c jinclude.h jconfig.h jpegdata.h 
  141. jdarith.o : jdarith.c jinclude.h jconfig.h jpegdata.h 
  142. jdcolor.o : jdcolor.c jinclude.h jconfig.h jpegdata.h 
  143. jddeflts.o : jddeflts.c jinclude.h jconfig.h jpegdata.h 
  144. jdhuff.o : jdhuff.c jinclude.h jconfig.h jpegdata.h 
  145. jdmain.o : jdmain.c jinclude.h jconfig.h jpegdata.h jversion.h egetopt.c 
  146. jdmaster.o : jdmaster.c jinclude.h jconfig.h jpegdata.h 
  147. jdmcu.o : jdmcu.c jinclude.h jconfig.h jpegdata.h 
  148. jdpipe.o : jdpipe.c jinclude.h jconfig.h jpegdata.h 
  149. jdsample.o : jdsample.c jinclude.h jconfig.h jpegdata.h 
  150. jerror.o : jerror.c jinclude.h jconfig.h jpegdata.h 
  151. jquant1.o : jquant1.c jinclude.h jconfig.h jpegdata.h 
  152. jquant2.o : jquant2.c jinclude.h jconfig.h jpegdata.h 
  153. jfwddct.o : jfwddct.c jinclude.h jconfig.h jpegdata.h 
  154. jrevdct.o : jrevdct.c jinclude.h jconfig.h jpegdata.h 
  155. jutils.o : jutils.c jinclude.h jconfig.h jpegdata.h 
  156. jmemmgr.o : jmemmgr.c jinclude.h jconfig.h jpegdata.h jmemsys.h 
  157. jrdjfif.o : jrdjfif.c jinclude.h jconfig.h jpegdata.h 
  158. jrdgif.o : jrdgif.c jinclude.h jconfig.h jpegdata.h 
  159. jrdppm.o : jrdppm.c jinclude.h jconfig.h jpegdata.h 
  160. jrdrle.o : jrdrle.c jinclude.h jconfig.h jpegdata.h 
  161. jrdtarga.o : jrdtarga.c jinclude.h jconfig.h jpegdata.h 
  162. jwrjfif.o : jwrjfif.c jinclude.h jconfig.h jpegdata.h 
  163. jwrgif.o : jwrgif.c jinclude.h jconfig.h jpegdata.h 
  164. jwrppm.o : jwrppm.c jinclude.h jconfig.h jpegdata.h 
  165. jwrrle.o : jwrrle.c jinclude.h jconfig.h jpegdata.h 
  166. jwrtarga.o : jwrtarga.c jinclude.h jconfig.h jpegdata.h 
  167. jmemsys.o : jmemsys.c jinclude.h jconfig.h jpegdata.h jmemsys.h 
  168.