#
#   
#
# 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. 
#
######################################################################
#
# Generic compiler specific defines
# MIDP specific directories and libraries defines are in evc-jtwi.gmk
#
######################################################################
ifndef _EVC_GMK_
_EVC_GMK_	=

# Suffix
LIB_SUFFIX      = .lib
SHARED_LIB_SUFFIX = .dll
OBJ_SUFFIX      = obj

# GCC 
USE_GCC		= false

ifeq ($(USE_VS2005), true)
    ifeq ($(TARGET_CPU), arm)
	EVC_LIB_PATH    = $(VS2005_CE_ARM_LIB)
	EVC_INCLUDE_PATH= $(VS2005_CE_ARM_INCLUDE)
	EVC_ARCH_PATH   = $(VS2005_CE_ARM_PATH)
        CC              = cl.exe
        ASM             = armasm.exe
    else
	EVC_LIB_PATH    = $(VS2005_CE_I386_LIB)
	EVC_INCLUDE_PATH= $(VS2005_CE_I386_INCLUDE)
	EVC_ARCH_PATH   = $(VS2005_CE_I386_PATH)
        CC              = cl.exe
        ASM             = ml.exe
    endif

    CPP                := $(EVC_ARCH_PATH)/$(CC)
    CC                 := $(EVC_ARCH_PATH)/$(CC)
    LD                 := $(EVC_ARCH_PATH)/link.exe
    AR                 := $(EVC_ARCH_PATH)/lib.exe
    RC                 := $(VS2005_COMMON_PATH)/rc.exe
    ASM                := $(EVC_ARCH_PATH)/$(ASM)

    CEVersion           = 0x501
else
    ifeq ($(TARGET_CPU), arm)
	EVC_LIB_PATH    = $(EVC_ARM_LIB)
	EVC_INCLUDE_PATH= $(EVC_ARM_INCLUDE)
	EVC_ARCH_PATH   = $(EVC_ARM_PATH)
        CC              = clarm.exe
        ASM             = armasm.exe
    else
	EVC_LIB_PATH    = $(EVC_I386_LIB)
	EVC_INCLUDE_PATH= $(EVC_I386_INCLUDE)
	EVC_ARCH_PATH   = $(EVC_I386_PATH)
        CC              = cl.exe
        ASM             = ml.exe
    endif

    CPP                := $(EVC_ARCH_PATH)/$(CC)
    CC                 := $(EVC_ARCH_PATH)/$(CC)
    LD                 := $(EVC_ARCH_PATH)/link.exe
    RC                 := $(EVC_COMMON_PATH)/rc.exe
    ASM                := $(EVC_ARCH_PATH)/$(ASM)

    CEVersion           = 400
endif

ifeq ($(USE_DEBUG), true)
DEBUG_LD_FLAGS 	    = /debug 
endif

CC_OUTPUT	    = /Fo
LD_OUTPUT	    = /out:
LINKER_OUTPUT	= $(LD_OUTPUT)
LIBS		      = 
LD_FLAGS 	    = /subsystem:windowsce,3.00 /MACHINE:ARM /DLL $(DEBUG_LD_FLAGS)


endif
