CC = @CC@
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
prefix = @prefix@
exec_prefix = @exec_prefix@
sbindir = @sbindir@
bindir = @bindir@
sysconfdir = @sysconfdir@

all-local: admof

admof: LDLIBS = -lafsauthent_pic -lafsrpc_pic -lresolv -lkrb5 -lpthread -lk5crypto
admof: admof.o

install:
	install -p -m644 -D mbashrc $(DESTDIR)$(sysconfdir)/mbashrc
	install -p -m755 -D mbash $(DESTDIR)$(bindir)/mbash
	install -p -m755 -D admof $(DESTDIR)$(bindir)/admof
	install -p -m755 -D admof $(DESTDIR)$(sbindir)/ssh-admof
	install -p -m755 -D signup-scripts-backend $(DESTDIR)$(sbindir)/signup-scripts-backend
	install -p -m755 -D cronload $(DESTDIR)$(bindir)/cronload
	install -p -m755 -D vhostadd $(DESTDIR)$(sbindir)/vhostadd
	install -p -m755 -D vhostedit $(DESTDIR)$(sbindir)/vhostedit
	install -p -m755 -D ldap-backup $(DESTDIR)$(sbindir)/ldap-backup
	install -p -m755 -D get-homedirs $(DESTDIR)$(sbindir)/get-homedirs

clean:
	rm -f admof admof.o

distclean: clean
	rm -f mbash signup-scripts-backend
	rm -f configure config.* Makefile
	rm -rf auto*.cache
