| 1 |
# |
| 2 |
# extension/Makefile.am --- automake input file for gawk |
| 3 |
# |
| 4 |
# Copyright (C) 1995-2006, 2012-2015, 2017, 2020, 2021, 2022, 2023 |
| 5 |
# the Free Software Foundation, Inc. |
| 6 |
# |
| 7 |
# This file is part of GAWK, the GNU implementation of the |
| 8 |
# AWK Programming Language. |
| 9 |
# |
| 10 |
# GAWK is free software; you can redistribute it and/or modify |
| 11 |
# it under the terms of the GNU General Public License as published by |
| 12 |
# the Free Software Foundation; either version 3 of the License, or |
| 13 |
# (at your option) any later version. |
| 14 |
# |
| 15 |
# GAWK is distributed in the hope that it will be useful, |
| 16 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 |
# GNU General Public License for more details. |
| 19 |
# |
| 20 |
# You should have received a copy of the GNU General Public License |
| 21 |
# along with this program; if not, write to the Free Software |
| 22 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
| 23 |
# |
| 24 |
|
| 25 |
## Process this file with automake to produce Makefile.in. |
| 26 |
|
| 27 |
AM_CPPFLAGS = -I$(srcdir)/.. |
| 28 |
|
| 29 |
# This variable insures that aclocal runs |
| 30 |
# correctly after changing configure.ac |
| 31 |
ACLOCAL_AMFLAGS = -I ../m4 |
| 32 |
|
| 33 |
# For some make's, e.g. OpenBSD, that don't define this |
| 34 |
RM = rm -f |
| 35 |
|
| 36 |
pkgextension_LTLIBRARIES = \ |
| 37 |
filefuncs.la \ |
| 38 |
fnmatch.la \ |
| 39 |
fork.la \ |
| 40 |
inplace.la \ |
| 41 |
intdiv.la \ |
| 42 |
ordchr.la \ |
| 43 |
readdir.la \ |
| 44 |
readfile.la \ |
| 45 |
revoutput.la \ |
| 46 |
revtwoway.la \ |
| 47 |
rwarray.la \ |
| 48 |
time.la |
| 49 |
|
| 50 |
noinst_LTLIBRARIES = \ |
| 51 |
testext.la |
| 52 |
|
| 53 |
MY_MODULE_FLAGS = -module -avoid-version -no-undefined |
| 54 |
# On Cygwin, gettext requires that we link with -lintl |
| 55 |
MY_LIBS = $(LTLIBINTL) |
| 56 |
|
| 57 |
filefuncs_la_SOURCES = filefuncs.c stack.h stack.c gawkfts.h \ |
| 58 |
gawkfts.c gawkdirfd.h |
| 59 |
filefuncs_la_LDFLAGS = $(MY_MODULE_FLAGS) |
| 60 |
filefuncs_la_LIBADD = $(MY_LIBS) |
| 61 |
|
| 62 |
fnmatch_la_SOURCES = fnmatch.c |
| 63 |
fnmatch_la_LDFLAGS = $(MY_MODULE_FLAGS) |
| 64 |
fnmatch_la_LIBADD = $(MY_LIBS) |
| 65 |
|
| 66 |
fork_la_SOURCES = fork.c |
| 67 |
fork_la_LDFLAGS = $(MY_MODULE_FLAGS) |
| 68 |
fork_la_LIBADD = $(MY_LIBS) |
| 69 |
|
| 70 |
inplace_la_SOURCES = inplace.c |
| 71 |
inplace_la_LDFLAGS = $(MY_MODULE_FLAGS) |
| 72 |
inplace_la_LIBADD = $(MY_LIBS) |
| 73 |
|
| 74 |
# On Cygwin, intdiv has to be linked with the MPFR and GMP libraries. |
| 75 |
# Solaris in addition wants the math library. |
| 76 |
intdiv_la_SOURCES = intdiv.c |
| 77 |
intdiv_la_LDFLAGS = $(MY_MODULE_FLAGS) |
| 78 |
intdiv_la_LIBADD = $(MY_LIBS) $(LIBMPFR) -lm |
| 79 |
|
| 80 |
ordchr_la_SOURCES = ordchr.c |
| 81 |
ordchr_la_LDFLAGS = $(MY_MODULE_FLAGS) |
| 82 |
ordchr_la_LIBADD = $(MY_LIBS) |
| 83 |
|
| 84 |
readdir_la_SOURCES = readdir.c gawkdirfd.h |
| 85 |
readdir_la_LDFLAGS = $(MY_MODULE_FLAGS) |
| 86 |
readdir_la_LIBADD = $(MY_LIBS) |
| 87 |
|
| 88 |
readfile_la_SOURCES = readfile.c |
| 89 |
readfile_la_LDFLAGS = $(MY_MODULE_FLAGS) |
| 90 |
readfile_la_LIBADD = $(MY_LIBS) |
| 91 |
|
| 92 |
revoutput_la_SOURCES = revoutput.c |
| 93 |
revoutput_la_LDFLAGS = $(MY_MODULE_FLAGS) |
| 94 |
revoutput_la_LIBADD = $(MY_LIBS) |
| 95 |
|
| 96 |
revtwoway_la_SOURCES = revtwoway.c |
| 97 |
revtwoway_la_LDFLAGS = $(MY_MODULE_FLAGS) |
| 98 |
revtwoway_la_LIBADD = $(MY_LIBS) |
| 99 |
|
| 100 |
# On Cygwin, rwarray has to be linked with the MPFR and GMP libraries. |
| 101 |
rwarray_la_SOURCES = rwarray.c |
| 102 |
rwarray_la_LDFLAGS = $(MY_MODULE_FLAGS) |
| 103 |
rwarray_la_LIBADD = $(MY_LIBS) $(LIBMPFR) |
| 104 |
|
| 105 |
time_la_SOURCES = time.c |
| 106 |
time_la_LDFLAGS = $(MY_MODULE_FLAGS) |
| 107 |
time_la_LIBADD = $(MY_LIBS) |
| 108 |
|
| 109 |
# N.B. Becaues we are not installing testext, we must specify -rpath in |
| 110 |
# LDFLAGS to get automake to build a shared library, since it needs |
| 111 |
# an installation path. |
| 112 |
# On Cygwin, testext has to be linked with the MPFR and GMP libraries. |
| 113 |
testext_la_SOURCES = testext.c |
| 114 |
testext_la_LDFLAGS = $(MY_MODULE_FLAGS) -rpath /foo |
| 115 |
testext_la_LIBADD = $(MY_LIBS) $(LIBMPFR) |
| 116 |
|
| 117 |
install-data-hook: |
| 118 |
for i in $(pkgextension_LTLIBRARIES) ; do \ |
| 119 |
$(RM) $(DESTDIR)$(pkgextensiondir)/$$i ; \ |
| 120 |
done |
| 121 |
|
| 122 |
# Keep the uninstall check working: |
| 123 |
uninstall-so: |
| 124 |
$(RM) $(DESTDIR)$(pkgextensiondir)/*.so |
| 125 |
$(RM) $(DESTDIR)$(pkgextensiondir)/*.dll |
| 126 |
$(RM) $(DESTDIR)$(pkgextensiondir)/*.a |
| 127 |
$(RM) $(DESTDIR)$(pkgextensiondir)/*.lib |
| 128 |
|
| 129 |
uninstall-recursive: uninstall-so |
| 130 |
|
| 131 |
EXTRA_DIST = \ |
| 132 |
ChangeLog \ |
| 133 |
ChangeLog.0 \ |
| 134 |
ChangeLog.1 \ |
| 135 |
ext_custom.h \ |
| 136 |
fts.3 \ |
| 137 |
README.fts |
| 138 |
|
| 139 |
dist_man_MANS = \ |
| 140 |
filefuncs.3am fnmatch.3am fork.3am inplace.3am \ |
| 141 |
ordchr.3am readdir.3am readfile.3am revoutput.3am \ |
| 142 |
revtwoway.3am rwarray.3am time.3am |
| 143 |
|
| 144 |
# gettext requires this |
| 145 |
SUBDIRS = po |
| 146 |
|
| 147 |
# For debugging |
| 148 |
DEBUG = -gdwarf-4 -g3 |
| 149 |
|
| 150 |
distclean-local: |
| 151 |
rm -fr .deps |