625
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
1 |
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
2 |
# All rights reserved.
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
3 |
# This component and the accompanying materials are made available
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
4 |
# under the terms of the License "Eclipse Public License v1.0"
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
5 |
# which accompanies this distribution, and is available
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
6 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
7 |
#
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
8 |
# Initial Contributors:
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
9 |
# Nokia Corporation - initial contribution.
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
10 |
#
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
11 |
# Contributors:
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
12 |
#
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
13 |
# Description:
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
14 |
# Linking support macros for supported e32 base architectures
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
15 |
#
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
16 |
#
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
17 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
18 |
define e32link_genlibexpfile
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
19 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
20 |
# $(1): generation type - 'exports' or 'deffile'
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
21 |
#
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
22 |
# 'exports' generation involves taking a list of the known exports, passing them to
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
23 |
# gendef.pl to create a temporary .def file, prepdef-ing this .def file and then
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
24 |
# passing this along to the import library generation tool to create the .lib.exp.
|
630
|
25 |
# This is invoked for components with known interfaces that aren't making use of a .mmp
|
625
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
26 |
# listed .def file
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
27 |
#
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
28 |
# 'deffile' generation takes the .def file used in the component build, for components
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
29 |
# that either require a .def file or where a .def file is used to override default behaviour.
|
630
|
30 |
# The .def file will already have been prepdef-ed during initial .def file processing, so it's
|
625
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
31 |
# just a matter of running the import library generation tool on the temporary .def file to
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
32 |
# create the .lib.exp
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
33 |
#
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
34 |
# The resultant .lib.exp is then available for use in the final link.
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
35 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
36 |
ifeq ($(1),exports)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
37 |
$(INTERMEDIATEPATH)/$(TARGET).gen.def:
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
38 |
$(call startrule,e32link_gendeffile) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
39 |
$(DEFGENTOOL) $(call dblquote,$$@) $(subst $(CHAR_COMMA)1$(CHAR_SEMIC),,$(AUTOEXPORTS)) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
40 |
$(call endrule,e32link_gendeffile)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
41 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
42 |
CLEANTARGETS:=$$(CLEANTARGETS) $(INTERMEDIATEPATH)/$(TARGET).gen.def
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
43 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
44 |
$(INTERMEDIATEPATH)/$(TARGET).prep: $(INTERMEDIATEPATH)/$(TARGET).gen.def
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
45 |
$(call startrule,e32link_prepdef) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
46 |
$(PREPDEF) $(call dblquote,$$<) $(call dblquote,$$@) nodatasizes $(PREPDEF_ENTRYPOINT_PREFIX)$(ENTRYPOINT) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
47 |
$(call endrule,e32link_prepdef)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
48 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
49 |
CLEANTARGETS:=$$(CLEANTARGETS) $(INTERMEDIATEPATH)/$(TARGET).prep
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
50 |
endif
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
51 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
52 |
$(INTERMEDIATEPATH)/$(TARGET).lib.exp: $(INTERMEDIATEPATH)/$(TARGET).prep
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
53 |
$(call startrule,e32link_genlibexpfile) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
54 |
$(IMPLIBTOOL) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
55 |
-m i386 \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
56 |
--input-def $(call dblquote,$$<) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
57 |
--dllname $(call dblquote,$(LINKASVERSIONED)) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
58 |
-e $$(call dblquote,$$@) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
59 |
$(call endrule,e32link_genlibexpfile)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
60 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
61 |
CLEANTARGETS:=$$(CLEANTARGETS) $(INTERMEDIATEPATH)/$(TARGET).lib.exp
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
62 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
63 |
endef
|