X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwscript;h=de7d8e67aa5563133de8898ad789acec92760896;hb=488e3d1bd5e6b17d49f6db4df14c64f4b64db89b;hp=c06ca1bd4795d34fae0762910a6717d40e7ec4a1;hpb=2e93ca3670e5581b5523f60130b38594de10d6c3;p=libdcp.git diff --git a/src/wscript b/src/wscript index c06ca1bd..de7d8e67 100644 --- a/src/wscript +++ b/src/wscript @@ -1,115 +1,238 @@ +# +# Copyright (C) 2012-2020 Carl Hetherington +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# In addition, as a special exception, the copyright holders give +# permission to link the code of portions of this program with the +# OpenSSL library under certain conditions as described in each +# individual source file, and distribute linked combinations +# including the two. +# +# You must obey the GNU General Public License in all respects +# for all of the code used other than OpenSSL. If you modify +# file(s) with this exception, you may extend this exception to your +# version of the file(s), but you are not obligated to do so. If you +# do not wish to do so, delete this exception statement from your +# version. If you delete this exception statement from all source +# files in the program, then also delete it here. +# + from waflib import TaskGen def build(bld): - if bld.env.STATIC: - obj = bld(features = 'cxx cxxstlib') - else: - obj = bld(features = 'cxx cxxshlib') - - obj.name = 'libdcp%s' % bld.env.API_VERSION - obj.target = 'dcp%s' % bld.env.API_VERSION - obj.export_includes = ['.'] - obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1' - obj.use = 'libkumu-libdcp%s libasdcp-libdcp%s' % (bld.env.API_VERSION, bld.env.API_VERSION) - obj.source = """ - argb_frame.cc - asset.cc - certificates.cc - colour_matrix.cc - content.cc - cpl.cc - dcp.cc - dcp_time.cc - exceptions.cc - file.cc - font.cc - gamma_lut.cc - image.cc - kdm.cc - key.cc - load_font.cc - metadata.cc - mono_picture_mxf.cc - mono_picture_mxf_writer.cc - mono_picture_frame.cc - mxf.cc - mxf_writer.cc - object.cc - picture_mxf.cc - picture_mxf_writer.cc - reel.cc - reel_asset.cc - reel_mono_picture_asset.cc - reel_picture_asset.cc - reel_sound_asset.cc - reel_stereo_picture_asset.cc - reel_subtitle_asset.cc - rgb_xyz.cc - signer.cc - signer_chain.cc - sound_mxf.cc - sound_mxf_writer.cc - sound_frame.cc - stereo_picture_mxf.cc - stereo_picture_mxf_writer.cc - stereo_picture_frame.cc - subtitle.cc - subtitle_content.cc - subtitle_string.cc - text.cc - types.cc - util.cc - version.cc - xyz_frame.cc - """ + source = """ + array_data.cc + asset.cc + asset_factory.cc + asset_writer.cc + atmos_asset.cc + atmos_asset_writer.cc + bitstream.cc + certificate_chain.cc + certificate.cc + chromaticity.cc + colour_conversion.cc + combine.cc + cpl.cc + data.cc + dcp.cc + dcp_time.cc + decrypted_kdm.cc + decrypted_kdm_key.cc + encrypted_kdm.cc + exceptions.cc + font_asset.cc + fsk.cc + gamma_transfer_function.cc + identity_transfer_function.cc + interop_load_font_node.cc + interop_subtitle_asset.cc + j2k_transcode.cc + key.cc + language_tag.cc + local_time.cc + locale_convert.cc + metadata.cc + modified_gamma_transfer_function.cc + mono_picture_asset.cc + mono_picture_asset_writer.cc + mono_picture_frame.cc + mxf.cc + name_format.cc + object.cc + openjpeg_image.cc + picture_asset.cc + picture_asset_writer.cc + pkl.cc + raw_convert.cc + reel.cc + reel_asset.cc + reel_atmos_asset.cc + reel_closed_caption_asset.cc + reel_file_asset.cc + reel_interop_closed_caption_asset.cc + reel_interop_subtitle_asset.cc + reel_mono_picture_asset.cc + reel_picture_asset.cc + reel_markers_asset.cc + reel_smpte_closed_caption_asset.cc + reel_smpte_subtitle_asset.cc + reel_sound_asset.cc + reel_stereo_picture_asset.cc + reel_subtitle_asset.cc + ref.cc + rgb_xyz.cc + s_gamut3_transfer_function.cc + smpte_load_font_node.cc + smpte_subtitle_asset.cc + sound_asset.cc + sound_asset_writer.cc + sound_frame.cc + stereo_picture_asset.cc + stereo_picture_asset_writer.cc + stereo_picture_frame.cc + subtitle.cc + subtitle_asset.cc + subtitle_asset_internal.cc + subtitle_image.cc + subtitle_string.cc + transfer_function.cc + types.cc + util.cc + verify.cc + verify_j2k.cc + version.cc + """ headers = """ + array_data.h asset.h - certificates.h - colour_matrix.h + asset_reader.h + asset_writer.h + atmos_asset.h + atmos_asset_reader.h + atmos_asset_writer.h + atmos_frame.h + certificate_chain.h + certificate.h + chromaticity.h + colour_conversion.h + combine.h + compose.hpp cpl.h - content.h + crypto_context.h + data.h dcp.h + dcp_assert.h dcp_time.h + decrypted_kdm.h + decrypted_kdm_key.h + encrypted_kdm.h exceptions.h - gamma_lut.h - image.h - kdm.h + font_asset.h + frame.h + fsk.h + gamma_transfer_function.h + identity_transfer_function.h + interop_load_font_node.h + interop_subtitle_asset.h + j2k_transcode.h key.h - lut_cache.h + language_tag.h + load_font_node.h + local_time.h + locale_convert.h metadata.h - mono_picture_mxf.h + mono_picture_asset.h + mono_picture_asset_reader.h mono_picture_frame.h + modified_gamma_transfer_function.h mxf.h - mxf_writer.h + name_format.h object.h - picture_mxf.h - picture_mxf_writer.h + openjpeg_image.h + picture_asset.h + picture_asset_writer.h + pkl.h + raw_convert.h rgb_xyz.h reel.h reel_asset.h + reel_atmos_asset.h + reel_closed_caption_asset.h + reel_file_asset.h + reel_interop_closed_caption_asset.h + reel_interop_subtitle_asset.h + reel_markers_asset.h reel_mono_picture_asset.h reel_picture_asset.h reel_sound_asset.h + reel_smpte_closed_caption_asset.h + reel_smpte_subtitle_asset.h reel_stereo_picture_asset.h + reel_subtitle_asset.h ref.h - argb_frame.h - signer.h - signer_chain.h + s_gamut3_transfer_function.h + smpte_load_font_node.h + smpte_subtitle_asset.h sound_frame.h - sound_mxf.h - sound_mxf_writer.h - stereo_picture_mxf.h + sound_asset.h + sound_asset_reader.h + sound_asset_writer.h + stereo_picture_asset.h + stereo_picture_asset_reader.h + stereo_picture_asset_writer.h stereo_picture_frame.h subtitle.h - subtitle_content.h + subtitle_asset.h + subtitle_image.h subtitle_string.h + transfer_function.h types.h util.h + verify.h + verify_j2k.h version.h - xyz_frame.h """ + # Main library + if bld.env.STATIC: + obj = bld(features='cxx cxxstlib') + else: + obj = bld(features='cxx cxxshlib') + obj.name = 'libdcp%s' % bld.env.API_VERSION + obj.target = 'dcp%s' % bld.env.API_VERSION + obj.export_includes = ['.'] + obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1 ASDCPLIB_CTH XERCES' + obj.source = source + + # Library for gcov + if bld.is_defined('HAVE_GCOV'): + if bld.env.STATIC: + obj = bld(features='cxx cxxstlib') + else: + obj = bld(features='cxx cxxshlib') + obj.name = 'libdcp%s_gcov' % bld.env.API_VERSION + obj.target = 'dcp%s_gcov' % bld.env.API_VERSION + obj.export_includes = ['.'] + obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1 ASDCPLIB_CTH XERCES' + obj.use = 'libkumu-libdcp%s libasdcp-libdcp%s' % (bld.env.API_VERSION, bld.env.API_VERSION) + obj.source = source + obj.cppflags = ['-fprofile-arcs', '-ftest-coverage', '-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0'] + bld.install_files('${PREFIX}/include/libdcp%s/dcp' % bld.env.API_VERSION, headers) if bld.env.STATIC: bld.install_files('${PREFIX}/lib', 'libdcp%s.a' % bld.env.API_VERSION)