home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / os2 / programm / 6939 < prev    next >
Encoding:
Text File  |  1992-12-11  |  9.0 KB  |  249 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!europa.asd.contel.com!emory!sol.ctr.columbia.edu!news.columbia.edu!cunixb.cc.columbia.edu!mig
  3. From: mig@cunixb.cc.columbia.edu (Meir I Green)
  4. Subject: Help with gcc and gmake
  5. Message-ID: <1992Dec11.164609.28288@news.columbia.edu>
  6. Sender: usenet@news.columbia.edu (The Network News)
  7. Nntp-Posting-Host: cunixb.cc.columbia.edu
  8. Reply-To: mig@cunixb.cc.columbia.edu (Meir I Green)
  9. Organization: Columbia University, New York
  10. Date: Fri, 11 Dec 1992 16:46:09 GMT
  11. Lines: 236
  12.  
  13. I am trying to compile jpegV4 for OS/2 2.0.
  14. Unfortunately, I don't have the docs for gmake or gcc :-)
  15. I just hacked the makefile until it compiled.
  16. Both cjpeg and djpeg compile, but as jcmain and jdmain.
  17.  
  18. There are no errors during compilation, but the programs create
  19. corrupt jpg and gif files when tested.
  20.  
  21. Can someone tell me what I am doing worng?
  22. Did I do something wrong with the makefile, or should I try a
  23. different compiler option...?
  24.  
  25. Maybe I don't understand the compiling/linking process?
  26. Please email advice!
  27.  
  28. Thank you very much!
  29. Meir
  30.  
  31. -----
  32. [G:\pics]ls -alg yoda.gif
  33. -rw-a--   189828 Jan 03  1991 yoda.gif
  34.  
  35. [G:\pics]cjpeg -verbose -quality 50 yoda.gif > tmp.jpg
  36. cjpeg -verbose -quality 50 yoda.gif > tmp.jpg
  37. Independent JPEG Group's CJPEG, version 4 10-Dec-92
  38. Copyright (C) 1992, Thomas G. Lane
  39. 640x480x256 GIF image
  40.  
  41. [G:\pics]djpeg -verbose tmp.jpg > tmp.gif
  42. Independent JPEG Group's DJPEG, version 4 10-Dec-92
  43. Copyright (C) 1992, Thomas G. Lane
  44. Start of Image
  45. JFIF APP0 marker, density 1x1  0
  46. Define Quantization Table 0  precision 0
  47. Corrupt JPEG data: 1 extraneous bytes before marker 0xdb
  48. Define Quantization Table 1  precision 0
  49. Start Of Frame 0xc0: width=640, height=480, components=3
  50.     Component 1: 2hx2v q=0
  51.     Component 2: 1hx1v q=1
  52.     Component 3: 1hx1v q=1
  53. Define Huffman Table 0x00
  54. Define Huffman Table 0x10
  55. Define Huffman Table 0x01
  56. Define Huffman Table 0x11
  57. Start Of Scan: 3 components
  58.     c1: [dc=0 ac=0]
  59.     c2: [dc=1 ac=1]
  60.     c3: [dc=1 ac=1]
  61. End Of Image
  62.  
  63. [G:\pics]
  64. -----
  65. # Makefile for Independent JPEG Group's software
  66.  
  67. # Makefile for OS/2 2.0 with gcc and gmake
  68. #
  69. # Meir Green (mig@columbia.edu)
  70. # 12-10-92
  71. #
  72. # You need to "copy jmemnobs.c jmemsys.c"
  73. # and "copy makefile.os2 makefile"
  74. # Then type "gmake" or "make"
  75. # Press enter when prompted to continue linking (link386)
  76. #
  77.  
  78. # This makefile is suitable for Unix-like systems with ANSI-capable compilers.
  79. # If you have a non-ANSI compiler, makefile.unix is a better starting point.
  80.  
  81. # Read SETUP instructions before saying "make" !!
  82.  
  83. # The name of your C compiler:
  84. CC= gcc
  85.  
  86. # You may need to adjust these cc options:
  87. CFLAGS= -c -O2
  88.  
  89. # in particular:
  90. #   add -dbsd if on a pure bsd system (see jinclude.h).
  91. #   add -dmem_stats to enable gathering of memory usage statistics.
  92. #   you may also want to add -dtwo_file_commandline or -d switches for other
  93. #   symbols listed in jconfig.h, if you prefer not to change jconfig.h.
  94.  
  95. # link-time cc options:
  96. ldflags=
  97.  
  98. # To link any special libraries, add the necessary -l commands here.
  99. # In particular, on some versions of HP-UX (and probably other SysV-derived
  100. # systems) there is a faster alternate malloc(3) library that you can use
  101. # by adding "-lmalloc" to this line.
  102. LDLIBS= 
  103.  
  104. # miscellaneous OS-dependent stuff
  105. # linker
  106. LN= link386
  107. # file deletion command
  108. RM= del
  109. # library (.a) file creation command
  110. AR= ar rc
  111. # second step in .a creation (use "touch" if not needed)
  112. AR2= ranlib
  113. # copy command
  114. CP= copy
  115.  
  116.  
  117. # source files (independently compilable files)
  118. SOURCES= jbsmooth.c jcarith.c jccolor.c jcdeflts.c jcexpand.c jchuff.c \
  119.         jcmain.c jcmaster.c jcmcu.c jcpipe.c jcsample.c jdarith.c jdcolor.c \
  120.         jddeflts.c jdhuff.c jdmain.c jdmaster.c jdmcu.c jdpipe.c jdsample.c \
  121.         jerror.c jquant1.c jquant2.c jfwddct.c jrevdct.c jutils.c jmemmgr.c \
  122.         jrdjfif.c jrdgif.c jrdppm.c jrdrle.c jrdtarga.c jwrjfif.c jwrgif.c \
  123.         jwrppm.c jwrrle.c jwrtarga.c
  124. # virtual source files (not present in distribution file, see SETUP)
  125. # VIRTSOURCES= jmemsys.c
  126. # Use jmemnobs.sys
  127. VIRTSOURCES= jmemsys.c
  128. # system-dependent implementations of virtual source files
  129. SYSDEPFILES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemdos.h \
  130.         jmemdosa.asm
  131. # files included by source files
  132. INCLUDES= jinclude.h jconfig.h jpegdata.h jversion.h jmemsys.h
  133. # documentation, test, and support files
  134. DOCS= README SETUP USAGE CHANGELOG cjpeg.1 djpeg.1 architecture codingrules
  135. MAKEFILES= makefile.ansi makefile.unix makefile.manx makefile.sas \
  136.         makcjpeg.st makdjpeg.st makljpeg.st makefile.mc5 makefile.mc6 \
  137.         makefile.bcc makefile.mms makefile.vms makvms.opt
  138. OTHERFILES= ansi2knr.c ckconfig.c example.c
  139. TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg
  140. DISTFILES= $(DOCS) $(MAKEFILES) $(SOURCES) $(SYSDEPFILES) $(INCLUDES) \
  141.         $(OTHERFILES) $(TESTFILES)
  142. # objectfiles common to cjpeg and djpeg
  143. COMOBJECTS= jutils.o jerror.o jmemmgr.o jmemsys.o
  144. # compression objectfiles
  145. CLIBOBJECTS= jcmaster.o jcdeflts.o jcarith.o jccolor.o jcexpand.o jchuff.o \
  146.         jcmcu.o jcpipe.o jcsample.o jfwddct.o jwrjfif.o jrdgif.o jrdppm.o \
  147.         jrdrle.o jrdtarga.o
  148. COBJECTS= jcmain.o $(CLIBOBJECTS) $(COMOBJECTS)
  149. # decompression objectfiles
  150. DLIBOBJECTS= jdmaster.o jddeflts.o jbsmooth.o jdarith.o jdcolor.o jdhuff.o \
  151.         jdmcu.o jdpipe.o jdsample.o jquant1.o jquant2.o jrevdct.o jrdjfif.o \
  152.         jwrgif.o jwrppm.o jwrrle.o jwrtarga.o
  153. DOBJECTS= jdmain.o $(DLIBOBJECTS) $(COMOBJECTS)
  154. LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
  155.  
  156.  
  157. all: cjpeg djpeg
  158. # By default, libjpeg.a is not built unless you explicitly request it.
  159. # You can add libjpeg.a to the line above if you want it built by default.
  160.  
  161.  
  162. cjpeg: $(COBJECTS)
  163.     $(CC) $(CFLAGS) cjpeg $(VIRTSOURCES) $(SOURCES) $(LDLIBS)
  164.     $(CP) *.obj *.o
  165.     $(LN) $(LDFLAGS) $(COBJECTS) $(LDLIBS)
  166.     $(CP) jcmain.exe cjpeg.exe
  167.     $(RM) jcmain.exe
  168.  
  169.  
  170. djpeg: $(DOBJECTS)
  171.     $(CC) $(CFLAGS) djpeg $(VIRTSOURCES) $(SOURCES) $(LDLIBS)
  172.     $(CP) *.obj *.o
  173.     $(LN) $(LDFLAGS) $(DOBJECTS) $(LDLIBS)
  174.     $(CP) jdmain.exe djpeg.exe
  175.     $(RM) jdmain.exe
  176.  
  177. # libjpeg.a is useful if you are including the JPEG software in a larger
  178. # program; you'd include it in your link, rather than the individual modules.
  179. libjpeg.a: $(LIBOBJECTS)
  180.     $(RM) libjpeg.a
  181.     $(AR) libjpeg.a  $(LIBOBJECTS)
  182.     $(AR2) libjpeg.a
  183.  
  184. jmemsys.c:
  185.     echo You must select a system-dependent jmemsys.c file.
  186.     echo Please read the SETUP directions.
  187.     exit 1
  188.  
  189. clean:
  190.     $(RM) *.o cjpeg djpeg libjpeg.a core testout.*
  191.  
  192. distribute:
  193.     $(RM) jpegsrc.tar*
  194.     tar cvf jpegsrc.tar $(DISTFILES)
  195.     compress -v jpegsrc.tar
  196.  
  197. test: cjpeg djpeg
  198.     $(RM) testout.ppm testout.gif testout.jpg
  199.     ./djpeg testorig.jpg >testout.ppm
  200.     ./djpeg -gif testorig.jpg >testout.gif
  201.     ./cjpeg testimg.ppm >testout.jpg
  202.     cmp testimg.ppm testout.ppm
  203.     cmp testimg.gif testout.gif
  204.     cmp testimg.jpg testout.jpg
  205.  
  206.  
  207. jbsmooth.o : jbsmooth.c jinclude.h jconfig.h jpegdata.h 
  208. jcarith.o : jcarith.c jinclude.h jconfig.h jpegdata.h 
  209. jccolor.o : jccolor.c jinclude.h jconfig.h jpegdata.h 
  210. jcdeflts.o : jcdeflts.c jinclude.h jconfig.h jpegdata.h 
  211. jcexpand.o : jcexpand.c jinclude.h jconfig.h jpegdata.h 
  212. jchuff.o : jchuff.c jinclude.h jconfig.h jpegdata.h 
  213. jcmain.o : jcmain.c jinclude.h jconfig.h jpegdata.h jversion.h 
  214. jcmaster.o : jcmaster.c jinclude.h jconfig.h jpegdata.h 
  215. jcmcu.o : jcmcu.c jinclude.h jconfig.h jpegdata.h 
  216. jcpipe.o : jcpipe.c jinclude.h jconfig.h jpegdata.h 
  217. jcsample.o : jcsample.c jinclude.h jconfig.h jpegdata.h 
  218. jdarith.o : jdarith.c jinclude.h jconfig.h jpegdata.h 
  219. jdcolor.o : jdcolor.c jinclude.h jconfig.h jpegdata.h 
  220. jddeflts.o : jddeflts.c jinclude.h jconfig.h jpegdata.h 
  221. jdhuff.o : jdhuff.c jinclude.h jconfig.h jpegdata.h 
  222. jdmain.o : jdmain.c jinclude.h jconfig.h jpegdata.h jversion.h 
  223. jdmaster.o : jdmaster.c jinclude.h jconfig.h jpegdata.h 
  224. jdmcu.o : jdmcu.c jinclude.h jconfig.h jpegdata.h 
  225. jdpipe.o : jdpipe.c jinclude.h jconfig.h jpegdata.h 
  226. jdsample.o : jdsample.c jinclude.h jconfig.h jpegdata.h 
  227. jerror.o : jerror.c jinclude.h jconfig.h jpegdata.h 
  228. jquant1.o : jquant1.c jinclude.h jconfig.h jpegdata.h 
  229. jquant2.o : jquant2.c jinclude.h jconfig.h jpegdata.h 
  230. jfwddct.o : jfwddct.c jinclude.h jconfig.h jpegdata.h 
  231. jrevdct.o : jrevdct.c jinclude.h jconfig.h jpegdata.h 
  232. jutils.o : jutils.c jinclude.h jconfig.h jpegdata.h 
  233. jmemmgr.o : jmemmgr.c jinclude.h jconfig.h jpegdata.h jmemsys.h 
  234. jrdjfif.o : jrdjfif.c jinclude.h jconfig.h jpegdata.h 
  235. jrdgif.o : jrdgif.c jinclude.h jconfig.h jpegdata.h 
  236. jrdppm.o : jrdppm.c jinclude.h jconfig.h jpegdata.h 
  237. jrdrle.o : jrdrle.c jinclude.h jconfig.h jpegdata.h 
  238. jrdtarga.o : jrdtarga.c jinclude.h jconfig.h jpegdata.h 
  239. jwrjfif.o : jwrjfif.c jinclude.h jconfig.h jpegdata.h 
  240. jwrgif.o : jwrgif.c jinclude.h jconfig.h jpegdata.h 
  241. jwrppm.o : jwrppm.c jinclude.h jconfig.h jpegdata.h 
  242. jwrrle.o : jwrrle.c jinclude.h jconfig.h jpegdata.h 
  243. jwrtarga.o : jwrtarga.c jinclude.h jconfig.h jpegdata.h 
  244. jmemsys.o : jmemsys.c jinclude.h jconfig.h jpegdata.h jmemsys.h
  245.  * * * * *  =================== Internet   mig@cunixb.cc.columbia.edu
  246. * * * * * * == Meir I. Green == AmateurPkt N2JPG@W2XO.PA.USA.NOAM
  247.  * * * * *  = mig@columbia.edu= Amateur IP N2JPG@uhm.ampr.org
  248. * * * * * * =================== BC-Goliath green@smtplink.barnard.columbia.edu 
  249.