###########################################################################
# Library Makefile for Samba SMB client/server for unix
# Copyright (C) Andrew Tridgell              1992-1996
# Copyright (C) John H Terpstra              1995-1997
# Copyright (C) Luke Kenneth Casson Leighton 1996-1997
###########################################################################

all : $(THIS_LIB)

.SUFFIXES:
.SUFFIXES: .c .o .h

.c.o: $(INCLUDES)
	@echo Compiling $*.c
	@$(CC) $(CFLAGS) -c $*.c -o $*.o

$(THIS_LIB): $(THIS_OBJ) $(LIB_INCS)
	@echo Linking $@
	@$(AR) $@ $(THIS_OBJ)
	@$(RANLIB) $@ 

clean:
	rm -f core $(THIS_OBJ) $(THIS_LIB) *~

cleandir:  clean
	rm -f .depend tags

realclean: clean

proto:
	@$(SHELL) ../checkos.sh $(FLAGSM)
	$(AWK) -f ../mkproto.awk `echo $(THIS_PROTO_OBJ) | sed -e 's/\.o/\.c/g' | tr ' ' '\n' | sort | uniq` > $(LIBNAME)_proto.h