makefile.xc 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. # Makefile for Independent JPEG Group's software
  2. # This makefile is suitable for Xcode Apple Clang on Apple Darwin/macOS.
  3. # Tested with Xcode 15.2 (2024),
  4. # Apple clang version 15.0.0 (clang-1500.1.0.2.5),
  5. # Target: arm64-apple-darwin23.2.0,
  6. # GNU Make 3.81 (2006).
  7. # Read installation instructions in install.txt before saying "make",
  8. # or use either
  9. # make -f makefile.xc setup
  10. # or
  11. # make -f makefile.xc setupcopy
  12. # before saying
  13. # make -f makefile.xc
  14. # Test:
  15. # make -f makefile.xc test
  16. # Clean:
  17. # make -f makefile.xc clean
  18. # The name of your C compiler:
  19. CC= cc
  20. # You may need to adjust these cc options:
  21. CFLAGS= -O2 -Wall
  22. # Generally, we recommend defining any configuration symbols in jconfig.h,
  23. # NOT via -D switches here.
  24. # Link-time cc options:
  25. LDFLAGS=
  26. # To link any special libraries, add the necessary -l commands here.
  27. LDLIBS=
  28. # Put here the object file name for the correct system-dependent memory
  29. # manager file. For Unix this is usually jmemnobs.o, but you may want
  30. # to use jmemansi.o or jmemname.o if you have limited swap space.
  31. SYSDEPMEM= jmemnobs.o
  32. # miscellaneous OS-dependent stuff
  33. # linker
  34. LN= $(CC)
  35. # file deletion command
  36. RM= rm -f
  37. # file rename command
  38. MV= mv
  39. # file copy command
  40. CP= cp
  41. # library (.a) file creation command
  42. AR= ar rc
  43. # second step in .a creation (use "touch" if not needed)
  44. AR2= ranlib
  45. # End of configurable options.
  46. # source files: JPEG library proper
  47. LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
  48. jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
  49. jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
  50. jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
  51. jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
  52. jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
  53. jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
  54. jquant2.c jutils.c jmemmgr.c
  55. # memmgr back ends: compile only one of these into a working library
  56. SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
  57. # source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
  58. APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
  59. rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
  60. rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
  61. SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
  62. # files included by source files
  63. INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
  64. jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
  65. # documentation, test, and support files
  66. DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
  67. wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
  68. coderules.txt filelist.txt cdaltui.txt change.log
  69. MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.xc \
  70. makefile.bcc makefile.b32 makefile.c32 makefile.d32 makefile.x32 \
  71. makefile.b64 makefile.mc6 makefile.dj makefile.wat makefile.vc \
  72. makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \
  73. makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \
  74. makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \
  75. makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \
  76. makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \
  77. makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \
  78. maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \
  79. makajpeg.bcb makcjpeg.bcb makdjpeg.bcb makljpeg.bcb makrjpeg.bcb \
  80. maktjpeg.bcb makwjpeg.bcb makcjpeg.st makdjpeg.st makljpeg.st \
  81. maktjpeg.st makeproj.mac makefile.manx makefile.sas makefile.mms \
  82. makefile.vms makvms.opt
  83. CONFIGFILES= jconfig.cfg jconfig.xc jconfig.bcc jconfig.mc6 jconfig.dj \
  84. jconfig.wat jconfig.vc jconfig.mac jconfig.st jconfig.manx \
  85. jconfig.sas jconfig.vms
  86. CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \
  87. missing ar-lib
  88. OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in \
  89. cjpegalt.c djpegalt.c
  90. TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg \
  91. testprog.jpg testimgp.jpg
  92. DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
  93. $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
  94. # library object files common to compression and decompression
  95. COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
  96. # compression library object files
  97. CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \
  98. jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \
  99. jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \
  100. jfdctflt.o jfdctint.o
  101. # decompression library object files
  102. DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \
  103. jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \
  104. jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \
  105. jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
  106. # These objectfiles are included in libjpeg.a
  107. LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
  108. # object files for sample applications (excluding library files)
  109. COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
  110. cdjpeg.o
  111. DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
  112. cdjpeg.o
  113. TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
  114. all: libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom
  115. libjpeg.a: $(LIBOBJECTS)
  116. $(RM) libjpeg.a
  117. $(AR) libjpeg.a $(LIBOBJECTS)
  118. $(AR2) libjpeg.a
  119. cjpeg: $(COBJECTS) libjpeg.a
  120. $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS)
  121. djpeg: $(DOBJECTS) libjpeg.a
  122. $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS)
  123. jpegtran: $(TROBJECTS) libjpeg.a
  124. $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS)
  125. rdjpgcom: rdjpgcom.o
  126. $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS)
  127. wrjpgcom: wrjpgcom.o
  128. $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)
  129. jconfig.h: jconfig.txt
  130. @echo
  131. @echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"
  132. @echo "+ +"
  133. @echo "+ You must prepare a system-dependent jconfig.h file. +"
  134. @echo "+ Please read the installation directions in install.txt, +"
  135. @echo "+ or use either +"
  136. @echo "+ make -f makefile.xc setup +"
  137. @echo "+ or +"
  138. @echo "+ make -f makefile.xc setupcopy +"
  139. @echo "+ before saying +"
  140. @echo "+ make -f makefile.xc +"
  141. @echo "+ +"
  142. @echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"
  143. @echo
  144. exit 1
  145. clean:
  146. $(RM) *.o cjpeg djpeg jpegtran libjpeg.a rdjpgcom wrjpgcom
  147. $(RM) core testout*
  148. setup:
  149. test -f jconfig.h || $(MV) jconfig.xc jconfig.h
  150. setupcopy:
  151. $(CP) jconfig.xc jconfig.h
  152. test: cjpeg djpeg jpegtran
  153. $(RM) testout*
  154. ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
  155. ./djpeg -dct int -gif -outfile testout.gif testorig.jpg
  156. ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
  157. ./cjpeg -dct int -outfile testout.jpg testimg.ppm
  158. ./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
  159. ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
  160. ./jpegtran -outfile testoutt.jpg testprog.jpg
  161. cmp testimg.ppm testout.ppm
  162. cmp testimg.gif testout.gif
  163. cmp testimg.bmp testout.bmp
  164. cmp testimg.jpg testout.jpg
  165. cmp testimg.ppm testoutp.ppm
  166. cmp testimgp.jpg testoutp.jpg
  167. cmp testorig.jpg testoutt.jpg
  168. jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  169. jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  170. jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  171. jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  172. jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  173. jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  174. jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  175. jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  176. jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  177. jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  178. jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  179. jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  180. jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  181. jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  182. jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  183. jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  184. jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  185. jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  186. jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  187. jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  188. jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
  189. jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
  190. jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  191. jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  192. jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  193. jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  194. jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  195. jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  196. jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  197. jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  198. jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  199. jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  200. jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  201. jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  202. jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
  203. jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  204. jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  205. jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  206. jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  207. jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  208. jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
  209. jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  210. jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  211. jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
  212. jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
  213. jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
  214. jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
  215. jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
  216. jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
  217. jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
  218. cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
  219. djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
  220. jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
  221. rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
  222. wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
  223. cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  224. rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  225. rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  226. transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
  227. rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  228. wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  229. rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  230. wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  231. rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  232. wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  233. rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  234. wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  235. rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
  236. wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h