1 ## Makefile for the gettext-runtime/src subdirectory of GNU gettext
2 ## Copyright (C) 1995-1998, 2000-2007, 2009, 2015 Free Software
5 ## This program is free software: you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 3 of the License, or
8 ## (at your option) any later version.
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
18 ## Process this file with automake to produce Makefile.in.
20 AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
22 MOSTLYCLEANFILES = core *.stackdump
28 bin_PROGRAMS = gettext ngettext envsubst
33 -I../intl -I$(srcdir)/../intl \
34 -I../gnulib-lib -I$(srcdir)/../gnulib-lib
35 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
37 # Source dependencies.
38 gettext_SOURCES = gettext.c
39 ngettext_SOURCES = ngettext.c
40 envsubst_SOURCES = envsubst.c
43 # Need @LTLIBICONV@ because striconv.c uses iconv().
44 LDADD = ../gnulib-lib/libgrt.a @LTLIBINTL@ @LTLIBICONV@ $(WOE32_LDADD)
46 # Specify installation directory, for --enable-relocatable.
47 gettext_CFLAGS = -DINSTALLDIR=\"$(bindir)\"
48 ngettext_CFLAGS = -DINSTALLDIR=\"$(bindir)\"
49 envsubst_CFLAGS = -DINSTALLDIR=\"$(bindir)\"
51 gettext_LDFLAGS = `$(RELOCATABLE_LDFLAGS) $(bindir)`
52 ngettext_LDFLAGS = `$(RELOCATABLE_LDFLAGS) $(bindir)`
53 envsubst_LDFLAGS = `$(RELOCATABLE_LDFLAGS) $(bindir)`
56 # For installing gettext.sh in $(bindir).
57 bin_SCRIPTS = gettext.sh
58 DISTCLEANFILES += gettext.sh
60 # Support for relocatability.
61 RELOCATABLE_LIBRARY_PATH = $(libdir)
62 RELOCATABLE_SRC_DIR = $(top_srcdir)/gnulib-lib
63 RELOCATABLE_BUILD_DIR = ../gnulib-lib
64 RELOCATABLE_CONFIG_H_DIR = ..
67 # Version information according to Woe32 conventions.
69 WOE32_LDADD = gettext.res
70 gettext.res : $(top_srcdir)/../windows/gettext.rc
71 $(WINDRES) `$(SHELL) $(top_srcdir)/../windows/windres-options --escape $(VERSION)` -i $(top_srcdir)/../windows/gettext.rc -o gettext.res --output-format=coff
72 MOSTLYCLEANFILES += gettext.res