#	$Id: Makefile.in,v 1.2 1999/08/17 17:34:09 jas Exp $

SHELL		= /bin/sh

srcdir		= @srcdir@
VPATH		= @srcdir@

CC		= @CC@
RM		= rm

INSTALL		= @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA	= @INSTALL_DATA@
MKINSTALLDIRS 	= @top_srcdir@/mkinstalldirs

prefix 		= @prefix@
exec_prefix	= @exec_prefix@
bindir		= @bindir@

DEFS		= @DEFS@ -DDEBUG
CFLAGS		= @CFLAGS@
LIBS		= -L../../../lib/roken -lroken @LIBS@

MOUNT_PROG	= mount_xfs
UMOUNT_PROG 	= umount_xfs

MOUNT_SRCS	= mount_xfs.c
MOUNT_OBJS	= $(MOUNT_SRCS:.c=.o)

UMOUNT_SRCS	= umount_xfs.c
UMOUNT_OBJS	= $(UMOUNT_SRCS:.c=.o)

PROGS		= $(MOUNT_PROG) $(UMOUNT_PROG)

all:	$(PROGS)

.c.o:
	$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<

$(MOUNT_PROG): $(MOUNT_OBJS)
	$(CC) -o $(MOUNT_PROG) $(MOUNT_OBJS) $(LIBS)

$(UMOUNT_PROG): $(UMOUNT_OBJS)
	$(CC) -o $(UMOUNT_PROG) $(UMOUNT_OBJS) $(LIBS)

clean:
	$(RM) -f $(PROGS) *.o *~

distclean: clean
	rm -f Makefile

install: all
	$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
	for i in $(PROGS); do \
	  $(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir)/$$i; \
	done

uninstall:
	for i in $(PROGS); do \
	  rm -f $(DESTDIR)$(bindir)/$$i; \
	done

TAGS: $(MOUNT_SRCS) $(UMOUNT_SRCS)
	etags $(MOUNT_SRCS) $(UMOUNT_SRCS)

.PHONY: all install uninstall clean
