# ex: se wm=0:
#
# $Id: GNUmakefile,v 1.3 1992/04/28 19:55:13 steve Exp $

#XGKS_ONLY	:= yes

# `fortc/' should be entered first in order to build `fortc/fortc(1)' (which
# is, at least, needed by `misc/').
#
SUBDIRS		:= fortc udposix
LINTFLAGS	:= -uz
udposix_objs	:= $(addprefix udposix/, \
			       $(shell $(MAKE) -C udposix LIBOBJS.echo))
LIBOBJS		:= $(udposix_objs)

ifneq (yes, XGKS_ONLY)
  SUBDIRS	:= $(SUBDIRS) misc udres udunits
  misc_objs	:= $(addprefix misc/, fortc.o linklist.o pathname.o strbuf.o \
			strvec.o udalloc.o uderrmsg.o udstderr.o)
  udres_objs	:= $(addprefix udres/, cmdline.o dectab.o \
			stringlist.o udbool.o udchar.o udfloat.o \
			udinfile.o udint.o udoutdir.o udoutfile.o udpath.o \
			udres.o udrm.o udstring.o valuestring.o \
			guisevers.o)
  udunits_objs	:= $(addprefix udunits/, lib.o parser.o scanner.o)
  LIBOBJS	:= $(LIBOBJS) $(misc_objs) $(udres_objs) $(udunits_objs)
  SA_OBJS	:= udres/udbool.o udunits/parser.o
  programs	:= udres/udrdb udunits/udunits
endif

MANIFEST	:= README udape.3

# NB: The programs are made here, rather than by the `all' target of
# their respective sub-directories to insure a complete library prior to
# linking.
#
all	\
install	\
lint	\
clean::	\
%:			subdirs/%

all::			$(programs)

$(programs):		library
	$(recurse)

#lint:			$(LIBOBJS:.o=.ln)

THIS_DIR	:=
include GNUmakemaster
