1
1
# Makefile for directory with message catalog handling library of GNU gettext
2
# Copyright (C) 1995-1998, 2000-2006 Free Software Foundation, Inc.
2
# Copyright (C) 1995-1998, 2000-2007 Free Software Foundation, Inc.
4
4
# This program is free software; you can redistribute it and/or modify it
5
5
# under the terms of the GNU Library General Public License as published
169
OBJECTS_RES_yes = libintl.res
167
171
DISTFILES.common = Makefile.in \
168
config.charset locale.alias ref-add.sin ref-del.sin export.h \
172
config.charset locale.alias ref-add.sin ref-del.sin export.h libintl.rc \
169
173
$(HEADERS) $(SOURCES)
170
174
DISTFILES.generated = plural.c
171
175
DISTFILES.normal = VERSION
186
190
$(AR) cru $@ $(OBJECTS)
189
libintl.la libgnuintl.la: $(OBJECTS)
193
libintl.la libgnuintl.la: $(OBJECTS) $(OBJECTS_RES_@WOE32@)
190
194
$(LIBTOOL) --mode=link \
191
195
$(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
192
$(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(LIBS) @LTLIBTHREAD@ -lc \
196
$(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(LIBS) @LTLIBTHREAD@ @LTLIBC@ \
197
$(OBJECTS_RES_@WOE32@) \
193
198
-version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
194
199
-rpath $(libdir) \
268
273
intl-compat.lo: $(srcdir)/intl-compat.c
269
274
$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c
276
# This rule is executed only on Woe32 systems.
277
# The following sed expressions come from the windres-options script. They are
278
# inlined here, so that they can be written in a Makefile without requiring a
279
# temporary file. They must contain literal newlines rather than semicolons,
280
# so that they work with the sed-3.02 that is shipped with MSYS. We can use
281
# GNU bash's $'\n' syntax to obtain such a newline.
282
libintl.res: $(srcdir)/libintl.rc
284
sed_extract_major='/^[0-9]/{'$${nl}'s/^\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
285
sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
286
sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
288
"-DPACKAGE_VERSION_STRING=\\\"$(VERSION)\\\"" \
289
"-DPACKAGE_VERSION_MAJOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_major"` \
290
"-DPACKAGE_VERSION_MINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_minor"` \
291
"-DPACKAGE_VERSION_SUBMINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_subminor"` \
292
-i $(srcdir)/libintl.rc -o libintl.res --output-format=coff
271
294
ref-add.sed: $(srcdir)/ref-add.sin
272
295
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed
273
296
mv t-ref-add.sed ref-add.sed