#
# Makefile,v 1.3 2001/10/27 02:02:46 dsg Exp
# OpenMMS Makefile for directory: import/corba/idl/Property
#
# Copyright 2001 The Regents of the University of California
# All Rights Reserved
#
# OpenMMS was developed by Dr. Douglas S. Greer at the San Diego
# Supercomputer Center, a research unit of the University of California,
# San Diego.  Support for this effort was provided by NSF through the
# Protein Data Bank (Grant DBI-9814284) and the National Partnership for
# Advanced Computational Infrastructure (Grant ACI-9619020)
#
# Permission to use, copy, modify and distribute any part of OpenMMS for
# educational, research and non-profit purposes, without fee, and
# without a written agreement is hereby granted, provided that the above
# copyright notice, this paragraph and the following paragraphs appear
# in all copies.
#
# Those desiring to incorporate this OpenMMS into commercial products or
# use for commercial purposes should contact the Technology Transfer
# Office, University of California, San Diego, 9500 Gilman Drive, La
# Jolla, CA 92093-0910, Ph: (619) 534-5815, FAX: (619) 534-7345.
#
# In no event shall the University of California be liable to any party
# for direct, indirect, special, incidental, or consequential damages,
# including lost profits, arising out of the use of this OpenMMS, even
# if the University of California has been advised of the possibility of
# such damage.
#
# The OpenMMS provided herein is on an "as is" basis, and the
# University of California has no obligation to provide maintenance,
# support, updates, enhancements, or modifications.  The University of
# California makes no representations and extends no warranties of any
# kind, either implied or express, including, but not limited to, the
# implied warranties of merchantability or fitness for a particular
# purpose, or that the use of the OpenMMS will not infringe any patent,
# trademark or other rights.

ifndef TOP_DIR
export TOP_DIR := $(shell (cd ../../../..; pwd))
endif
	
.PHONY: $(TOP_DIR)/config/openmms.gmake
include $(TOP_DIR)/config/openmms.gmake

Package        =
Sources        = 
Dependencies   =
Build_Subdirs  =

# Use single $(java_filename) file to cue the makes
package_group   := ccm
package_name	:= BaseIDL
java_filename	:= ModuleDef.java

package_subdir	:= $(package_group)/$(package_name)
idl_files 	:= $(package_name).idl
java_source	 = $(foreach c, $(java_filename), \
			$(OMG_PACKAGE_SUBDIR)/$(package_subdir)/$(c))
build_class	 = $(java_source:.java=.class)
install_class	 = $(foreach c, $(build_class), $(CLASS_DIR)/$(c))

# command for SUN's idlj compiler
ccmd := $(IDL2JAVA_COMPILER) \
	-pkgPrefix $(package_name) $(OMG_PACKAGE_NAME).$(package_group) \
	-fclient -fserver

$(BUILD_TARGET):: $(install_class)

$(install_class): $(java_source)
	cd $(OMG_PACKAGE_SUBDIR)/$(package_group) ; \
		$(JAVAC) -d $(CLASS_DIR) */*.java

$(java_source): $(idl_files)
	@for i in $(idl_files) ; \
	do \
	echo $(ccmd) $$i ; \
	$(ccmd) $$i ; \
	done

init::

clean::
	rm -rf org $(OMG_CLASS_DIR)/ccm

include $(TOP_DIR)/config/rules.gmake

fin::
