#
# @(#)GNUmakefile	1.25 03/04/16
#
#  
# Copyright 2003 Sun Microsystems, Inc. All Rights Reserved
# SUN PROPRIETARY/CONFIDENTIAL
# Use is subject to license terms. 
#
#

PACKAGE		= 
TOPDIR          = ../../..
MAKEDEFS 	= $(TOPDIR)/src/buildcfg/Defs.gmk
DOCDEFS 	= $(TOPDIR)/src/buildcfg/Doc.gmk
SUBDIRS         = javax com

include $(MAKEDEFS)
include $(DOCDEFS)

FILES.jar = jms.jar \
	    imq.jar \
	    imqadmin.jar 
#
# - The jar files are only created at this level
#   because at this point all the necessary files
#   that go into the jar file should be compiled.
# - Examples need to be built after jar file is built (classes.jar).
# - Only the external javadocs are built with the all target.
#
all optimized : $(SUBDIRS) classes.jar .examples.opt javadocs 

debug : $(SUBDIRS) classes_debug.jar .examples.debug javadocs 

#
# 'clean' target at this level cleans classes, jar files,
# examples, and javadocs.
# Anything below this level will only clean jar files.
#
clean : $(SUBDIRS) jars.clean docs.clean .examples.clean

#
# This docs target will built both internal and external javadocs.
#
docs  : javadocs javadocs.internal 

.examples.clean:
	@if [ $(BUILD_TYPE) = RI ]; then \
	    echo " "; \
	else \
	    cd examples; $(MAKE) clean; \
	fi
.examples.opt: 
	@if [ $(BUILD_TYPE) = RI ]; then \
	    echo " "; \
	else \
	    cd examples; $(MAKE); \
	fi
.examples.debug: 
	@if [ $(BUILD_TYPE) = RI ]; then \
	    echo " "; \
	else \
	    cd examples; $(MAKE) debug; \
	fi

