# Copyright 2019 Free Software Foundation, Inc.
#
#  This file is part of the GNU MP Library.
#
#  The GNU MP Library is free software; you can redistribute it and/or modify
#  it under the terms of either:
#
#    * the GNU Lesser General Public License as published by the Free
#      Software Foundation; either version 3 of the License, or (at your
#      option) any later version.
#
#  or
#
#    * 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.
#
#  or both in parallel, as here.
#
#  The GNU MP Library 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 copies of the GNU General Public License and the
#  GNU Lesser General Public License along with the GNU MP Library.  If not,
#  see https://www.gnu.org/licenses/.


set(LIBMPZ_SOURCES
  aors.h aors_ui.h fits_s.h mul_i.h
  2fac_ui.c
  add.c add_ui.c abs.c aorsmul.c aorsmul_i.c and.c array_init.c
  bin_ui.c bin_uiui.c cdiv_q.c
  cdiv_q_ui.c cdiv_qr.c cdiv_qr_ui.c cdiv_r.c cdiv_r_ui.c cdiv_ui.c
  cfdiv_q_2exp.c cfdiv_r_2exp.c
  clear.c clears.c clrbit.c
  cmp.c cmp_d.c cmp_si.c cmp_ui.c cmpabs.c cmpabs_d.c cmpabs_ui.c
  com.c combit.c
  cong.c cong_2exp.c cong_ui.c
  divexact.c divegcd.c dive_ui.c divis.c divis_ui.c divis_2exp.c
  dump.c export.c fac_ui.c fdiv_q.c fdiv_q_ui.c
  fdiv_qr.c fdiv_qr_ui.c fdiv_r.c fdiv_r_ui.c fdiv_ui.c
  fib_ui.c fib2_ui.c
  fits_sint.c fits_slong.c fits_sshort.c
  fits_uint.c fits_ulong.c fits_ushort.c
  gcd.c gcd_ui.c gcdext.c get_d.c get_d_2exp.c get_si.c
  get_str.c
  #get_ui.c # inlined
  getlimbn.c hamdist.c
  import.c init.c init2.c inits.c inp_raw.c inp_str.c
  invert.c ior.c iset.c iset_d.c iset_si.c iset_str.c iset_ui.c
  jacobi.c kronsz.c kronuz.c kronzs.c kronzu.c
  lcm.c lcm_ui.c limbs_read.c limbs_write.c limbs_modify.c limbs_finish.c
  lucnum_ui.c lucnum2_ui.c lucmod.c mfac_uiui.c millerrabin.c
  mod.c mul.c mul_2exp.c mul_si.c mul_ui.c n_pow_ui.c
  #neg.c # inlined
  nextprime.c
  oddfac_1.c
  out_raw.c out_str.c perfpow.c perfsqr.c popcount.c pow_ui.c powm.c
  powm_sec.c powm_ui.c pprime_p.c prodlimbs.c primorial_ui.c random.c random2.c
  realloc.c realloc2.c remove.c roinit_n.c root.c rootrem.c rrandomb.c
  scan0.c scan1.c set.c set_d.c set_f.c set_q.c set_si.c set_str.c
  set_ui.c setbit.c size.c sizeinbase.c sqrt.c sqrtrem.c stronglucas.c sub.c sub_ui.c
  swap.c tdiv_ui.c tdiv_q.c tdiv_q_2exp.c tdiv_q_ui.c tdiv_qr.c
  tdiv_qr_ui.c tdiv_r.c tdiv_r_2exp.c tdiv_r_ui.c tstbit.c ui_pow_ui.c
  ui_sub.c urandomb.c urandomm.c xor.c
)
add_library(libmpz OBJECT ${LIBMPZ_SOURCES})
set_target_properties(libmpz PROPERTIES COMPILE_DEFINITIONS __GMP_WITHIN_GMP)
add_dependencies(libmpz libmpn)
