build/sis/Makefile
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 #
       
     2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 # All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Nokia Corporation - initial contribution.
       
    11 #
       
    12 # Contributors:
       
    13 #
       
    14 # Description:
       
    15 #
       
    16 
       
    17 # About signing certificates:
       
    18 #	Used signing certificates can be given by specifying certificate 
       
    19 #	directories with macro SIGNING_KEY_DIRS. Each .der file in the 
       
    20 #	directories is used as certificate, and must be accompanied with
       
    21 # 	a .key file having same basename. Directories must be specificed
       
    22 #	using slashes as directory separator also in windows. Any path 
       
    23 #	accessible by OS can be used, including windows share UNCs.
       
    24 
       
    25 include $(JAVA_SRC_ROOT)/build/Makefile.defs
       
    26 
       
    27 SISFILES = s60_omj_tck.sis s60_omj_no_prompt_policy.sis java_rnd_tools.sis
       
    28 ifdef RD_JAVA_S60_RELEASE_5_0_IAD
       
    29 SISFILES += s60_omj_restore_midlets.sis
       
    30 endif
       
    31 ifdef RD_JAVA_S60_RELEASE_10_1
       
    32 SISFILES += java_3_1.sis
       
    33 else
       
    34 SISFILES += java_2_0.sis
       
    35 endif
       
    36 
       
    37 # Files which should be deployed for testing
       
    38 DEPLOYFILES = s60_omj_tck.sis s60_omj_no_prompt_policy.sis mapfiles.zip java_rnd_tools.sis
       
    39 ifdef RD_JAVA_S60_RELEASE_10_1
       
    40 DEPLOYFILES += unsigned.java_3_1.sis java_3_1.sis
       
    41 else
       
    42 DEPLOYFILES += unsigned.java_2_0.sis java_2_0.sis
       
    43 endif
       
    44 
       
    45 all: init $(SISFILES)
       
    46 
       
    47 # Deploying, if DEPLOYDIR is defined
       
    48 ifdef DEPLOYDIR
       
    49 override DEPLOYDIR := $(subst \,/,$(DEPLOYDIR))
       
    50 override WINDEPLOYDIR := $(subst /,\,$(DEPLOYDIR))
       
    51 deploy: $(addprefix $(DEPLOYDIR)/, $(DEPLOYFILES))
       
    52 all: deploy
       
    53 
       
    54 endif
       
    55 
       
    56 # Find signing certificates from SIGNING_KEY_DIR (*.der, each having .key file)
       
    57 # Fix path to native separator
       
    58 SIGNING_CERTS=$(call PATHFIX,$(wildcard $(addsuffix /*.der,$(SIGNING_KEY_DIRS))))
       
    59 
       
    60 $(DEPLOYDIR)/% :: % 
       
    61 	if not exist $(WINDEPLOYDIR) mkdir $(WINDEPLOYDIR)
       
    62 	copy $< $(subst /,\,$@)
       
    63 
       
    64 # Recreate the SIS files always
       
    65 .phony: ALWAYS
       
    66 .phony: default qt_lcdui old_lcdui init all deploy clean reallyclean
       
    67 
       
    68 init: ALWAYS
       
    69 	if exist mapfiles.zip del mapfiles.zip
       
    70 	python $(JAVA_SRC_ROOT)\build\sis\nouserpromptspolicy\generatePolicies.py
       
    71 
       
    72 CPP_SIS_CMD = cpp -lang-asm -P -undef
       
    73 
       
    74 %.sis: %.pkg ALWAYS
       
    75 	$(CPP_SIS_CMD) $< $<.pkg
       
    76 	makesis $<.pkg unsigned.$@
       
    77 	copy unsigned.$@ $@
       
    78 	echo Signing with $(SIGNING_CERTS) \
       
    79 	$(foreach cert,$(SIGNING_CERTS), && signsis $@ $@ $(cert) $(basename $(cert)).key)
       
    80 	python $(JAVA_SRC_ROOT)\build\buildutils\compressmapfiles.py $<.pkg
       
    81 	del $<.pkg
       
    82 
       
    83 clean:
       
    84 	del mapfiles.zip 2>NUL
       
    85 	del *.sis* 2>NUL
       
    86 	del nouserpromptspolicy\*.ser 2>NUL
       
    87 
       
    88 reallyclean: clean