# makefile

include ../env

MOFS=$(shell ls -1 *.mof)
CLASSMOFS=$(filter-out %R.mof, $(MOFS))
REGISTRATIONMOFS=$(filter %R.mof, $(MOFS))


.PHONY: all install uninstall clean

all: 

install: 
ifdef SNIA
	cp Ela_Indication.mof $(LIBINSTALL)/mof
endif

ifdef PEGASUS
	cimmof -I. -n root/cimv2 Ela_Indication.mof
	cimmof -I. -n root/PG_InterOp Ela_IndicationR.mof
	cp Ela_Indication.mof $(MOFINSTALL)
	cp Ela_IndicationR.mof $(MOFINSTALL)
endif
ifdef STANDALONE
	$(foreach MOF, $(CLASSMOFS), install -m 644 $(MOF) $(CIMOMMOF); )
	$(foreach MOF, $(REGISTRATIONMOFS), install -m 644 $(MOF) $(CIMOMMOF); )
endif
uninstall:
ifdef SNIA
	cd $(LIBINSTALL)/mof && $(RM) Ela_Indication.mof
endif

ifdef PEGASUS
	cd $(MOFINSTALL) && $(RM) Ela_Indication.mof
	cd $(MOFINSTALL) && $(RM) Ela_IndicationR.mof
	cd $(REPOSITORY_PATH)/classes && $(RM) Ela_ReportIndication.CIM_ProcessIndication
endif
clean:
