|
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: Generate and deploy stub sis file, with package file |
|
15 # made from a cpp preprocessed template. |
|
16 # |
|
17 |
|
18 # To ensure that EPOCROOT always ends with a forward slash |
|
19 TMPROOT:=$(subst \,/,$(EPOCROOT)) |
|
20 EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/ |
|
21 |
|
22 # Include platform independent extension makefile macros |
|
23 include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk |
|
24 |
|
25 # Stub sis path definitions |
|
26 ifneq (,$(findstring $(PLATFORM),WINS WINSCW wins winscw)) |
|
27 TARGETDIR=$(EPOCROOT)epoc32/release/$(PLATFORM)/$(CFG)/z/system/install |
|
28 else |
|
29 TARGETDIR=$(EPOCROOT)epoc32/data/z/system/install |
|
30 endif |
|
31 |
|
32 # Stub sis |
|
33 SISFILE=$(TARGETDIR)/java.sis |
|
34 |
|
35 # Generated package file (variated to prevent parallel build problems) |
|
36 PKGFILE = java_$(PLATFORM)_$(CFG).pkg |
|
37 |
|
38 # Commands for preprocessing and sis creation |
|
39 ifeq ($(notdir $(basename $(SHELL))),sh) |
|
40 CPPCMD = gcc -E -x assembler-with-cpp -P -undef -w |
|
41 else |
|
42 CPPCMD = $(EPOCROOT)epoc32/gcc/bin/cpp -lang-asm -P -undef |
|
43 endif |
|
44 |
|
45 MAKESIS = $(EPOCROOT)epoc32/tools/makesis |
|
46 |
|
47 # Generate package file from a template and build stub SIS file |
|
48 create_sis_file: |
|
49 $(CPPCMD) ../rom/javapkg.template -o $(PKGFILE) |
|
50 $(call ifnotexistd,$(TARGETDIR)) |
|
51 $(MAKESIS) -s $(PKGFILE) $(SISFILE) |
|
52 $(call remove,$(PKGFILE)) |
|
53 |
|
54 do_nothing : |
|
55 echo do_nothing |
|
56 |
|
57 MAKMAKE : do_nothing |
|
58 |
|
59 RESOURCE : create_sis_file |
|
60 |
|
61 SAVESPACE : BLD |
|
62 |
|
63 BLD : do_nothing |
|
64 |
|
65 FREEZE : do_nothing |
|
66 |
|
67 LIB : do_nothing |
|
68 |
|
69 CLEANLIB : do_nothing |
|
70 |
|
71 FINAL : do_nothing |
|
72 |
|
73 CLEAN : |
|
74 -$(call remove,$(SISFILE)) |
|
75 |
|
76 RELEASABLES : |
|
77 @echo $(SISFILE) |