diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-01-14 22:31:50 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-11-23 23:31:38 +0100 |
| commit | cebedb3c618be1d8fa5ad0678a0ce4351e14b2eb (patch) | |
| tree | 19d60a0a8d03f2961210d98fbf046f44c896078d /src/wscript | |
| parent | e9d71dda547c3b2327b6d1198d809f232e0469b5 (diff) | |
waf build system.
Diffstat (limited to 'src/wscript')
| -rw-r--r-- | src/wscript | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/src/wscript b/src/wscript new file mode 100644 index 0000000..56b6c5b --- /dev/null +++ b/src/wscript @@ -0,0 +1,122 @@ +def configure(conf): + conf.env.append_value('CXXFLAGS', '-D_FILE_OFFSET_BITS=64') + # Don't include the micro version number in PACKAGE_VERSION, as + # this ends up in MXFs and screws up DCP-o-matic's test references + # every time it changes + s = conf.env.VERSION.split('.') + major_minor = '%s.%s.0' % (s[0], s[1]) + conf.env.append_value('CXXFLAGS', ['-DPACKAGE_VERSION="%s"' % major_minor]) + if conf.options.target_windows: + conf.env.append_value('CXXFLAGS', ['-DASDCP_PLATFORM="win32"', '-DKM_WIN32', '-DWIN32_LEAN_AND_MEAN']) + else: + conf.env.append_value('CXXFLAGS', '-DASDCP_PLATFORM="linux"') + +def build(bld): + if bld.env.STATIC: + obj = bld(features='cxx cxxstlib') + else: + obj = bld(features='cxx cxxshlib') + + obj.name = 'libkumu-carl' + obj.target = 'kumu-carl' + obj.uselib = 'OPENSSL BOOST_FILESYSTEM' + obj.includes = ['.'] + obj.export_includes = ['.'] + obj.source = """ + KM_fileio.cpp + KM_log.cpp + KM_util.cpp + KM_xml.cpp + KM_tai.cpp + KM_prng.cpp + """ + + if bld.env.STATIC: + obj = bld(features='cxx cxxstlib') + else: + obj = bld(features='cxx cxxshlib') + + obj.name = 'libasdcp-carl' + obj.target = 'asdcp-carl' + obj.uselib = 'OPENSSL' + obj.use = 'libkumu-carl' + obj.includes = ['.'] + obj.export_includes = ['.'] + obj.source = """ + MPEG2_Parser.cpp + MPEG.cpp + JP2K_Codestream_Parser.cpp + JP2K_Sequence_Parser.cpp + JP2K.cpp + PCM_Parser.cpp + Wav.cpp + TimedText_Parser.cpp + KLV.cpp + Dict.cpp + MXFTypes.cpp + MXF.cpp + Index.cpp + Metadata.cpp + AS_02_JP2K.cpp + AS_02_PCM.cpp + AS_02_PHDR.cpp + AS_02_TimedText.cpp + AS_DCP.cpp + AS_DCP_MXF.cpp + AS_DCP_AES.cpp + h__Reader.cpp + h__02_Reader.cpp + h__Writer.cpp + h__02_Writer.cpp + AS_DCP_MPEG2.cpp + AS_DCP_JP2K.cpp + AS_DCP_PCM.cpp + AS_DCP_TimedText.cpp + AS_DCP_ATMOS.cpp + AS_DCP_DCData.cpp + PCMParserList.cpp + MDD.cpp + """ + + headers = """ + KM_xml.h + KM_error.h + SyncEncoder.h + ST2095_PinkNoise.h + MXF.h + Wav.h + Metadata.h + KM_mutex.h + JP2K.h + AtmosSyncChannel_Mixer.h + AtmosSyncChannel_Generator.h + SyncCommon.h + AS_02.h + AS_02_internal.h + KM_tai.h + KLV.h + PCMParserList.h + AS_DCP_internal.h + KM_log.h + AS_02_PHDR.h + UUIDInformation.h + KM_memio.h + KM_prng.h + KM_fileio.h + MXFTypes.h + AS_DCP.h + KM_util.h + AS_DCP_DCData_internal.h + MDD.h + MPEG.h + WavFileWriter.h + S12MTimecode.h + KM_platform.h + PCMDataProviders.h + CRC16.h + """ + + bld.install_files('${PREFIX}/include/libasdcp-carl', headers) + if bld.env.STATIC: + bld.install_files('${PREFIX}/lib', 'libkumu-carl.a') + bld.install_files('${PREFIX}/lib', 'libasdcp-carl.a') |
