# $Id: Makefile,v 1.1 1991/07/09 18:40:54 steve Exp $

ifndef MAKEINCDIR
  MAKEINCDIR	:= $(wildcard ~ldm/src)
endif

LIBNAME		:= udape

include $(MAKEINCDIR)/defs.gmk

#
# The sources in this directory:
#
CSRCS		:= udalloc.c uderrmsg.c
HSRCS		:= udalloc.h uderrmsg.h
manuals		:= udalloc.3 uderrmsg.3
MANIFEST	:= $(CSRCS) $(HSRCS) $(manuals) Makefile depend $(pic)

INCLUDES	:= -I../udposix/$(OS)
LIBOBJS		:= $(subst .c,.o,$(CSRCS))

all::		$(LIBOBJS)

ifeq (sunos_sharable, $(OS_NAME)_$(LIBTYPE))
  all::		$(addprefix $(pic)/, $(LIBOBJS))
endif

debug:		$(debug)/$(LIBOBJS)

install:	$(patsubst %,$(INCDIR)/%,$(HSRCS)) \
		$(patsubst %,$(MANDIR)/man3/%,$(manuals))
      ifeq ($(MAKELEVEL),0)
	@echo 1>&2 "You must make \"$@\" from ../"
	@exit 1
      endif

include $(MAKEINCDIR)/rules.gmk
include depend
