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

# vpath for ( jams_port ) module
#

ifeq ($(TARGET_PLATFORM), javacall)
    vpath % $(SUBSYSTEM_AMS_DIR)/example/jams_port/$(TARGET_PLATFORM)/native
    SUBSYSTEM_AMS_EXTRA_INCLUDES += \
        -I$(SUBSYSTEM_AMS_DIR)/example/jams_port/$(TARGET_PLATFORM)/native
else
ifeq ($(TARGET_PLATFORM), wince)
    vpath % $(SUBSYSTEM_AMS_DIR)/example/jams_port/$(TARGET_PLATFORM)/native
    SUBSYSTEM_AMS_EXTRA_INCLUDES += \
        -I$(SUBSYSTEM_AMS_DIR)/example/jams_port/$(TARGET_PLATFORM)/native
else    
    vpath % $(SUBSYSTEM_AMS_DIR)/example/jams_port/default/native
    SUBSYSTEM_AMS_EXTRA_INCLUDES += \
        -I$(SUBSYSTEM_AMS_DIR)/example/jams_port/default/native
endif
endif


# Don't include exe files to MIDP source file list
# since we want to link different obj files for different exe
#

# Native files for the ( jams_port ) module
#
ifeq ($(TARGET_VM), cldc_vm)
SUBSYSTEM_AMS_NATIVE_FILES += \
    runMidlet_md.c
endif

ifeq ($(TARGET_PLATFORM), wince)
  ifeq ($(USE_MULTIPLE_ISOLATES), true)
    RC_DEFS += -DENABLE_MULTIPLE_ISOLATES=1
  endif

  CEDIR = $(MIDP_DIR)/src/highlevelui/wince_application/resources

  OBJ_FILES += $(OBJ_DIR)/resources.res

  ifeq ($(TARGET_CPU), arm)
    OBJ_FILES += $(OBJ_DIR)/gxj_graphics_asm_wince.o
  endif

  $(OBJ_DIR)/resources.res: $(CEDIR)/resources.rc $(CEDIR)/resources.h
	@echo " ... $@" $(LOG)
	$(A)$(RC) -D_WIN32_WCE=$(CEVersion) /I"${EVC_INCLUDE_PATH}" \
	  /I"${MIDP_OUTPUT_DIR}/generated" \
	  /I"$(PCSL_OUTPUT_DIR)/$(TARGET_PLATFORM)_$(TARGET_CPU)/inc" \
	  $(RC_DEFS) -DUNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" \
	  /fo`$(call fixcygpath,$@ $(CEDIR)/resources.rc)`

  $(OBJ_DIR)/gxj_graphics_asm_wince.o: \
	$(MIDP_DIR)/src/lowlevelui/platform_graphics_port/wince/gxj_graphics_asm_wince.s
	$(ASM) -o $@ $<
endif
