#
# 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 Log.h EventLog.h \
		discriminator.h discriminator.inc.h \
		eventForwardingDiscriminator.h \
		eventForwardingDiscriminator.inc.h
OFILES =	CmisAgent.o AssocMgr.o MOClassInfo.o GenericMO.o \
		Top.o System.o Log.o EventLog.o RecordInfo.o \
		discriminator.o eventForwardingDiscriminator.o \
		ManagedObjectInstance.o

CLEANFILES =	System.cc System.h discriminator.cc discriminator.h \
		eventForwardingDiscriminator.cc eventForwardingDiscriminator.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

Top.o:		Top.h EventLog.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

System.h System.cc \
discriminator.h discriminator.cc \
eventForwardingDiscriminator.h eventForwardingDiscriminator.cc \
                :	MIB.gdmo MOClassInfo.h
		$(GDMO-CMPL) MIB.gdmo

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

Log.o:		Log.h Top.h GenericMO.h

EventLog.o:	EventLog.h Log.h Top.h GenericMO.h ManagedObjectInstance.h

