# Client toplevel makefile

TOP=..
FLAGS=-I$(TOP)/kernel -I$(TOP)/lib -I$(TOP)/genser #-DDEBUG
CXXFLAGS = $(FLAGS)
CFLAGS = $(FLAGS)

include $(TOP)/rules

SUBDIRS=intfs homer example ftpfs

LDFLAGS = $(PROF)

MUSERFSOBJ = muserfs.o userfs_types.o

PROGS=muserfs um

all:: $(PROGS) subdirs

install: muserfs
	install -m 4755 -o root -g root -sc muserfs /usr/local/bin

muserfs: $(MUSERFSOBJ) $(DEPLIBUSERFS)
	$(CC) $(LDFLAGS) -o $@ $(MUSERFSOBJ) $(LIBUSERFS)

muserfs.cat: muserfs.1
	groff -Tascii -man $< > $@ || rm -f $@

clean:: dummy
	rm -f *.o *~ core $(PROGS)

dep depend::
	$(CXX) $(CXXFLAGS) -M *.c > .depend

include $(TOP)/rules.sub
