#*********************************************************************
#
# File          :   Makefile
#
# Project       :   atkpanel generic java application
#
# Description   :   The Makefile to build the java application for monitoring
#                   a device
#
# Author        :   Faranguiss Poncet
#
# Original      :   Mars 2002
#
# $Revision: 1.16 $				$Author: poncet $
# $Date: 2005/05/03 17:02:03 $					$State: Exp $
#
# $Log: Makefile,v $
# Revision 1.16  2005/05/03 17:02:03  poncet
# Added an new attribute list for state and status attributes without events.
#
# Revision 1.15  2005/04/15 12:16:28  poncet
# Added the BooleanScalarAttribute, stateAttributeViewer and statusAttributeViewer.
#
# Revision 1.14  2004/11/24 14:11:56  poncet
# Added new constructor (Boolean arguments instead of boolean) to be used in synoptics.
#
# Revision 1.13  2004/11/23 09:37:12  poncet
# Added ReadOnly mode for MainPanel which supresses all commands. Removed the
# TabbedPanel in the MainPanel when the device has no attribute at all. This
# Allows to have a smaller window for gauges for example.
#
# Revision 1.11  2004/10/12 12:49:51  poncet
# Used AttributePolledList for Trend.setModel method to be compatible ATK 1.9.0. and higher.
#
# Revision 1.10  2003/12/16 17:56:56  poncet
# Added the handling of StringSpectrum Attributes in atkpanel.
#
# Revision 1.9  2003/09/25 15:10:50  poncet
# Fixed a bug in the handling of keepStateRefresher flag. Stop state refresher
# when this flag is set to false and the menu bar command preferences->Stop
# refreshing is called.
#
# Revision 1.8  2003/09/19 08:01:18  poncet
# Tagged to the same revision number all files.
#
# Revision 1.7  2003/09/19 07:59:19  poncet
# Added the operator and expert modes handling. Scalars now displayed by
# ATK ScalarListViewer. The Image attributes now displayed by the new
# ATK viewer NumberImageViewer.
#
# Revision 1.6  2003/03/20 13:28:14  poncet
# In non standalone mode the atkpanel mustn't do an system.exit(-1) when
# the device is not accessible. This feature has been added to atkpanel.
#
# Revision 1.5  2003/02/03 15:48:11  poncet
# Fixed a bug in SpectrumPanel.java related to JTableAdapter.
#
# Revision 1.4  2003/02/03 15:32:09  poncet
# Committed to have a coherent and identical revision numbers to
# avoid using tags.
#
# Revision 1.3  2003/02/03 15:28:07  poncet
# The NumberSpectrumViewer used in SpectrumPanel.java instead of
# NumberSpectrumJChartAdapter. With this change there is no need
# for Sitraka product JClassChart to run atkpanel.
#
# Revision 1.2  2003/01/28 16:57:41  poncet
# Added bin and doc directory
#
# Revision 1.1.1.1  2003/01/28 16:35:55  poncet
# Initial import
#
#
# Copyright (c) 2002 by European Synchrotron Radiation Facility,
#		       Grenoble, France
#
#                       All Rights Reserved
#
#
#**********************************************************************
#

#---------------------------------------------------------------------
#	This Makefile works with the GNU make (sometimes called gmake)
#	It makes use of the GNU make conditional statements to support
#	multiple platforms. To use this makefile for a particular platform
#	call GNU make with the appropriate symbol for that platform
#	defined e.g. "gmake _solaris=1 unix=1 all". The following symbols
#	are used to identify the following platforms :
#
#	_solaris	=	Solaris 
#	
#--------------------------------------------------------------------
#
#       The variables classpath used for compiling is set inside this Makefile.
#       So it doesnot use your own environment varaible $CLASSPATH.
##
#
#--------------------------------------------------------------------
#
TANGO_HOME = /segfs/tango
CLASS_HOME = ../bin
LIB_HOME = $(TANGO_HOME)/lib/java


#               The JAVA Compilers for UNIX
ifdef _solaris
JC      = javac -d $(CLASS_HOME)
ATK_CLS = $(LIB_HOME)/ATKCore.jar:$(LIB_HOME)/ATKWidget.jar
#ATK_CLS = /users/poncet/atk/lib
TANGO_CLS = $(LIB_HOME)/TangORB.jar
CL_PATH = $(CLASS_HOME):$(ATK_CLS):$(TANGO_CLS)
JC_FLAGS = -g -classpath $(CL_PATH)
#JC_FLAGS = -g -deprecation -classpath $(CL_PATH)
endif


#               class files
CLS	=	SpectrumPanel.class \
		StringSpectrumPanel.class \
		ImagePanel.class \
		MainPanel.class
		
#		Jar file to be built
JARFILE =	atkpanel.jar
		
		
ifdef unix
# define a rule for making java class files (suffice .class) from java source files
.SUFFIXES: .java .class
.java.class:
	$(JC) $(JC_FLAGS) $*.java

endif


#---------------------------------------------------------------------
# build the package

	
all:		$(CLS)
		cd $(CLASS_HOME); jar cvf $(JARFILE) atkpanel/*.class



clean:	
		cd $(CLASS_HOME); rm -f atkpanel/*.class $(JARFILE)



