#
# Copyright 2002 Sony Corporation 
#
# Permission to use, copy, modify, and redistribute this software for
# non-commercial use is hereby granted.
#
# This software is provided "as is" without warranty of any kind,
# either expressed or implied, including but not limited to the
# implied warranties of fitness for a particular purpose.
#

OPENRSDK_ROOT=/usr/local/OPEN_R_SDK
COMPONENTS=./TelepatiTcp ./PowerMonitor ./TeleLed
INSTALLDIR=$(shell pwd)/MS

TARGETS=all install clean help

.PHONY: $(TARGETS)

all:
	for dir in $(COMPONENTS); do\
	if ! (cd $$dir && $(MAKE) OPENRSDK_ROOT=$(OPENRSDK_ROOT) $@); \
	then\
	exit -1;\
	fi\
	done

install:
	for dir in $(COMPONENTS); do\
	if ! (cd $$dir && $(MAKE) INSTALLDIR=$(INSTALLDIR) OPENRSDK_ROOT=$(OPENRSDK_ROOT) $@); \
	then\
	exit -1;\
	fi\
	done

clean:
	for dir in $(COMPONENTS); do\
	if ! (cd $$dir && $(MAKE) INSTALLDIR=$(INSTALLDIR) OPENRSDK_ROOT=$(OPENRSDK_ROOT) $@); \
	then\
	exit -1;\
	fi\
	done

help:
	@echo 
	@echo "Help per la creazione degli eseguibili"
	@echo
	@echo " make:               compila tutto"
	@echo " make install:       compila e installa tutti gli eseguibili"
	@echo " make clean:         cancella tutti gli oggetti creati"
	@echo	


