#
#
# Copyright  1990-2006 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
# 
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version
# 2 only, as published by the Free Software Foundation. 
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License version 2 for more details (a copy is
# included at /legal/license.txt). 
# 
# You should have received a copy of the GNU General Public License
# version 2 along with this work; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA 
# 
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
# Clara, CA 95054 or visit www.sun.com if you need additional
# information or have any questions. 
#
######################################################################
#
# Module's Component Configuration file
#
# Remember: It is up to the module itself to impose rules of
# how to compile the options. All the global Makefile needs
# is the final def. of Java and native file lists and some
# other def. (like VPATH)
#
# MIDP_ABB_DIR = point to the root of this workspace
#
#
######################################################################

# Adds to global SUBSYSTEMS list
#
SUBSYSTEMS += jsr234

# Javadoc source path
JSR_234_SOURCEPATH = \
    $(MIDP_ABB_DIR)/src/classes

JSR_234_PACKAGES = \
    javax.microedition.media \
    javax.microedition.media.control \
    javax.microedition.media.protocol \
    com.sun.mmedia \
    com.sun.mmedia.protocol

JAVADOC_ALL_SOURCEPATH += $(JSR_234_SOURCEPATH)
JAVADOC_ALL_PACKAGES +=  $(JSR_234_PACKAGES)

GROUP_DOC_ALL += \
        -group "JSR234 Advanced Mutilmedia" \
	$(shell echo $(JSR_234_PACKAGES) | tr ' ' $(PATHSEP))

# Platform definitions
#
include $(MIDP_ABB_DIR)/src/config/abb.gmk

include $(MIDP_ABB_DIR)/src/config/$(TARGET_OS).gmk

# Determines what option we have made and set it
# to some variable that global makefile recognize
#
SUBSYSTEM_JSR_234_JAVA_FILES   += \
    $(MODULE_JSR_234_JAVA_FILES)

SUBSYSTEM_JSR_234_NATIVE_FILES += \
    $(MODULE_JSR_234_NATIVE_FILES)

SUBSYSTEM_JSR_234_EXTRA_INCLUDES += \
    $(MODULE_JSR_234_EXTRA_INCLUDES)

#I3TESTS    
SUBSYSTEM_JSR_234_I3TEST_JAVA_FILES = \

JTWI_I3TEST_JAVA_FILES	+= $(SUBSYSTEM_JSR_234_I3TEST_JAVA_FILES)
    
# Internal paths for jsr 234 module
#
INTERNAL_JSR_234_CONFIG_DIR= $(MIDP_ABB_DIR)/src/config

# Include jsr 234 common properties in Configuration
#
SUBSYSTEM_CONFIGURATION_INPUT_FILES += \
    $(INTERNAL_JSR_234_CONFIG_DIR)/properties.xml

JTWI_NATIVE_FILES	+= $(SUBSYSTEM_JSR_234_NATIVE_FILES)
EXTRA_INCLUDES		+= $(SUBSYSTEM_JSR_234_EXTRA_INCLUDES)

# Specify romizer configuration file for the jsr
# and path where the file is located
#
#ROMGEN_INCLUDE_PATHS += $(MIDP_ABB_DIR)/src/config
#ROMGEN_CFG_FILES     += jsr234_rom.cfg

# Append JSR 234 source bundle creation to target
source_bundle:: jsr_234_source_bundle

# Create JSR 234 source in subdir 'jsr234/'
JSR_234_SOURCE_OUTPUT_DIR=$(SOURCE_OUTPUT_DIR)/midp_abb

# Copy and filter JSR 234 source in JSR_234_SOURCE_OUTPUT_DIR
jsr_234_source_bundle: SOURCE_OUTPUT_DIR
	@echo " ... MIDP ABB source bundle" $(LOG)
	@$(call re_src_filter,$(MIDP_ABB_DIR),$(JSR_234_SOURCE_OUTPUT_DIR),src)

$(MIDP_OUTPUT_DIR)/classes.zip:: $(SUBSYSTEM_JSR_234_JAVA_FILES)
	$(appendjavafiles)

EXTRA_CFLAGS += -DJTWI_HI \
                -DCLDC

