#
# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#

#
# @(#)Makefile	1.7 02/01/12
#

#CTS_HOME=/export/home2/jdbc/jdbccts_ws/J2EE
#
# This must be set before this makefile is invoked. It is the location of
# the CTS installation root. For instance, if your CTS workspace is in
# /home/fred/cts-ws then this would be your CTS_HOME.


# Defs.mk
#
# This is the top level definitions file. Anything the is commonly needed
# to build our tests is defined here.
#
# TODO: This is a good example of where the whole platform-neutral makefile
# ===== dream turns into a nightmare. When we invoke the 'include' directive
# we need to provide the path to the file that we are including. The trouble
# is that the $(SLASH) variable is defined in the file we need to include. We
# need to be able to determine the platform we are on at any level we are
# making in.
#
all: all2
COMP_TYPE=NONE

include $(CTS_HOME)/build/Defs.mk

# Override directories where vehicle stuff is to include appclient.
VEHICLE_DIRS = $(CTS_HOME)$(SLASH)common$(SLASH)harness$(SLASH)vehicle$(SLASH)ejb  $(CTS_HOME)$(SLASH)common$(SLASH)harness$(SLASH)vehicle$(SLASH)servlet $(CTS_HOME)$(SLASH)common$(SLASH)harness$(SLASH)vehicle$(SLASH)jsp $(CTS_HOME)$(SLASH)common$(SLASH)harness$(SLASH)vehicle$(SLASH)appclient



PACKAGE=com.sun.cts.tests.jdbc.ee.resultSet.resultSet47
# PACKAGE=
#
# The name of the package that this testcase is in. This must be set here.
# For example, the package for this simple sample could be
#
#	PACKAGE=com.sun.cts.tests.samples.simpleJDBC


PKG_DIR=com$(SLASH)sun$(SLASH)cts$(SLASH)tests$(SLASH)jdbc$(SLASH)ee$(SLASH)resultSet$(SLASH)resultSet47
PKG_DIR_COMMON=com$(SLASH)sun$(SLASH)cts$(SLASH)tests$(SLASH)jdbc$(SLASH)ee$(SLASH)common

# PKG_DIR=
#
# The package-name based file path of the package this test is in. This must
# be set here. For instance, if the test you are currently working on is in
# package
#
#	com.sun.cts.tests.samples.simpleJDBC
#
# then the PKG_DIR macro would be set as following
#
#	PKG_DIR=com$(SLASH)sun$(SLASH)cts$(SLASH)tests$(SLASH)samples$(SLASH)simpleJDBC


SRC_DIR=$(CTS_HOME)$(SLASH)tests$(SLASH)jdbc$(SLASH)ee$(SLASH)resultSet$(SLASH)resultSet47
# SRC_DIR=
#
# The sources directory for this test. Normally this will be under the
#
#	<CTS_HOME>/tests
#
# directory. This is similar to the PKG_DIR macro, the difference being that
# this is the absolute path to the source files for this test. For example,
# the source directory for the package named above would be
#
#	SRC_DIR=$(CTS_HOME)$(SLASH)tests$(SLASH)samples$(SLASH)simpleJDBC
 

CLASS_DIR=$(COMPILE_DIR)$(SLASH)$(PKG_DIR)
#
# This is the ultimate location of the compiled .class, .jar, and .xml files
# generated during the build. $(COMPILE_DIR) is defined in Defs.mk and is the
# absolute location of the directory we are compiling all classes into.
# $(PKG_DIR) is defined above. This macro should not need to be edited.


CLIENT    = resultSetClient47.class
CLIENT_NAME = resultSetClient47
# There are several additional macros that you need to provide for your tests:
#
# INTERFACE=	The interface classes for your remote objects
# BEANS=	The EJB implementations (one of which may be the test Driver)
# CLIENT=	The non-EJB class that is invoked to run the tests
#
# These need to be provided in order to build. For example, the following
# targets are appropriate for the simpleJDBC example we have been using:
#
#	INTERFACE = JDBC.class JDBCHome.class
#	BEANS     = JDBCEJB.class
#	CLIENT    = JDBCClient.class
#
# Please note that all you need to provide is the class name, i.e. Foo.class, and
# not the fully qualified class name, i.e. com.sun.cts.tests.samples.foo.Foo.class

TESTNAME=resultSet47

TEST_CLASSES=$(PKG_DIR)$(SLASH)$(CLIENT):$(PKG_DIR_COMMON)$(SLASH)csSchema.class:$(PKG_DIR_COMMON)$(SLASH)DataSourceConnection.class:$(PKG_DIR_COMMON)$(SLASH)dbSchema.class:$(PKG_DIR_COMMON)$(SLASH)rsSchema.class:$(PKG_DIR_COMMON)$(SLASH)DriverManagerConnection.class:$(PKG_DIR_COMMON)$(SLASH)JDBCTestConnectionManager.class

FULLCLIENT = $(PACKAGE).resultSetClient47
# FULLCLIENT=
#
# This is the fully qualified name of your client. This is used to invoke the
# client class. This must be defined here. For example, the JDBCClient.class
# would be specified as
#
#	FULLCLIENT = $(PACKAGE).JDBCClient


CLIENT_JAR  = $(SERVICE_CLIENT_JAR)
#
# The name and location of the application client jar file. This is needed by the
# client at runtime. This has been provided for you and should not need to be modified.
# **NOTE** This will soon go away as it depends on understnading a particular server
# implementation, which we shouldn't be doing.

include $(CTS_HOME)$(SLASH)build$(SLASH)BuildRules.mk
include $(CTS_HOME)$(SLASH)build$(SLASH)jdbc.mk

# Compile all of the sources/props files into .class and .xml files
all2: all_classes all_vehicles_common $(XML)

# generate all of the class files
all_classes: all_classescommon jdbc_common $(CLIENT) 

all_vehicles_common: service_vehicles_common

#######In the future, this will be relocated to the App Client Vehicle#########
XML=appclient.xml
APP_NAME=$(TESTNAME)
#client.jar: $(XML)
#	$(PACKAGE_APPCLIENT)
#	$(SETRUNTIME_APPCLIENT_RULE)

###############################################################################

#### DEPLOY ON J2EE
deploy: service_deploy_common

#### UNDEPLOY ON J2EE
undeploy: service_undeploy_common

#### RUN CLIENT
runclient: $(CLIENT) service_run_common
	
runclient2:
	$(RUNCLIENT_RULE)

runappclient: $(CLIENT)
	$(RUNAPPCLIENT_RULE)

# Note: for clean to work, ejbd must be stopped and restarted
# This will go away soon.
clean: service_clean_common



