Path: blob/develop/subprojects/packagefiles/singular/factory/meson.build
6381 views
# Dependencies1gmp = dependency('gmp', required: true)2flint = dependency('flint', required: true)3ntl = dependency('ntl', required: false)45# Configuration data6fs = import('fs')7gen_headers = []8conf = configuration_data()9# Use no streamio (C++)10has_iostream_h = cpp.has_header('iostream.h')11conf.set('NOSTREAMIO', not has_iostream_h)#, 'strstream.h', 'fstream.h', 'iostream', 'string', 'fstream', 'ctype.h'))12conf.set('HAVE_IOSTREAM_H', has_iostream_h)13conf.set('FACTORYVERSION', meson.project_version())14factory_configuration = '@0@ in @1@'.format(meson.project_version(), meson.project_source_root())15conf.set_quoted('FACTORYCONFIGURATION', factory_configuration)1617gen_headers += fs.copyfile('factory.template', 'factory.h')#, install: true, install_dir: 'factory')18gen_headers += fs.copyfile('factoryconf.template', 'factoryconf.h')#, install: true, install_dir: 'factory')1920# https://mesonbuild.com/Wrap-best-practices-and-tips.html#do-not-put-configh-in-external-search-path21#subdir('internal')22gen_headers += configure_file(23output: 'config.h',24configuration: conf25)2627internal_inc = include_directories('internal')2829# Include directories30inc_dirs = [include_directories('include', 'include/factory', '.'), src, internal_inc]3132# Compiler flags33cpp_args = [34'-DFACTORY_BUILDING_DLL',35]3637# Source files38sources = files(39'canonicalform.cc',40'cf_algorithm.cc',41'cf_char.cc',42'cfCharSets.cc',43'cfCharSetsUtil.cc',44'cf_chinese.cc',45'cf_cyclo.cc',46'cf_eval.cc',47'cfEzgcd.cc',48'cf_factor.cc',49'cf_factory.cc',50'cf_gcd.cc',51'cfGcdAlgExt.cc',52'cfGcdUtil.cc',53'cf_generator.cc',54'cf_globals.cc',55'cf_hnf.cc',56'cf_inline.cc',57'cf_irred.cc',58'cf_iter.cc',59'cf_iter_inline.cc',60'cf_linsys.cc',61'cf_map.cc',62'cf_map_ext.cc',63'cfModGcd.cc',64'cfNewtonPolygon.cc',65'cfNTLzzpEXGCD.cc',66'cfModResultant.cc',67'cf_ops.cc',68'cf_primes.cc',69'cf_random.cc',70'cf_resultant.cc',71'cf_reval.cc',72'cfSubResGcd.cc',73'cf_switches.cc',74'cf_util.cc',75'cf_binom.cc',76'cfUnivarGcd.cc',77'cf_roots.cc',78'debug.cc',79'DegreePattern.cc',80'ExtensionInfo.cc',81'facAbsBiFact.cc',82'facAbsFact.cc',83'facAlgExt.cc',84'facAlgFunc.cc',85'facAlgFuncUtil.cc',86'facBivar.cc',87'facFactorize.cc',88'fac_sqrfree.cc',89'fac_util.cc',90'fac_berlekamp.cc',91'fac_cantzass.cc',92'fac_univar.cc',93'fac_multivar.cc',94'fac_multihensel.cc',95'fac_iterfor.cc',96'fac_distrib.cc',97'facFqBivar.cc',98'facFqBivarUtil.cc',99'facFqFactorize.cc',100'facFqFactorizeUtil.cc',101'facFqSquarefree.cc',102'facHensel.cc',103'facIrredTest.cc',104'facMul.cc',105'facSparseHensel.cc',106'ffops.cc',107'FLINTconvert.cc',108'gf_tabutil.cc',109'gfops.cc',110'imm.cc',111'int_cf.cc',112'int_int.cc',113'int_intdiv.cc',114'int_poly.cc',115'int_rat.cc',116'int_pp.cc',117'variable.cc',118'NTLconvert.cc',119'singext.cc',120'parseutil.cc',121'ftmpl_inst.cc',122'threadsupport.cc',123)124125# Library126libfactory = static_library(127'factory',128sources, gen_headers,129include_directories: inc_dirs,130dependencies: [gmp, flint, ntl],131cpp_args: cpp_args,132install: true,133)134135# Executable for generating GF(q)-tables136# gengftables = executable(137# 'gengftables',138# 'gengftables-conway.cc',139# include_directories: inc_dirs,140# dependencies: [gmp, flint, ntl],141# install: true,142# )143144# # Test program145# test_prog = executable(146# 'test_prog',147# 'test.cc',148# include_directories: inc_dirs,149# dependencies: [gmp, flint, ntl],150# install: false,151# )152153# test('factory test', test_prog)154155# Install headers156install_headers(157[158'cf_assert.h',159'canonicalform.h',160'cf_algorithm.h',161'cfCharSets.h',162'cfCharSetsUtil.h',163'cf_cyclo.h',164'cf_defs.h',165'cf_eval.h',166'cfEzgcd.h',167'cf_factory.h',168'cf_generator.h',169'cf_globals.h',170'cfGcdAlgExt.h',171'cfGcdUtil.h',172'cf_hnf.h',173'cf_irred.h',174'cf_iter.h',175'cf_map.h',176'cf_map_ext.h',177'cfModGcd.h',178'cfNewtonPolygon.h',179'cfNTLzzpEXGCD.h',180'cfModResultant.h',181'cf_primes.h',182'cf_primetab.h',183'cf_random.h',184'cf_reval.h',185'cfSubResGcd.h',186'cf_switches.h',187'cf_util.h',188'cf_binom.h',189'cfUnivarGcd.h',190'cf_roots.h',191'debug.h',192'DegreePattern.h',193'ExtensionInfo.h',194'facAbsBiFact.h',195'facAbsFact.h',196'facAlgExt.h',197'facAlgFunc.h',198'facAlgFuncUtil.h',199'facBivar.h',200'facFactorize.h',201'fac_sqrfree.h',202'fac_util.h',203'fac_berlekamp.h',204'fac_cantzass.h',205'fac_univar.h',206'fac_multivar.h',207'fac_multihensel.h',208'fac_iterfor.h',209'fac_distrib.h',210'facFqBivar.h',211'facFqBivarUtil.h',212'facFqFactorize.h',213'facFqFactorizeUtil.h',214'facFqSquarefree.h',215'facHensel.h',216'facIrredTest.h',217'facMul.h',218'facSparseHensel.h',219'ffops.h',220'FLINTconvert.h',221'gf_tabutil.h',222'gfops.h',223'gmpext.h',224'imm.h',225'int_cf.h',226'int_int.h',227'int_poly.h',228'int_rat.h',229'int_pp.h',230'timing.h',231'variable.h',232'NTLconvert.h',233'singext.h',234'parseutil.h',235],236subdir: 'factory',237)238239# Install GF(q)-tables240gftables = [241'gftables/10201', 'gftables/1024', 'gftables/10609', 'gftables/11449',242'gftables/11881', 'gftables/121', 'gftables/12167', 'gftables/125',243'gftables/12769', 'gftables/128', 'gftables/1331', 'gftables/1369',244'gftables/14641', 'gftables/15625', 'gftables/16', 'gftables/16129',245'gftables/16384', 'gftables/16807', 'gftables/1681', 'gftables/169',246'gftables/17161', 'gftables/1849', 'gftables/18769', 'gftables/19321',247'gftables/19683', 'gftables/2048', 'gftables/2187', 'gftables/2197',248'gftables/2209', 'gftables/22201', 'gftables/22801', 'gftables/2401',249'gftables/243', 'gftables/24389', 'gftables/24649', 'gftables/25',250'gftables/256', 'gftables/26569', 'gftables/27', 'gftables/27889',251'gftables/2809', 'gftables/28561', 'gftables/289', 'gftables/29791',252'gftables/29929', 'gftables/3125', 'gftables/32', 'gftables/32041',253'gftables/32761', 'gftables/32768', 'gftables/343', 'gftables/3481',254'gftables/361', 'gftables/36481', 'gftables/3721', 'gftables/37249',255'gftables/38809', 'gftables/39601', 'gftables/4', 'gftables/4096',256'gftables/44521', 'gftables/4489', 'gftables/49', 'gftables/4913',257'gftables/49729', 'gftables/5041', 'gftables/50653', 'gftables/512',258'gftables/51529', 'gftables/52441', 'gftables/529', 'gftables/5329',259'gftables/54289', 'gftables/57121', 'gftables/58081', 'gftables/59049',260'gftables/6241', 'gftables/625', 'gftables/63001', 'gftables/64',261'gftables/6561', 'gftables/6859', 'gftables/6889', 'gftables/729',262'gftables/7921', 'gftables/8', 'gftables/81', 'gftables/8192',263'gftables/841', 'gftables/9', 'gftables/9409', 'gftables/961',264]265266install_data(gftables, install_dir: join_paths(get_option('datadir'), 'factory/gftables'))267268# Pkg-config file269# pkgconfig = import('pkgconfig')270# pkgconfig.generate(271# name: 'factory',272# description: 'Factory library',273# version: '0.1.0',274# libraries: libfactory,275# subdirs: 'factory',276# install_dir: join_paths(get_option('libdir'), 'pkgconfig'),277# )278279factory_dep = declare_dependency(280include_directories: [include_directories('.', 'include'), src],281link_with: libfactory,282dependencies: [gmp, flint, ntl],283sources: gen_headers,284)285286287