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

all-local: admof signup-scripts-frontend

admof: admof.c
	$(CC) $(CPPFLAGS) $(CFLAGS) $< -L/usr/lib/afs -L/usr/lib64/afs -lprot -lauth -lrxkad -lubik -laudit -lsys -lrx -llwp -lsys -lafsutil -lcom_err -lresolv -lkrb5 -ldes -lkrb4 -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-frontend $(DESTDIR)$(sbindir)/signup-scripts-frontend
	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

clean:
	rm -f admof signup-scripts-frontend

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