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