CC = gcc
LIBS = -lpcap
CFLAGS = -ggdb -Wall
VERSION = 0.0.1b

TARGET = smbsniff
SRCS = smbsniff.c
OBJS = smbsniff.o
DEPS = smb.h tcp.h ip.h
OTHERS = smbsniff.1 README TODO Makefile

all: $(TARGET)

solaris:
	@ $(MAKE) CFLAGS='$(CFLAGS) -Dsolaris' LIBS='$(LIBS) -lsocket -lnsl' all

clean:
	rm -f $(TARGET) $(OBJS)

dist:
	tar cvf - $(SRCS) $(DEPS) $(OTHERS) | gzip -9v > smbsniff-$(VERSION).tar.gz

$(TARGET): $(DEPS) $(OBJS)
	   @echo Compiling $(TARGET) v$(VERSION)
	   $(CC) -o $@ $(OBJS) $(LIBS)

#EOF
