#+======================================================================
# $Source: /cvsroot/tango-cs/tango/tools/pogo/appli/Makefile,v $
#
# Project:      Tango Device Server
#
# Description:  Makefile to generate the JAVA Tango classes package
#
# $Author: pascal_verdier $
#
# $Version: $
#
# $Log: Makefile,v $
# Revision 3.0  2003/04/29 10:42:13  pascal_verdier
# TANGO 3.0 compatibility
# little bugs fixed.
#
# Revision 1.33  2003/01/16 14:32:36  verdier
# Tango classe files detected for open JFileChooser.
#
# Revision 1.32  2002/10/03 13:54:27  verdier
# Pogo has been used without known bug.
# Put class description as class property.
#
# Revision 1.31  2002/04/25 12:05:08  verdier
# IDL 2 implemented for c++ servers
#
# Revision 1.30  2002/02/06 15:21:23  verdier
# Java code generation updated.
#
# Revision 1.26  2001/12/18 10:13:30  verdier
# Attribute user default property code added.
#
# Revision 1.25  2001/11/09 09:46:57  verdier
# Many bugs fixed.
#
# Revision 1.24  2001/04/04 12:22:58  verdier
# Property management added for cpp.
#
# Revision 1.23  2000/10/24 06:21:22  verdier
# The compatibility with TANGO2 has been tested on DatabaseDs.
#
# Revision 1.20  2000/07/07 13:30:10  verdier
# Utilities added after first users.
#
# Revision 1.18  2000/06/20 06:57:35  verdier
# Right button double click management added for :
# editing src code, creating item, editing class....
# Little bugs fixed on generation/re-read src code.
#
# Revision 1.17  2000/05/12 07:37:10  verdier
#  Attributes management added for java generation.
#
# Revision 1.16  2000/04/26 06:04:00  verdier
# The save/restore file (.pogo) does not exist anymore.
# DevStates and DevStates allowed management is now available for java.
#
# Revision 1.15  2000/04/18 08:12:47  verdier
# Management of DevStates to allow command added.
#
# Revision 1.14  2000/04/12 09:25:43  verdier
# Methods to manage attributes are now generated
#  Only if at leat one attribute exists.
#
# Revision 1.13  2000/04/11 09:35:07  verdier
# Attributes management added.
#
# Revision 1.2  2000/03/03 09:43:00  verdier
# States management added
#
# Revision 1.1  2000/02/28 15:41:38  verdier
# Initial revision
#
# Revision 1.1  2000/02/28 14:57:44  verdier
# Initial revision
#
#
# copyleft :    European Synchrotron Radiation Facility
#               BP 220, Grenoble 38043
#               FRANCE
#
#-======================================================================


TANGO_HOME	=	/segfs/tango
TANGO_LIB	=	$(TANGO_HOME)/bin/java
PACK_HOME	= $(TANGO_HOME)/tools
JAR_DIR 	= $(TANGO_LIB)

JAVAC = javac
# -----------------------------------------------------------------
#
#		The compiler flags
#
#------------------------------------------------------------------

JAVAFLAGS = -g

#-------------------------------------------------------------------

PACKAGE	=	Pogo

CL_LIST =	$(PACKAGE)AppliDefs.class	\
			ClassDialog.class			\
			CommandDialog.class			\
			NotAllowedDialog.class		\
			AttributeDialog.class		\
			StateDialog.class			\
			PropertyDialog.class		\
			PrefGeneDialog.class		\
			GenerateDialog.class		\
			GenerateThread.class		\
			EditPogoCode.class			\
			$(PACKAGE)Renderer.class	\
			$(PACKAGE)Tree.class		\
			$(PACKAGE)Help.class		\
			$(PACKAGE)FileFilter.class	\
			$(PACKAGE)Appli.class


DOC_HEADER	=	"<h1>POGO Java Program</h1>"
#
# Rule for compiling
#

.SUFFIXES:	.class .java
.java.class:
	$(JAVAC) $(JAVAFLAGS) $<

#-----------------------------------------------------------------

all:	gene $(PACKAGE) exe

$(PACKAGE): 	$(CL_LIST)

gene:
	@cd ../gene; make  $(PACKAGE)

exe:
	@./pogo

clean:
	rm  -f *.class
	@cd ../gene; rm  -f *.class


jar:	$(PACKAGE)
	@cd $(PACK_HOME); jar cvf 		\
		$(JAR_DIR)/$(PACKAGE).jar	\
		pogo/appli/*.class			\
		pogo/gene/*.class			\
		pogo/img/*.gif 				\
		pogo/img/*.jpg				\
		app_util/img/*.gif 		\
		app_util/img/*.jpg			\
		app_util/RcsId.class		\
		app_util/TangoWindow*.class
	@echo ""
	@echo ""
	@ls -l $(JAR_DIR)/$(PACKAGE).jar



doc:
	@javadoc 				\
	-private 				\
	-version -author		\
	-nodeprecated			\
	-windowtitle POGO		\
	-header $(DOC_HEADER)	\
	-d ../doc/pr_guide		\
	*.java ../gene/*.java


#------------------------------------------------------
#	RCS options
#------------------------------------------------------
#               RCS lock options
RCSLOCK =      	co -l$(VERSION)
#               RCS check out options
RCSCO   =      	co -r$(VERSION)
#               RCS check in options
RCSCI   =      	ci -f -s"Rel" -u$(VERSION) -m"$(LOGMSG)"

SRC		=	*.java  ../gene/*.java Makefile 

lock:
		$(RCSLOCK) $(SRC)

co:
		$(RCSCO) $(SRC)

ci:
		$(RCSCI) $(SRC)

unlock:	
		rcs -u$(LOCK_VERS) $(SRC)
