
#
# 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 isode specific managed object libraries
#
# By George Pavlou, June 1991


LIBS	=	libisodesntx.a libisodemib.a
GLIBS	=	libisodesntx.a
HFILES	=	subsystem.h entity.h entity.inc.h connection.h \
		transportEntity.h transportEntity.inc.h \
		transportEntity.inc.hcl \
		transportConnection.h transportConnection.inc.h \
		transportConnection.inc.hcl \
		IsodeICC.h TProtocolClass.h IsodeSntx.h ISODE-types.h
CLEANFILES =	ISODE_tables.c ISODE-types.h \
		subsystem.h entity.h connection.h \
		transportEntity.h transportConnection.h \
		subsystem.cc entity.cc connection.cc \
		transportEntity.cc transportConnection.cc \
		gdmo.log oidtable.tmp Makefile.mo
OSNTXFILES =	ISODE_tables.o IsodeSntx.o
OMIBFILES =	IsodeICC.o subsystem.o entity.o connection.o \
		transportEntity.o transportConnection.o


all:		lib

lib:		$(LIBS)

glib:		$(GLIBS)

install:	install-h install-lib

clean:;		rm -f *.o *.a *.ph core $(CLEANFILES) *~

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-glib:	$(GLIBS)
		@for i in $(GLIBS); \
		    do (echo "cp $$i $(LIB)/$$i; ranlib $(LIB)/$$i"; \
			      cp $$i $(LIB)/$$i; ranlib $(LIB)/$$i); \
		done

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

libisodesntx.a:	$(OSNTXFILES)
		ar ruv libisodesntx.a $(OSNTXFILES)
		ranlib libisodesntx.a

libisodemib.a:	$(OMIBFILES)
		ar ruv libisodemib.a $(OMIBFILES)
		ranlib libisodemib.a

IsodeICC.o:	IsodeICC.h \
		transportEntity.h transportEntity.inc.h \
		transportEntity.inc.hcl \
		transportConnection.h transportConnection.inc.h \
		transportConnection.inc.hcl

entity.o:	entity.h entity.inc.h entity.inc.cc

connection.o:	connection.h

transportEntity.o:	transportEntity.h transportEntity.inc.h \
			transportEntity.inc.hcl transportEntity.inc.cc \
			entity.h entity.inc.h

transportConnection.o:	transportConnection.h transportConnection.inc.h \
			transportConnection.inc.hcl transportConnection.inc.cc \
			connection.h \
			TProtocolClass.h IsodeSntx.h ISODE-types.h

subsystem.h subsystem.cc \
entity.h entity.cc \
connection.h connection.cc \
transportEntity.h transportEntity.cc \
transportConnection.h transportConnection.cc:	MIB.gdmo
			(GDMODIR=$(ETC)/gdmodir; export GDMODIR; $(GDMO) MIB.gdmo)

ISODE_tables.o:	ISODE_tables.c ISODE-types.h

ISODE_tables.c ISODE-types.h:	IsodeAsn.py
		$(PEPSY) $(PFLAGS) IsodeAsn.py

IsodeSntx.o:	ISODE-types.h IsodeSntx.h

lint:		IsodeAsn.c IsodeSntx.c
		lint $(LFLAGS) IsodeAsn.c IsodeSntx.c $(LLIBS) \
		| grep -v "warning: possible pointer alignment problem"

