#
# $Id: Makefile.in,v 1.3 1999/06/07 23:02:06 lha Exp $
#

SHELL	= /bin/sh

srcdir	= @srcdir@
VPATH	= @srcdir@

CC	= @CC@
AR	= ar
RANLIB	= @RANLIB@
INCLUDES = -I.					\
	   -I$(srcdir)				\
	   -I$(srcdir)/../../../rxkad		\
	   -I$(srcdir)/../../..			\
	   -I../../../rxdef			\
	   -I../../../include			\
	   $(KRB_INC_FLAGS)			\
	   -I$(srcdir)/../../../include

CFLAGS	= @CFLAGS@
KRB_INC_FLAGS= @KRB_INC_FLAGS@

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

prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
sysconfdir = @sysconfdir@
ARLACACHEDIR = @ARLACACHEDIR@
ARLACONFFILE = @ARLACONFFILE@

#PICFLAGS = @PICFLAGS@
 
LIBNAME = $(LIBPREFIX)msecurity
#LIBEXT = @LIBEXT@
LIBEXT = a
#SHLIBEXT = @SHLIBEXT@
#LIBPREFIX = @LIBPREFIX@
LIBPREFIX = lib
#LDSHARED = @LDSHARED@
LIB = $(LIBNAME).$(LIBEXT)

DEFS		= @DEFS@ -DMILKO_SYSCONFDIR=\"$(sysconfdir)\"

LIB_SOURCES	= msecurity.c netinit.c

SOURCES 	= $(LIB_SOURCES)

LIB_OBJECTS 	= msecurity.o netinit.o

OBJECTS 	= $(LIB_OBJECTS) 

all: $(LIB)

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

.c.o:
	$(CC) -c $(CPPFLAGS) $(DEFS) $(INCLUDES) $(CFLAGS) $(PICFLAGS) $<

install: all
	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
	$(INSTALL_DATA) $(LIB) $(DESTDIR)$(libdir)/$(LIB)

uninstall:
	rm -f $(DESTDIR)$(libdir)/$(LIB)

TAGS: $(SOURCES)
	etags $(SOURCES)

check:

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

mostlyclean: clean

distclean: clean
	rm -f Makefile *~

realclean: distclean
	rm -f TAGS

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

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

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

Makefile:	Makefile.in ../../../config.status
	cd ../../..; CONFIG_FILES=milko/lib/msecurity/Makefile CONFIG_HEADERS= $(SHELL) config.status


.PHONY: all install uninstall check clean mostlyclean distclean realclean
