ifeq ($(RHIDESRC),)
error You must set the environment variable RHIDESRC
endif
#       This makefile is designed for DJGPP
SRCDIR=$(RHIDESRC)/gettext/lib
programs=$(wildcard $(SRCDIR)/*.exe) $(subst .exe,,$(wildcard $(SRCDIR)/*.exe))
src_files=$(notdir $(filter-out $(programs),$(filter-out %.a,$(filter-out %.o,$(wildcard $(SRCDIR)/*)))))
# Makefile for the support library subdirectory of the GNU NLS Utilities
# Copyright (C) 1995 Free Software Foundation, Inc.
#
# 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 = gettext
VERSION = 0.10.23

#SHELL = /bin/sh

srcdir = $(SRCDIR)
top_srcdir = $(srcdir)/..
VPATH = $(SRCDIR)

subdir = lib
intldir = ../intl

AR = ar
CC = gcc
RANLIB = ranlib

DEFS = -DHAVE_CONFIG_H
CFLAGS = -O
CPPFLAGS = 

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

# If your systems has the GNU getopt functions available you may comment
# out the following line.
GETOPT = getopt.o getopt1.o
GETOPTSRC = getopt.c getopt1.c

HEADERS = error.h fstrcmp.h getline.h getopt.h hash.h obstack.h \
printf-parse.h printf.h system.h pathmax.h
SOURCES = alloca.c error.c fstrcmp.c getline.c hash.c $(GETOPTSRC) memset.c \
memmove.c obstack.c printf-prs.c stpcpy.c strcasecmp.c strcspn.c strtol.c \
strtoul.c vasprintf.c whoami.c xgetcwd.c xmalloc.c xstrdup.c
OBJECTS =  error.o fstrcmp.o $(GETOPT) hash.o whoami.o xgetcwd.o \
xmalloc.o xstrdup.o vasprintf.o printf-parse.o obstack.o getline.o
DISTFILES = ChangeLog Makefile.in $(HEADERS) $(SOURCES)

.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
	$(COMPILE) $<

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

all: libnlsut.a

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

install install-exec install-data install-src: all

uninstall:

check: all

$(OBJECTS): ../config.h
error.o getopt.o xmalloc.o: $(intldir)/libgettext.h
getline.o: getline.h
getopt.o: getopt.h
obstack.o: obstack.h
printf-prs.o: printf-parse.h printf.h
strtoul.o: strtol.c
hash.o: hash.h obstack.h
fstrcmp.o: fstrcmp.h system.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)

mostlyclean:
	rm -f *.a *.o core core.*

clean: mostlyclean

distclean: clean
	rm -f Makefile ID TAGS

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

distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist dist-gettext: Makefile $(DISTFILES)
	for file in $(DISTFILES); do \
	  ln $(srcdir)/$$file $(distdir) 2> /dev/null \
	    || cp -p $(srcdir)/$$file $(distdir); \
	done

include $(RHIDESRC)/common.mak
# 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:

