#
# Copyright (c) 1991 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 the sntx library (replaces the ISODE dsap one)
#
# By George Pavlou, May 1993


OPTIONS	+=	-I$(OSIMIS-INC)/isode/quipu

all:            lib

lib:		libsntx.a

install:	install-lib

install-h:;

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

install-lib:	libsntx.a
		@echo "cp libsntx.a $(LIB)/libsntx.a; ranlib $(LIB)/libsntx.a";\
		       cp libsntx.a $(LIB)/libsntx.a; ranlib $(LIB)/libsntx.a

#######################################################################
# libsntx
#######################################################################

PEPSY-C	=	IF_tables.c

CFILES  =       attrv.c oid.c oid2.c oid3.c oc.c pe.c psap.c \
		dn_cmp.c dn_cpy.c dn_append.c \
		dn_free.c dn_print.c dn_str.c dn_new.c \
		rdn_cmp.c rdn_cpy.c rdn_new.c \
		rdn_free.c rdn_print.c rdn_str.c rdn_merge.c \
		time.c integer.c boolean.c string.c \
		util.c conf.c \
		attrt_new.c attrt_dec.c attrt_print.c \
		avs_merge.c avs_free.c parse_error.c \
		$(PEPSY-O)

PEPSY-O	=	IF_tables.o

OFILES  =       attrv.o oid.o oid2.o oid3.o oc.o pe.o psap.o \
		dn_cmp.o dn_cpy.o dn_append.o \
		dn_free.o dn_print.o dn_str.o dn_new.o \
		rdn_cmp.o rdn_cpy.o rdn_new.o \
		rdn_free.o rdn_print.o rdn_str.o rdn_merge.o \
		time.o integer.o boolean.o string.o \
		util.o conf.o \
		attrt_new.o attrt_dec.o attrt_print.o \
		avs_merge.o avs_free.o parse_error.o \
		$(PEPSY-O)

INC-OFILES =	attrt_dec.o attrt_new.o attrt_print.o dn_append.o dn_cmp.o \
		dn_cpy.o dn_free.o dn_new.o dn_print.o dn_str.o oc.o \
		rdn_cmp.o rdn_cpy.o rdn_free.o rdn_merge.o rdn_new.o \
		rdn_print.o rdn_str.o

libsntx.a:	$(OFILES)
		ar ruv libsntx.a $(OFILES)
		ranlib libsntx.a

IF_tables.c IF-types.h:	if.py
		$(PEPSY) -A -f -h -m if.py
		sed '/^# line/d' IF_tables.c > IF_tables.c.tmp
		mv IF_tables.c.tmp IF_tables.c
