################################################################################
# Filename: ./src/base/Makefile
# 
# The contents of this file are subject to the Qlusters Public License
# Version 1.1 (the License); you may not use this file except in compliance
# with the License.
# You may obtain a copy of the License at
# http://www.openqrm.org/content/view/33/69/.
# 
# Software distributed under the License is distributed on an AS IS basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
# the specific language governing rights and limitations under the License.
# 
# The Original Code is openQRM.
# 
# The Initial Developer of the Original Code is Qlusters Corporation. Portions
# created by Qlusters Corporation are Copyright (C) 2003-2005. All Rights
# Reserved.
# 
# Contributor(s):
# 
# Description:
# 
# Comments:
################################################################################
#
# main components Makefile
#
OUTDIR ?= ../../out

INSTALL_FILES := qrm-*
INSTALL_FILES_DEST := $(OUTDIR)/qrm
INSTALL ?= $(INSTALL_CMD) -D -m 0700

INC_NAME := ./Makefile.inc
include $(INC_NAME)

EASY_MIG_OUT := $(OUTDIR)/qrm/bin/easymigration
EASY_MIG_TMP := $(OUTDIR)/qrm/bin/tmp/
all:

fix_files:

all install clean realclean: fix_files $(SUB_MAKEFILES) 

java/Makefile: tomcat/Makefile

realclean: clean

install:  $(EASY_MIG_OUT)/easymigration.tgz

$(EASY_MIG_OUT)/easymigration.tgz: bin/qrm-cli bin/easymigration/qrm-configure-node-monitor sbin/qrm-runlevel include/qrm-functions include/qrm-nodes-functions
	mkdir -p $(EASY_MIG_TMP)/easymigration
	/bin/cp -f  $^ $(EASY_MIG_TMP)/easymigration
	chmod +x $(EASY_MIG_TMP)/easymigration/*
	mkdir -p $(EASY_MIG_OUT)
	tar -C $(EASY_MIG_TMP) -czf $(EASY_MIG_OUT)/easymigration.tgz easymigration/
	rm -rf $(EASY_MIG_TMP)

.PHONY: all install clean realclean fix_files $(SUB_MAKEFILES)

