| 1 |
## $Id: libmplib.am 77673 2026-02-08 13:38:54Z ascherer $ |
| 2 |
## texk/web2c/mplibdir/am/libmplib.am: Makefile fragment for libmplib. |
| 3 |
## |
| 4 |
## Copyright 2015-2022 Luigi Scarso <[email protected]> |
| 5 |
## Copyright 2009-2014 Peter Breitenlohner <[email protected]> |
| 6 |
## You may freely use, modify and/or distribute this file. |
| 7 |
|
| 8 |
## libmplib.a, used by MetaPost and luaTeX |
| 9 |
## |
| 10 |
EXTRA_LIBRARIES += libmplibcore.a libmplibextramath.a libmplibbackends.a |
| 11 |
|
| 12 |
|
| 13 |
libmplibcore_a_CPPFLAGS = $(LIBPNG_INCLUDES) $(ZLIB_INCLUDES) $(AM_CPPFLAGS) -I$(srcdir)/mplibdir |
| 14 |
libmplibextramath_a_CPPFLAGS = $(MPFI_INCLUDES) $(MPFR_INCLUDES) $(GMP_INCLUDES) -I${top_builddir}/../../libs $(AM_CPPFLAGS) -I$(srcdir)/mplibdir |
| 15 |
libmplibbackends_a_CPPFLAGS = $(MPFI_INCLUDES) $(MPFR_INCLUDES) $(GMP_INCLUDES) $(CAIRO_INCLUDES) $(PIXMAN_INCLUDES) \ |
| 16 |
$(LIBPNG_INCLUDES) $(ZLIB_INCLUDES) $(AM_CPPFLAGS) -I$(srcdir)/mplibdir |
| 17 |
|
| 18 |
## libmplib C sources core + extramath + backends |
| 19 |
nodist_libmplibcore_a_SOURCES = tfmin.c $(mp_c_h) $(mpmath_c_h) $(mpmathdecimal_c_h) \ |
| 20 |
$(mpmathdouble_c_h) $(mpstrings_c_h) $(psout_c_h) |
| 21 |
nodist_libmplibextramath_a_SOURCES = $(mpmathbinary_c_h) $(mpmathinterval_c_h) |
| 22 |
nodist_libmplibbackends_a_SOURCES = $(pngout_c_h) $(svgout_c_h) |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
mp_c_h = mp.c mplib.h mpmp.h |
| 27 |
mpmath_c_h = mpmath.h mpmath.c |
| 28 |
mpmathbinary_c_h = mpmathbinary.h mpmathbinary.c |
| 29 |
mpmathdecimal_c_h = mpmathdecimal.h mpmathdecimal.c |
| 30 |
mpmathdouble_c_h = mpmathdouble.h mpmathdouble.c |
| 31 |
mpmathinterval_c_h = mpmathinterval.h mpmathinterval.c |
| 32 |
mpstrings_c_h = mpstrings.h mpstrings.c |
| 33 |
psout_c_h = mplibps.h mppsout.h psout.c |
| 34 |
svgout_c_h = mplibsvg.h mpsvgout.h svgout.c |
| 35 |
pngout_c_h = mplibpng.h mppngout.h pngout.c |
| 36 |
|
| 37 |
# Creating one file: just one rule |
| 38 |
tfmin.c: ctangle$(EXEEXT) mplibdir/tfmin.w |
| 39 |
$(mp_ctangle) tfmin.w |
| 40 |
|
| 41 |
# Creating several files: need stamp file and two rules with identical recipes |
| 42 |
$(mp_c_h): mp-tangle |
| 43 |
$(mp_ctangle_sh) mp |
| 44 |
mp-tangle: ctangle$(EXEEXT) mplibdir/mp.w tangle-sh |
| 45 |
$(mp_ctangle_sh) mp |
| 46 |
|
| 47 |
$(mpmath_c_h): mpmath-tangle mp-tangle |
| 48 |
$(mp_ctangle_sh) mpmath |
| 49 |
mpmath-tangle: ctangle$(EXEEXT) mplibdir/mpmath.w tangle-sh |
| 50 |
$(mp_ctangle_sh) mpmath |
| 51 |
|
| 52 |
$(mpmathbinary_c_h): mpmathbinary-tangle mp-tangle |
| 53 |
$(mp_ctangle_sh) mpmathbinary |
| 54 |
mpmathbinary-tangle: ctangle$(EXEEXT) mplibdir/mpmathbinary.w tangle-sh |
| 55 |
$(mp_ctangle_sh) mpmathbinary |
| 56 |
|
| 57 |
$(mpmathinterval_c_h): mpmathinterval-tangle mp-tangle |
| 58 |
$(mp_ctangle_sh) mpmathinterval |
| 59 |
mpmathinterval-tangle: ctangle$(EXEEXT) mplibdir/mpmathinterval.w tangle-sh |
| 60 |
$(mp_ctangle_sh) mpmathinterval |
| 61 |
|
| 62 |
$(mpmathdecimal_c_h): mpmathdecimal-tangle mp-tangle |
| 63 |
$(mp_ctangle_sh) mpmathdecimal |
| 64 |
mpmathdecimal-tangle: ctangle$(EXEEXT) mplibdir/mpmathdecimal.w tangle-sh |
| 65 |
$(mp_ctangle_sh) mpmathdecimal |
| 66 |
|
| 67 |
$(mpmathdouble_c_h): mpmathdouble-tangle mp-tangle |
| 68 |
$(mp_ctangle_sh) mpmathdouble |
| 69 |
mpmathdouble-tangle: ctangle$(EXEEXT) mplibdir/mpmathdouble.w tangle-sh |
| 70 |
$(mp_ctangle_sh) mpmathdouble |
| 71 |
|
| 72 |
$(mpstrings_c_h): mpstrings-tangle |
| 73 |
$(mp_ctangle_sh) mpstrings |
| 74 |
mpstrings-tangle: ctangle$(EXEEXT) mplibdir/mpstrings.w tangle-sh |
| 75 |
$(mp_ctangle_sh) mpstrings |
| 76 |
|
| 77 |
$(pngout_c_h): pngout-tangle |
| 78 |
$(mp_ctangle_sh) pngout |
| 79 |
pngout-tangle: ctangle$(EXEEXT) mplibdir/pngout.w tangle-sh |
| 80 |
$(mp_ctangle_sh) pngout |
| 81 |
|
| 82 |
$(psout_c_h): psout-tangle |
| 83 |
$(mp_ctangle_sh) psout |
| 84 |
psout-tangle: ctangle$(EXEEXT) mplibdir/psout.w tangle-sh |
| 85 |
$(mp_ctangle_sh) psout |
| 86 |
|
| 87 |
$(svgout_c_h): svgout-tangle |
| 88 |
$(mp_ctangle_sh) svgout |
| 89 |
svgout-tangle: ctangle$(EXEEXT) mplibdir/svgout.w tangle-sh |
| 90 |
$(mp_ctangle_sh) svgout |
| 91 |
|
| 92 |
## libmplib CWeb sources |
| 93 |
libmplib_web = mplibdir/mp.w mplibdir/psout.w mplibdir/svgout.w mplibdir/pngout.w |
| 94 |
libmplib_web += mplibdir/mpmath.w mplibdir/mpmathbinary.w mplibdir/mpmathinterval.w mplibdir/mpmathdecimal.w |
| 95 |
libmplib_web += mplibdir/mpmathdouble.w mplibdir/mpstrings.w mplibdir/tfmin.w |
| 96 |
|
| 97 |
## core need headers backends |
| 98 |
$(nodist_libmplibcore_a_SOURCES): $(mpmathbinary_c_h) $(mpmathinterval_c_h) $(svgout_c_h) $(pngout_c_h) |
| 99 |
|
| 100 |
$(libmplibcore_a_OBJECTS): $(nodist_libmplibcore_a_SOURCES) $(KPATHSEA_DEPEND) |
| 101 |
$(libmplibextramath_a_OBJECTS): $(nodist_libmplibextramath_a_SOURCES) $(KPATHSEA_DEPEND) $(MPFI_DEPEND) $(MPFR_DEPEND) mplib.h |
| 102 |
$(libmplibbackends_a_OBJECTS): $(nodist_libmplibbackends_a_SOURCES) $(KPATHSEA_DEPEND) $(CAIRO_DEPEND) $(MPFI_DEPEND) $(MPFR_DEPEND) mplib.h |
| 103 |
|
| 104 |
|
| 105 |
EXTRA_DIST += $(libmplib_web) |
| 106 |
|
| 107 |
DISTCLEANFILES += $(nodist_libmplibcore_a_SOURCES) $(nodist_libmplibextramath_a_SOURCES) $(nodist_libmplibbackends_a_SOURCES) \ |
| 108 |
mp-tangle mpmath-tangle mpmathdecimal-tangle mpmathdouble-tangle \ |
| 109 |
mpstrings-tangle psout-tangle svgout-tangle pngout-tangle |
| 110 |
|
| 111 |
# (end of libmplib.am) |