SConscript 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. from building import *
  2. # get current directory
  3. cwd = GetCurrentDir()
  4. # The set of source files associated with this SConscript file.
  5. # mupdf
  6. src = Glob('cbz/*.c')
  7. src += Glob('draw/*.c')
  8. src += Glob('fitz/*.c')
  9. src += Glob('pdf/*.c')
  10. src += Glob('xps/*.c')
  11. # mupdf for rtt port
  12. src += Glob('port/*.c')
  13. # freetype
  14. src += Split('''
  15. thirdparty/freetype/src/base/ftbase.c \
  16. thirdparty/freetype/src/base/ftbbox.c \
  17. thirdparty/freetype/src/base/ftbitmap.c \
  18. thirdparty/freetype/src/base/ftgasp.c \
  19. thirdparty/freetype/src/base/ftglyph.c \
  20. thirdparty/freetype/src/base/ftinit.c \
  21. thirdparty/freetype/src/base/ftstroke.c \
  22. thirdparty/freetype/src/base/ftsynth.c \
  23. thirdparty/freetype/src/base/ftsystem.c \
  24. thirdparty/freetype/src/base/fttype1.c \
  25. thirdparty/freetype/src/base/ftxf86.c \
  26. thirdparty/freetype/src/autofit/autofit.c \
  27. thirdparty/freetype/src/bdf/bdf.c \
  28. thirdparty/freetype/src/cff/cff.c \
  29. thirdparty/freetype/src/cid/type1cid.c \
  30. thirdparty/freetype/src/gzip/ftgzip.c \
  31. thirdparty/freetype/src/lzw/ftlzw.c \
  32. thirdparty/freetype/src/pcf/pcf.c \
  33. thirdparty/freetype/src/pfr/pfr.c \
  34. thirdparty/freetype/src/psaux/psaux.c \
  35. thirdparty/freetype/src/pshinter/pshinter.c \
  36. thirdparty/freetype/src/psnames/psnames.c \
  37. thirdparty/freetype/src/raster/raster.c \
  38. thirdparty/freetype/src/sfnt/sfnt.c \
  39. thirdparty/freetype/src/smooth/smooth.c \
  40. thirdparty/freetype/src/truetype/truetype.c \
  41. thirdparty/freetype/src/type1/type1.c \
  42. thirdparty/freetype/src/type42/type42.c \
  43. thirdparty/freetype/src/winfonts/winfnt.c \
  44. ''')
  45. # jbig2dec
  46. src += Split('''
  47. thirdparty/jbig2dec/jbig2_arith.c \
  48. thirdparty/jbig2dec/jbig2_arith_int.c \
  49. thirdparty/jbig2dec/jbig2_arith_iaid.c \
  50. thirdparty/jbig2dec/jbig2_huffman.c \
  51. thirdparty/jbig2dec/jbig2_segment.c \
  52. thirdparty/jbig2dec/jbig2_page.c \
  53. thirdparty/jbig2dec/jbig2_symbol_dict.c \
  54. thirdparty/jbig2dec/jbig2_text.c \
  55. thirdparty/jbig2dec/jbig2_halftone.c \
  56. thirdparty/jbig2dec/jbig2_generic.c \
  57. thirdparty/jbig2dec/jbig2_refinement.c \
  58. thirdparty/jbig2dec/jbig2_mmr.c \
  59. thirdparty/jbig2dec/jbig2_image.c \
  60. thirdparty/jbig2dec/jbig2_metadata.c \
  61. thirdparty/jbig2dec/jbig2.c \
  62. ''')
  63. # jpeg
  64. src += Split('''
  65. thirdparty/jpeg/jaricom.c \
  66. thirdparty/jpeg/jcomapi.c \
  67. thirdparty/jpeg/jdapimin.c \
  68. thirdparty/jpeg/jdapistd.c \
  69. thirdparty/jpeg/jdarith.c \
  70. thirdparty/jpeg/jdatadst.c \
  71. thirdparty/jpeg/jdatasrc.c \
  72. thirdparty/jpeg/jdcoefct.c \
  73. thirdparty/jpeg/jdcolor.c \
  74. thirdparty/jpeg/jddctmgr.c \
  75. thirdparty/jpeg/jdhuff.c \
  76. thirdparty/jpeg/jdinput.c \
  77. thirdparty/jpeg/jdmainct.c \
  78. thirdparty/jpeg/jdmarker.c \
  79. thirdparty/jpeg/jdmaster.c \
  80. thirdparty/jpeg/jdmerge.c \
  81. thirdparty/jpeg/jdpostct.c \
  82. thirdparty/jpeg/jdsample.c \
  83. thirdparty/jpeg/jdtrans.c \
  84. thirdparty/jpeg/jerror.c \
  85. thirdparty/jpeg/jfdctflt.c \
  86. thirdparty/jpeg/jfdctfst.c \
  87. thirdparty/jpeg/jfdctint.c \
  88. thirdparty/jpeg/jidctflt.c \
  89. thirdparty/jpeg/jidctfst.c \
  90. thirdparty/jpeg/jidctint.c \
  91. thirdparty/jpeg/jmemmgr.c \
  92. thirdparty/jpeg/jmemnobs.c \
  93. thirdparty/jpeg/jquant1.c \
  94. thirdparty/jpeg/jquant2.c \
  95. thirdparty/jpeg/jutils.c \
  96. ''')
  97. # openjpeg
  98. src += Split('''
  99. thirdparty/openjpeg/libopenjpeg/bio.c \
  100. thirdparty/openjpeg/libopenjpeg/cio.c \
  101. thirdparty/openjpeg/libopenjpeg/dwt.c \
  102. thirdparty/openjpeg/libopenjpeg/event.c \
  103. thirdparty/openjpeg/libopenjpeg/image.c \
  104. thirdparty/openjpeg/libopenjpeg/j2k.c \
  105. thirdparty/openjpeg/libopenjpeg/j2k_lib.c \
  106. thirdparty/openjpeg/libopenjpeg/jp2.c \
  107. thirdparty/openjpeg/libopenjpeg/jpt.c \
  108. thirdparty/openjpeg/libopenjpeg/mct.c \
  109. thirdparty/openjpeg/libopenjpeg/mqc.c \
  110. thirdparty/openjpeg/libopenjpeg/openjpeg.c \
  111. thirdparty/openjpeg/libopenjpeg/pi.c \
  112. thirdparty/openjpeg/libopenjpeg/raw.c \
  113. thirdparty/openjpeg/libopenjpeg/t1.c \
  114. thirdparty/openjpeg/libopenjpeg/t2.c \
  115. thirdparty/openjpeg/libopenjpeg/tcd.c \
  116. thirdparty/openjpeg/libopenjpeg/tgt.c \
  117. thirdparty/openjpeg/libopenjpeg/cidx_manager.c \
  118. thirdparty/openjpeg/libopenjpeg/phix_manager.c \
  119. thirdparty/openjpeg/libopenjpeg/ppix_manager.c \
  120. thirdparty/openjpeg/libopenjpeg/thix_manager.c \
  121. thirdparty/openjpeg/libopenjpeg/tpix_manager.c \
  122. ''')
  123. # zlib
  124. src += Split('''
  125. thirdparty/zlib/adler32.c \
  126. thirdparty/zlib/compress.c \
  127. thirdparty/zlib/crc32.c \
  128. thirdparty/zlib/deflate.c \
  129. thirdparty/zlib/inffast.c \
  130. thirdparty/zlib/inflate.c \
  131. thirdparty/zlib/inftrees.c \
  132. thirdparty/zlib/trees.c \
  133. thirdparty/zlib/uncompr.c \
  134. thirdparty/zlib/zutil.c \
  135. ''')
  136. path = [cwd + '/']
  137. path += [cwd + '/fitz']
  138. path += [cwd + '/pdf']
  139. path += [cwd + '/generated']
  140. path += [cwd + '/thirdparty/freetype/include']
  141. path += [cwd + '/thirdparty/jbig2dec']
  142. path += [cwd + '/thirdparty/jpeg']
  143. path += [cwd + '/thirdparty/openjpeg']
  144. path += [cwd + '/thirdparty/openjpeg/libopenjpeg']
  145. path += [cwd + '/thirdparty/zlib']
  146. path += [cwd + '/port']
  147. CPPDEFINES = ['FT2_BUILD_LIBRARY', 'HAVE_STDINT_H']
  148. group = DefineGroup('mupdf', src, depend = ['PKG_USING_MUPDF'], CPPDEFINES = CPPDEFINES, CPPPATH = path)
  149. Return('group')