makefile.bcc 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. # Makefile for Independent JPEG Group's software
  2. # This makefile is suitable for Borland C on MS-DOS or OS/2.
  3. # It works with Borland C++ for DOS, revision 3.0 or later,
  4. # and has been tested with Borland C++ for OS/2.
  5. # Watch out for optimization bugs in the OS/2 compilers --- see notes below!
  6. # Thanks to Tom Wright and Ge' Weijers (original DOS) and
  7. # Ken Porter (OS/2) for this file.
  8. # Read installation instructions before saying "make" !!
  9. # Are we under DOS or OS/2?
  10. !if !$d(DOS) && !$d(OS2)
  11. !if $d(__OS2__)
  12. OS2=1
  13. !else
  14. DOS=1
  15. !endif
  16. !endif
  17. # The name of your C compiler:
  18. CC= bcc
  19. # You may need to adjust these cc options:
  20. !if $d(DOS)
  21. CFLAGS= -O2 -mm -w-par -w-stu -w-ccc -w-rch
  22. !else
  23. CFLAGS= -O1 -w-par -w-stu -w-ccc -w-rch
  24. !endif
  25. # -O2 enables full code optimization (for pre-3.0 Borland C++, use -O -G -Z).
  26. # -O2 is buggy in Borland OS/2 C++ revision 2.0, so use -O1 there for now.
  27. # If you have Borland OS/2 C++ revision 1.0, use -O or no optimization at all.
  28. # -mm selects medium memory model (near data, far code pointers; DOS only!)
  29. # -w-par suppresses warnings about unused function parameters
  30. # -w-stu suppresses warnings about incomplete structures
  31. # -w-ccc suppresses warnings about compile-time-constant conditions
  32. # -w-rch suppresses warnings about unreachable code
  33. # Generally, we recommend defining any configuration symbols in jconfig.h,
  34. # NOT via -D switches here.
  35. # Link-time cc options:
  36. !if $d(DOS)
  37. LDFLAGS= -mm
  38. # memory model option here must match CFLAGS!
  39. !else
  40. LDFLAGS=
  41. # -lai full-screen app
  42. # -lc case-significant link
  43. !endif
  44. # Put here the object file name for the correct system-dependent memory
  45. # manager file.
  46. # For DOS, we recommend jmemdos.c and jmemdosa.asm.
  47. # For OS/2, we recommend jmemnobs.c (flat memory!)
  48. # SYSDEPMEMLIB must list the same files with "+" signs for the librarian.
  49. !if $d(DOS)
  50. SYSDEPMEM= jmemdos.obj jmemdosa.obj
  51. SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj
  52. !else
  53. SYSDEPMEM= jmemnobs.obj
  54. SYSDEPMEMLIB= +jmemnobs.obj
  55. !endif
  56. # End of configurable options.
  57. # source files: JPEG library proper
  58. LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
  59. jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
  60. jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
  61. jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
  62. jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
  63. jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
  64. jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
  65. jquant2.c jutils.c jmemmgr.c
  66. # memmgr back ends: compile only one of these into a working library
  67. SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
  68. # source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
  69. APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
  70. rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
  71. rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
  72. SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
  73. # files included by source files
  74. INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
  75. jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
  76. # documentation, test, and support files
  77. DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
  78. wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
  79. coderules.txt filelist.txt change.log
  80. MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \
  81. makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \
  82. makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 \
  83. makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 \
  84. makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 \
  85. makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 \
  86. makejsln.v10 makeasln.v10 makejvcx.v10 makejfil.v10 makecvcx.v10 \
  87. makecfil.v10 makedvcx.v10 makedfil.v10 maketvcx.v10 maketfil.v10 \
  88. makervcx.v10 makerfil.v10 makewvcx.v10 makewfil.v10 makeproj.mac \
  89. makcjpeg.st makdjpeg.st makljpeg.st maktjpeg.st makefile.manx \
  90. makefile.sas makefile.mms makefile.vms makvms.opt
  91. CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
  92. jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
  93. jconfig.vms
  94. CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \
  95. missing ar-lib
  96. OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map
  97. TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
  98. testimgp.jpg
  99. DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
  100. $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
  101. # library object files common to compression and decompression
  102. COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
  103. # compression library object files
  104. CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \
  105. jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \
  106. jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \
  107. jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
  108. # decompression library object files
  109. DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \
  110. jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \
  111. jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \
  112. jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \
  113. jdmerge.obj
  114. # These objectfiles are included in libjpeg.lib
  115. LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
  116. # object files for sample applications (excluding library files)
  117. COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
  118. rdswitch.obj cdjpeg.obj
  119. DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
  120. rdcolmap.obj cdjpeg.obj
  121. TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
  122. all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
  123. libjpeg.lib: $(LIBOBJECTS)
  124. - del libjpeg.lib
  125. tlib libjpeg.lib /E /C @&&|
  126. +jcapimin.obj +jcapistd.obj +jcarith.obj +jctrans.obj +jcparam.obj &
  127. +jdatadst.obj +jcinit.obj +jcmaster.obj +jcmarker.obj +jcmainct.obj &
  128. +jcprepct.obj +jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj &
  129. +jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj +jfdctint.obj +jdapimin.obj &
  130. +jdapistd.obj +jdarith.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj &
  131. +jdinput.obj +jdmarker.obj +jdhuff.obj +jdmainct.obj +jdcoefct.obj &
  132. +jdpostct.obj +jddctmgr.obj +jidctfst.obj +jidctflt.obj +jidctint.obj &
  133. +jdsample.obj +jdcolor.obj +jquant1.obj +jquant2.obj +jdmerge.obj &
  134. +jaricom.obj +jcomapi.obj +jutils.obj +jerror.obj +jmemmgr.obj &
  135. $(SYSDEPMEMLIB)
  136. |
  137. cjpeg.exe: $(COBJECTS) libjpeg.lib
  138. $(CC) $(LDFLAGS) -ecjpeg.exe $(COBJECTS) libjpeg.lib
  139. djpeg.exe: $(DOBJECTS) libjpeg.lib
  140. $(CC) $(LDFLAGS) -edjpeg.exe $(DOBJECTS) libjpeg.lib
  141. jpegtran.exe: $(TROBJECTS) libjpeg.lib
  142. $(CC) $(LDFLAGS) -ejpegtran.exe $(TROBJECTS) libjpeg.lib
  143. rdjpgcom.exe: rdjpgcom.c
  144. !if $d(DOS)
  145. $(CC) -ms -O rdjpgcom.c
  146. !else
  147. $(CC) $(CFLAGS) rdjpgcom.c
  148. !endif
  149. # On DOS, wrjpgcom needs large model so it can malloc a 64K chunk
  150. wrjpgcom.exe: wrjpgcom.c
  151. !if $d(DOS)
  152. $(CC) -ml -O wrjpgcom.c
  153. !else
  154. $(CC) $(CFLAGS) wrjpgcom.c
  155. !endif
  156. # This "{}" syntax allows Borland Make to "batch" source files.
  157. # In this way, each run of the compiler can build many modules.
  158. .c.obj:
  159. $(CC) $(CFLAGS) -c{ $<}
  160. jconfig.h: jconfig.txt
  161. echo You must prepare a system-dependent jconfig.h file.
  162. echo Please read the installation directions in install.txt.
  163. exit 1
  164. clean:
  165. - del *.obj
  166. - del libjpeg.lib
  167. - del cjpeg.exe
  168. - del djpeg.exe
  169. - del jpegtran.exe
  170. - del rdjpgcom.exe
  171. - del wrjpgcom.exe
  172. - del testout*.*
  173. test: cjpeg.exe djpeg.exe jpegtran.exe
  174. - del testout*.*
  175. djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
  176. djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
  177. cjpeg -dct int -outfile testout.jpg testimg.ppm
  178. djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
  179. cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
  180. jpegtran -outfile testoutt.jpg testprog.jpg
  181. !if $d(DOS)
  182. fc /b testimg.ppm testout.ppm
  183. fc /b testimg.bmp testout.bmp
  184. fc /b testimg.jpg testout.jpg
  185. fc /b testimg.ppm testoutp.ppm
  186. fc /b testimgp.jpg testoutp.jpg
  187. fc /b testorig.jpg testoutt.jpg
  188. !else
  189. echo n > n.tmp
  190. comp testimg.ppm testout.ppm < n.tmp
  191. comp testimg.bmp testout.bmp < n.tmp
  192. comp testimg.jpg testout.jpg < n.tmp
  193. comp testimg.ppm testoutp.ppm < n.tmp
  194. comp testimgp.jpg testoutp.jpg < n.tmp
  195. comp testorig.jpg testoutt.jpg < n.tmp
  196. del n.tmp
  197. !endif
  198. jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  199. jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  200. jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  201. jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  202. jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  203. jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  204. jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  205. jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  206. jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  207. jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  208. jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  209. jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  210. jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  211. jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  212. jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  213. jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  214. jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  215. jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  216. jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  217. jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  218. jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
  219. jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
  220. jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  221. jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  222. jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  223. jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  224. jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  225. jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  226. jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  227. jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  228. jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  229. jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  230. jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  231. jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  232. jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
  233. jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  234. jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  235. jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  236. jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  237. jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  238. jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  239. jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  240. jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  241. jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  242. jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
  243. jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
  244. jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
  245. jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
  246. jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
  247. jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
  248. cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
  249. djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
  250. jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
  251. rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
  252. wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
  253. cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  254. rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  255. rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  256. transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
  257. rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  258. wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  259. rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  260. wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  261. rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  262. wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  263. rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  264. wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  265. rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  266. wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  267. jmemdosa.obj: jmemdosa.asm
  268. tasm /mx jmemdosa.asm