#
# $Id: Makefile.in,v 1.11 1998/02/24 01:37:12 art Exp $
#

# This should really be set from configure
SHELL = /bin/sh

srcdir = @srcdir@
VPATH = @srcdir@

CC = @CC@
AR = ar
RANLIB = @RANLIB@
DEFS = @DEFS@
CFLAGS = @CFLAGS@ -O

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

prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
libdir = @libdir@

PICFLAGS = # @PICFLAGS@

LIBPREFIX = lib
#@LIBPREFIX@
LIBNAME = $(LIBPREFIX)rxkad
#LIBEXT = @LIBEXT@ Always build archive library!
LIBEXT = a
SHLIBEXT = @SHLIBEXT@
LDSHARED = @LDSHARED@
LIB = $(LIBNAME).$(LIBEXT)

SOURCES = rxk_locl.c rxk_clnt.c rxk_serv.c rxk_crpt.c rxk_info.c osi_alloc.c compat.c

OBJECTS = rxk_locl.o rxk_clnt.o rxk_serv.o rxk_crpt.o rxk_info.o osi_alloc.o compat.o

all: $(LIB)

install: all

Wall:
	make CFLAGS="-g -Wall -Wno-comment -Wmissing-prototypes -Wmissing-declarations -D__USE_FIXED_PROTOTYPES__"

.c.o:
	$(CC) -c $(DEFS) -I../include -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../lwp -I$(srcdir)/../include $(CPPFLAGS) $(CFLAGS) $(PICFLAGS) -I@KRB_INC_DIR@ $<

fc_test: rxk_crpt.c
	$(CC) -DTEST -o $@ $(DEFS) -I../include -I$(srcdir)/.. -I$(srcdir)/../lwp -I$(srcdir)/../include $(CPPFLAGS) $(CFLAGS) $(PICFLAGS) -I@KRB_INC_DIR@ $(VPATH)/rxk_crpt.c


check:

clean:
	rm -f $(LIB) *.o *.a fc_test

mostlyclean: clean

distclean: clean
	rm -f Makefile *.tab.c *~

realclean: distclean
	rm -f TAGS

dist: $(DISTFILES)
	for file in $(DISTFILES); do \
	  ln $$file ../`cat ../.fname`/lib \
	    || cp -p $$file ../`cat ../.fname`/lib; \
	done

$(LIBNAME).a: $(OBJECTS)
	rm -f $@
	$(AR) cr $@ $(OBJECTS)
	-$(RANLIB) $@

$(LIBNAME).$(SHLIBEXT): $(OBJECTS)
	rm -f $@
	$(LDSHARED) -o $@ $(OBJECTS)

TAGS: $(SOURCES)
	etags $(SOURCES)

$(OBJECTS): ../include/config.h
