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 |
# Import library generation 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 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
19 |
# ARM-specific Macros
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
20 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
21 |
define importlibtarget_prepfile_arm
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
22 |
$(PREPPEDDEFFILE): $(DEFFILE)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
23 |
$(call startrule,importlibtarget_prepfile,FORCESUCCESS) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
24 |
$(PREPDEF) $(call dblquote,$(DEFFILE)) $(call dblquote,$(PREPPEDDEFFILE)) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
25 |
$(call endrule,importlibtarget_prepfile)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
26 |
endef
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
27 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
28 |
define importlibtargetversioned_arm
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
29 |
$(IMPORTLIBTARGETVERSIONED_DSO): $(IMPLIBTOOL) $(PREPPEDDEFFILE)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
30 |
$(call startrule,importlibversioned,FORCESUCCESS) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
31 |
$(IMPLIBTOOL) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
32 |
--sid=0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0)) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
33 |
--version=$(VERSION) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
34 |
--definput="$(PREPPEDDEFFILE)" \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
35 |
--dso=$$(call dblquote,$$@) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
36 |
--linkas=$(call dblquote,$(LINKASVERSIONED)) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
37 |
$(call endrule,importlibversioned)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
38 |
endef
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
39 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
40 |
define importlibtarget_prepfile_x86
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
41 |
# In x86 builds, x86-specific .def files take priority. However, if they aren't present,
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
42 |
# the build falls-back to using ARM EABI .def files.
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
43 |
# In the case of the latter, further processing is required before they can be used:
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
44 |
# 1: ZTI and ZTV exports are ABSENT-ed
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
45 |
# 2: "St9__va_list" entries are replaced with "Pc"
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
46 |
# The primary/seconday status of the .def file is deduced in the front-end - we just need
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
47 |
# to react to RESOLVED_DEFFILE_SECONDARY appropriately.
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
48 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
49 |
ifneq ($(RESOLVED_DEFFILE_SECONDARY),)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
50 |
$$(eval INPUTDEFFILE:=$(INTERMEDIATEPATH)/$(TARGET).def.x86)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
51 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
52 |
$(INTERMEDIATEPATH)/$(TARGET).def.x86: $(DEFFILE)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
53 |
$(call startrule,importlibtarget_prepfile_process,FORCESUCCESS) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
54 |
$(GNUSED) -r 's%(^\s*_ZT[I|V].*NONAME).*$$$$%\1 ABSENT%;s%St9__va_list%Pc%' < $$< > $$@ \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
55 |
$(call endrule,importlibtarget_prepfile_process)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
56 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
57 |
CLEANTARGETS:=$$(CLEANTARGETS) $(INTERMEDIATEPATH)/$(TARGET).def.x86
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
58 |
else
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
59 |
$$(eval INPUTDEFFILE:=$(DEFFILE))
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
60 |
endif
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
61 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
62 |
$(PREPPEDDEFFILE): $$(INPUTDEFFILE)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
63 |
$(call startrule,importlibtarget_prepfile,FORCESUCCESS) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
64 |
$(PREPDEF) $(call dblquote,$$<) $(call dblquote,$$@) nodatasizes $(PREPDEF_ENTRYPOINT_PREFIX)$(ENTRYPOINT) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
65 |
$(call endrule,importlibtarget_prepfile)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
66 |
endef
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
67 |
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
68 |
define importlibtargetversioned_x86
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
69 |
$(IMPORTLIBTARGETVERSIONED_DSO): $(IMPLIBTOOL) $(PREPPEDDEFFILE)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
70 |
$(call startrule,importlibversioned,FORCESUCCESS) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
71 |
$(IMPLIBTOOL) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
72 |
-m i386 \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
73 |
--input-def "$(PREPPEDDEFFILE)" \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
74 |
--dllname $(call dblquote,$(LINKASVERSIONED)) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
75 |
--output-lib $$(call dblquote,$$@) \
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
76 |
$(call endrule,importlibversioned)
|
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff
changeset
|
77 |
endef
|