#
# 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 generic managed system library
#
# By George Pavlou, June 1991


LIBS	=	libgms.a
HFILES	=	MOClassInfo.h GenericMO.h Create.h \
		CmisAgent.h AssocMgr.h RecordInfo.h \
		Top.h System.h managedElement.h \
		discriminator.h discriminator.inc.h \
		eventForwardingDiscriminator.h \
		eventForwardingDiscriminator.inc.h \
		Log.h Log.inc.hcl Log.inc.h \
		logRecord.h logRecord.inc.hcl logRecord.inc.h \
		eventLogRecord.h eventLogRecord.inc.h

OFILES =	CmisAgent.o MOClassInfo.o GenericMO.o Top.o \
		System.o managedElement.o \
		discriminator.o eventForwardingDiscriminator.o \
		Log.o logRecord.o eventLogRecord.o RecordInfo.o \
		ManagedObjectInstance.o # AssocMgr.o

CLEANFILES =	System.cc System.h managedElement.cc managedElement.h \
		discriminator.cc discriminator.h \
		eventForwardingDiscriminator.cc eventForwardingDiscriminator.h \
		Log.cc Log.h logRecord.cc logRecord.h \
		eventLogRecord.cc eventLogRecord.h \
		gdmo.log oidtable.tmp Makefile.mo


all:		lib

lib:		$(LIBS)

glib:		lib

install:	install-h install-lib

clean:;		rm -f *.o *.a 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:	install-lib

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

install-gh:	install-h

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

AssocMgr.o:     MOClassInfo.h

CmisAgent.o:	CmisAgent.h Create.h GenericMO.h Top.h AssocMgr.h RecordInfo.h

MOClassInfo.o:	MOClassInfo.h

GenericMO.o:	GenericMO.h Create.h MOClassInfo.h Top.h Log.h RecordInfo.h \
		CmisAgent.h

Top.o:		Top.h GenericMO.h RecordInfo.h

System.o:	System.h MOClassInfo.h

discriminator.o: discriminator.h discriminator.inc.h discriminator.inc.cc \
                 MOClassInfo.h

eventForwardingDiscriminator.o:	eventForwardingDiscriminator.h \
		eventForwardingDiscriminator.inc.h \
		eventForwardingDiscriminator.inc.cc \
		discriminator.h  discriminator.inc.h \
                MOClassInfo.h CmisAgent.h

Log.o:		Log.h Log.inc.hcl Log.inc.h Log.inc.cc CmisAgent.h

logRecord.o:	logRecord.h logRecord.inc.hcl logRecord.inc.h logRecord.inc.cc

eventLogRecord.o:	eventLogRecord.h eventLogRecord.inc.h \
		eventLogRecord.inc.cc \
		logRecord.h logRecord.inc.hcl logRecord.inc.h

System.h System.cc \
managedElement.h managedElement.cc \
discriminator.h discriminator.cc \
eventForwardingDiscriminator.h eventForwardingDiscriminator.cc \
Log.h Log.cc \
logRecord.h logRecord.cc \
eventLogRecord.h eventLogRecord.cc: \
		MIB.gdmo
		$(GDMO-CMPL) MIB.gdmo -s MIB.syntax.dat -m MIB.mo.dat

RecordInfo.o:	RecordInfo.h Create.h MOClassInfo.h

