#
#  
#
# 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)
######################################################################

# Adds to global SUBSYSTEMS list
#
SUBSYSTEM_GRAPHICS = lowlevelui

SUBSYSTEMS += $(SUBSYSTEM_GRAPHICS)

SUBSYSTEM_LOWUI_DIR = $(SUBSYSTEM_DIR)/lowlevelui

# Specify which module to build
#
# platform_graphics - platform graphics library,
#		      native image decoding and storage
# putpixel          - putpixel graphics library, Java image storage
#
ifeq ($(PLATFORM), linux_qte)
    SUBSYSTEM_GRAPHICS_MODULES = platform_graphics
else
    ifneq ($(PLATFORM), gci)
      ifeq ($(PLATFORM), stubs)
          ifndef SUBSYSTEM_GRAPHICS_MODULES
              SUBSYSTEM_GRAPHICS_MODULES = platform_graphics
          endif
      else
          SUBSYSTEM_GRAPHICS_MODULES = putpixel
      endif
    endif
endif


#####################################################################
# Graphics util Subsystem
# Description: graphics utility functions
#####################################################################

ifneq ($(PLATFORM), gci)
include $(SUBSYSTEM_LOWUI_DIR)/graphics_util/$(LIB_MAKE_FILE)


#####################################################################
# Platform graphics port  Subsystem
# Description: platform dependent library
#              graphics.platform_graphics depends on it
#####################################################################

ifeq ($(SUBSYSTEM_GRAPHICS_MODULES), platform_graphics) 
    include $(SUBSYSTEM_LOWUI_DIR)/platform_graphics_port/$(LIB_MAKE_FILE)
endif

#####################################################################
# Graphics Subsystem 
# Description: contains platform_graphics and putpixel implementations
#####################################################################

include $(SUBSYSTEM_LOWUI_DIR)/graphics/$(LIB_MAKE_FILE)
endif

#####################################################################
# Graphics api Subsystem
# Description: Java classes for lowlevelui and
#              and corresponding kni implementations
#####################################################################

include $(SUBSYSTEM_LOWUI_DIR)/graphics_api/$(LIB_MAKE_FILE)



####################################################################
$(MIDP_OUTPUT_DIR)/classes.zip:: $(SUBSYSTEM_GRAPHICSUTIL_JAVA_FILES)
	$(appendjavafiles)

SUBSYSTEM_LOWLEVELUI_JAVA_FILES = \
    $(SUBSYSTEM_GRAPHICSUTIL_JAVA_FILES)         \
    $(SUBSYSTEM_GRAPHICSAPI_JAVA_FILES)          \
    $(SUBSYSTEM_GRAPHICS_JAVA_FILES)             \
    $(SUBSYSTEM_PLATFORMGRAPHICSPORT_JAVA_FILES)

SUBSYSTEM_LOWLEVELUI_I3TEST_JAVA_FILES = \
    $(SUBSYSTEM_GRAPHICSUTIL_I3TEST_JAVA_FILES)         \
    $(SUBSYSTEM_GRAPHICSAPI_I3TEST_JAVA_FILES)          \
    $(SUBSYSTEM_GRAPHICS_I3TEST_JAVA_FILES)             \
    $(SUBSYSTEM_PLATFORMGRAPHICSPORT_I3TEST_JAVA_FILES)

SUBSYSTEM_LOWLEVELUI_NATIVE_FILES = \
    $(SUBSYSTEM_GRAPHICSUTIL_NATIVE_FILES)         \
    $(SUBSYSTEM_GRAPHICSAPI_NATIVE_FILES)          \
    $(SUBSYSTEM_GRAPHICS_NATIVE_FILES)             \
    $(SUBSYSTEM_PLATFORMGRAPHICSPORT_NATIVE_FILES)

SUBSYSTEM_LOWLEVELUI_EXTRA_INCLUDES = \
    $(SUBSYSTEM_GRAPHICSUTIL_EXTRA_INCLUDES)        \
    $(SUBSYSTEM_GRAPHICSAPI_EXTRA_INCLUDES)         \
    $(SUBSYSTEM_GRAPHICS_EXTRA_INCLUDES)            \
    $(SUBSYSTEM_PLATFORMGRAPHICSPORT_EXTRA_INCLUDES) 


SUBSYSTEM_LOWLEVELUI_EXTRA_CFLAGS = \
    $(SUBSYSTEM_GRAPHICSUTIL_EXTRA_CFLAGS)          \
    $(SUBSYSTEM_GRAPHICSAPI_EXTRA_CFLAGS)           \
    $(SUBSYSTEM_GRAPHICS_EXTRA_CFLAGS)              \
    $(SUBSYSTEM_PLATFORMGRAPHICSPORT_EXTRA_CFLAGS)


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

# Javadoc source path
MIDP_JAVADOC_SOURCEPATH += \
    $(GRAPHICS_API_DIR)/classes \
    $(GRAPHICS_DIR)/classes
