#
# Copyright (c) 1994 University College London
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation,
# advertising materials, and other materials related to such
# distribution and use acknowledge that the software was developed
# by the Department of Computer Science, University College London.
# The name of the University may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#

# Makefile for Authenticated Associations and Integrity Checks in OSIMIS
# Saleem N. Bhatti
# March 1994

# GCC just for me to test with ...
#CC =		gcc

CFILES =	md5.c CredSntx.c Cred_tables.c mintegrity.c mauth.c minvoke.c
OSISECOFILES =	mauth.o
PEPSYOFILES =	CredSntx.o Cred_tables.o
OFILES =	md5.o $(PEPSYOFILES) mintegrity.o $(OSISECOFILES) minvoke.o

HFILES =	mintegrity.h mauth.h CredSntx.h Cred-types.h minvoke.h

LIBS =		libsecurity.a

$(OSISECOFILES)	:= OPTIONS += $(OSISEC-OPT) -I$(TOP)/include/isode/pepsy
$(PEPSYOFILES)	:= OPTIONS += -I$(TOP)/include/isode/pepsy

all:		libsecurity.a
install:	install-h install-lib

# Install man pages
install-gman:
install-man:

# Install binaries
install-prog:

# Install libraries
glib:		lib
lib:		all

install-glib:	install-lib
install-lib:	$(LIBS)
		@for i in $(LIBS); \
		     do (echo "cp $$i $(LIB)/$$i; $(RANLIB) $(LIB)/$$i"; \
		               cp $$i $(LIB)/$$i; $(RANLIB) $(LIB)/$$i); \
		 done


# Install header files
install-gh:	install-h
install-h:	$(HFILES)
		@for i in $(HFILES); \
		    do (echo "cp $$i $(H)/$$i"; \
		              cp $$i $(H)/$$i); \
		    done

# Libraries
libsecurity.a:	$(OFILES)
		$(AR) $(ARFLAGS) $@ $(OFILES)
		$(RANLIB) $@

# Dependencies
md5.o:		md5.h global.h
mintegrity.o:	mintegrity.h $(TOP)/msap/msap.h $(TOP)/msap/mparm.h md5.h
Cred_tables.o:	Cred_tables.c Cred-types.h
CredSntx.o:	CredSntx.h Cred-types.h
mauth.o:	mauth.h $(TOP)/msap/msap.h CredSntx.h Cred-types.h
minvoke.o:	minvoke.h

clean:;		rm -f *.o *.a core *.ph *_tables.c *-types.h *~ *pure*
