# master make for metrics

# where to put binaries (from the perspective of our subdirectories)
BIN=../bin

DIRS= mccabe halstead utils kdsi

CFLAGS=-O
LDFLAGS=

all: 	clean  progs install

progs:
	cd kdsi; $(MAKE) -e kdsi
	cd utils; $(MAKE) -e all
	cd halstead; $(MAKE) -e all
	cd mccabe; $(MAKE)  -e all
	@echo metrics software made

install:
	cd kdsi; $(MAKE) install BIN=$(BIN)
	cd utils; $(MAKE) install BIN=$(BIN)
	cd halstead; $(MAKE) install BIN=$(BIN)
	cd mccabe; $(MAKE) install BIN=$(BIN)
	@echo metrics software installed

clean:
	for i in $(DIRS); do (cd $$i; $(MAKE) clean); done;

test:
	@echo testing kdsi
	@cd kdsi;  PATH=$(BIN):$$PATH; export PATH; $(MAKE) -i test
	@echo " "
	@echo testing halstead
	@cd halstead;  PATH=$(BIN):$$PATH; export PATH; $(MAKE) -i test
	@echo " "
	@echo test mccabe
	@cd mccabe;  PATH=$(BIN):$$PATH; export PATH; $(MAKE) -i test
