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

# This specifies the option you choose for this build 
#
# reference	- Reference Java Security Manager
# native_dialog	- External Native Security Manager
#
ifeq ($(USE_NATIVE_PERMISSION_DIALOG), true)
  SUBSYSTEM_SECURITY_MODULES += native_permission_dialog
  PERMISSION_DIALOG_IMPL = native_dialog
else
  SUBSYSTEM_SECURITY_MODULES += reference_permission_dialog
  PERMISSION_DIALOG_IMPL = reference
endif

PERMISSION_DIALOG_DIR = $(SUBSYSTEM_DIR)/security/permission_dialog

# Javadoc source path
SUBSYSTEM_PERMISSION_DIALOG_SOURCEPATH += $(PERMISSION_DIALOG_DIR)/$(PERMISSION_DIALOG_IMPL)/classes

MIDP_JAVADOC_SOURCEPATH += $(SUBSYSTEM_PERMISSION_DIALOG_SOURCEPATH)

#
# Java files for the library
#
SUBSYSTEM_SECURITY_JAVA_FILES += \
    $(PERMISSION_DIALOG_DIR)/$(PERMISSION_DIALOG_IMPL)/classes/com/sun/midp/security/SecurityHandler.java

ifeq ($(PERMISSION_DIALOG_IMPL), native_dialog)
#
# vpath for module specific files
#
vpath % $(PERMISSION_DIALOG_DIR)/native_dialog/native/share

#
# Native files for the native impl of the library
#
SUBSYSTEM_SECURITY_NATIVE_FILES += \
    midp_security_kni.c

# Native include path for the ( native_dialog ) module
SUBSYSTEM_SECURITY_EXTRA_INCLUDES += \
    -I$(PERMISSION_DIALOG_DIR)/native_dialog/native/share/inc

else
# Copy images to /lib at the end of MIDP build
MIDP_RESOURCES += ref_permission_dialog_resources

ref_permission_dialog_resources: $(LIBDIR)
	@mkdir -p $(LIBDIR)
	@cp -f $(PERMISSION_DIALOG_DIR)/reference/resource/*.png $(LIBDIR) \
	  $(LOG)
endif
