CFLAGS  += -Wall -I. -DACTUAL
CXXFLAGS+= -Wall -I. -DACTUAL

LIBNAME=basis
MAJOR=1
MINOR=1

HDIR=basis
HFILES= md5_tarray.h md5lib.h options.h rpopen.h validators.h Aliases.H \
        HostConf.H Hosts.H KA.H KAarray.H KW.H Karray.H Nic.H Passwd.H \
	Resolv.H Sysconfig.H YP.H util.H rlstring.h Ntp.H

SRCS= Runlevel.c backup.c header.c ipaddr.c md5lib.c options.c rpopen.c \
      validators.c Aliases.cc HostConf.cc Hosts.cc KAarray.cc Karray.cc \
      Nic.cc Passwd.cc Resolv.cc Sysconfig.cc YP.cc util.cc rlstring.c \
      Ntp.cc

MANPAGES=md5.3 rlgets.3
MLINKS=rlgets.3 rlputs.3

SUBDIRS=testsuite

all clean install:: .depend

include ../Make.library
-include .depend

test: all
	make -C testsuite all

build_install: all
	@-mkdir -p ../include/$(HDIR)
	install -m 444 -c $(HFILES) ../include/$(HDIR)

all:: $(TARGETS)

install:: lib-install hdr-install man-install

clean::  libclean
	@for x in $(SUBDIRS); do \
	    make -C $$x clean || exit 1; \
	done

.depend:
	$(CC) -I. -MM $(SRCS) > .depend
