#
# Makefile for the linux smb-filesystem routines.
#

CFLAGS = -Wall -Wstrict-prototypes -O2 -DMODULE -fomit-frame-pointer \
	$(INCLUDES) \
#         -DDEBUG_NCP=1 -DDEBUG_NCP_MALLOC
#         -DDEBUG_NCP_MALLOC

CC     = gcc -D__KERNEL__ -I.
AS     = as
ARCH   = i386

.c.s:
	$(CC) $(CFLAGS) -S $<
.c.o:
	$(CC) $(CFLAGS) -c $<
.s.o:
	$(AS) -o $*.o $<

OBJS=	dir.o file.o inode.o ioctl.o mmap.o proc.o sock.o

all: $(BINDIR)/smbfs.o

$(BINDIR)/smbfs.o: $(OBJS)
	$(LD) -r -o $(BINDIR)/smbfs.o $(OBJS)

dep:
	$(CPP) -M $(INCLUDES) *.c > .depend

clean:
	rm -f *.o *~

realclean: clean
	rm -f smbmount smbtest .depend $(DISTFILE) *.out

modules: smbfs.o

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
