# Makefile for directory with message catalog handling in GNU NLS Utilities.
# Copyright (C) 1995, 1996, 1997, 1988 Free Software Foundation, Inc.
#
# Modified 29-Jun-1999 by Thomas Esken <esken@uni-muenster.de> for Gcal.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

PACKAGE = @PACKAGE@
VERSION = @VERSION@

SHELL = /bin/sh

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@

prefix = @prefix@
localedir = $(prefix)/@DATADIRNAME@/locale
gnulocaledir = $(prefix)/share/locale
aliaspath = $(localedir):.

subdir = intl

@SET_MAKE@

AR = ar
CC = @CC@
RANLIB = @RANLIB@

X = @EXEEXT@
O = @OBJEXT@

DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@


COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)


HEADERS = $(COMHDRS) libgettext.h loadinfo.h

COMHDRS = gettext.h gettextP.h hash-string.h

SOURCES = $(COMSRCS) intl-compat.c cat-compat.c

COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
  finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
  explodename.c

OBJECTS = @INTLOBJS@ bindtextdom$O dcgettext$O dgettext$O gettext$O \
  finddomain$O loadmsgcat$O localealias$O textdomain$O l10nflist$O \
  explodename$O

CATOBJS = cat-compat$O ../po/cat-id-tbl$O

GETTOBJS = intl-compat$O

DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
  xopen-msg.sed $(HEADERS) $(SOURCES)

DISTFILES = $(DISTFILES.common) VERSION


.SUFFIXES:
.SUFFIXES: .c $O

.c$O:
	$(COMPILE) $<

INCLUDES = -I.. -I. -I$(top_srcdir)/intl

all: all-@USE_INCLUDED_LIBINTL@

all-yes: libintl.a

libintl.a: $(OBJECTS)
	rm -f $@
	$(AR) cru $@ $(OBJECTS)
	$(RANLIB) $@

../po/cat-id-tbl$O: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
	cd ../po && $(MAKE) cat-id-tbl$O

check install installbin install-strip: all

$(OBJECTS): ../config.h libgettext.h
bindtextdom$O finddomain$O loadmsgcat$O: gettextP.h gettext.h loadinfo.h
dcgettext$O: gettextP.h gettext.h hash-string.h loadinfo.h

tags: TAGS

TAGS: $(HEADERS) $(SOURCES)
	here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)

id: ID

ID: $(HEADERS) $(SOURCES)
	here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)

all-no installdirs uninstall:
	@echo "Nothing to be done for \`$@'"

mostlyclean:
	rm -f *.a *$O core core.*

clean: mostlyclean

distclean: clean
	rm -f Makefile po2msg.sed po2tbl.sed libintl.h

realclean: distclean
	rm -f id ID tags TAGS

maintainer-clean: realclean
	@echo "This command is intended for maintainers to use;"
	@echo "it deletes files that may require special tools to rebuild."

dist dist-$(PACKAGE) distzip distzoo distlha distshar MANIFEST: Makefile $(DISTFILES)

Makefile: $(srcdir)/Makefile.in ../config.status
	cd .. \
	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
	       $(SHELL) ./config.status

# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

# End of file
