|
1 # Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
2 # All rights reserved. |
|
3 # This component and the accompanying materials are made available |
|
4 # under the terms of the License "Eclipse Public License v1.0" |
|
5 # which accompanies this distribution, and is available |
|
6 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 # |
|
8 # Initial Contributors: |
|
9 # Nokia Corporation - initial contribution. |
|
10 # |
|
11 # Contributors: |
|
12 # |
|
13 # Description: |
|
14 # Import library generation macros for supported e32 base architectures |
|
15 # |
|
16 # |
|
17 |
|
18 |
|
19 # ARM-specific Macros |
|
20 |
|
21 define importlibtarget_prepfile_arm |
|
22 $(PREPPEDDEFFILE): $(DEFFILE) |
|
23 $(call startrule,importlibtarget_prepfile,FORCESUCCESS) \ |
|
24 $(PREPDEF) $(call dblquote,$(DEFFILE)) $(call dblquote,$(PREPPEDDEFFILE)) \ |
|
25 $(call endrule,importlibtarget_prepfile) |
|
26 endef |
|
27 |
|
28 define importlibtargetversioned_arm |
|
29 $(IMPORTLIBTARGETVERSIONED_DSO): $(IMPLIBTOOL) $(PREPPEDDEFFILE) |
|
30 $(call startrule,importlibversioned,FORCESUCCESS) \ |
|
31 $(IMPLIBTOOL) \ |
|
32 --sid=0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0)) \ |
|
33 --version=$(VERSION) \ |
|
34 --definput="$(PREPPEDDEFFILE)" \ |
|
35 --dso=$$(call dblquote,$$@) \ |
|
36 --linkas=$(call dblquote,$(LINKASVERSIONED)) \ |
|
37 $(call endrule,importlibversioned) |
|
38 endef |
|
39 |
|
40 define importlibtarget_prepfile_x86 |
|
41 # In x86 builds, x86-specific .def files take priority. However, if they aren't present, |
|
42 # the build falls-back to using ARM EABI .def files. |
|
43 # In the case of the latter, further processing is required before they can be used: |
|
44 # 1: ZTI and ZTV exports are ABSENT-ed |
|
45 # 2: "St9__va_list" entries are replaced with "Pc" |
|
46 # The primary/seconday status of the .def file is deduced in the front-end - we just need |
|
47 # to react to RESOLVED_DEFFILE_SECONDARY appropriately. |
|
48 |
|
49 ifneq ($(RESOLVED_DEFFILE_SECONDARY),) |
|
50 $$(eval INPUTDEFFILE:=$(INTERMEDIATEPATH)/$(TARGET).def.x86) |
|
51 |
|
52 $(INTERMEDIATEPATH)/$(TARGET).def.x86: $(DEFFILE) |
|
53 $(call startrule,importlibtarget_prepfile_process,FORCESUCCESS) \ |
|
54 $(GNUSED) -r 's%(^\s*_ZT[I|V].*NONAME).*$$$$%\1 ABSENT%;s%St9__va_list%Pc%' < $$< > $$@ \ |
|
55 $(call endrule,importlibtarget_prepfile_process) |
|
56 |
|
57 CLEANTARGETS:=$$(CLEANTARGETS) $(INTERMEDIATEPATH)/$(TARGET).def.x86 |
|
58 else |
|
59 $$(eval INPUTDEFFILE:=$(DEFFILE)) |
|
60 endif |
|
61 |
|
62 $(PREPPEDDEFFILE): $$(INPUTDEFFILE) |
|
63 $(call startrule,importlibtarget_prepfile,FORCESUCCESS) \ |
|
64 $(PREPDEF) $(call dblquote,$$<) $(call dblquote,$$@) nodatasizes $(PREPDEF_ENTRYPOINT_PREFIX)$(ENTRYPOINT) \ |
|
65 $(call endrule,importlibtarget_prepfile) |
|
66 endef |
|
67 |
|
68 define importlibtargetversioned_x86 |
|
69 $(IMPORTLIBTARGETVERSIONED_DSO): $(IMPLIBTOOL) $(PREPPEDDEFFILE) |
|
70 $(call startrule,importlibversioned,FORCESUCCESS) \ |
|
71 $(IMPLIBTOOL) \ |
|
72 -m i386 \ |
|
73 --input-def "$(PREPPEDDEFFILE)" \ |
|
74 --dllname $(call dblquote,$(LINKASVERSIONED)) \ |
|
75 --output-lib $$(call dblquote,$$@) \ |
|
76 $(call endrule,importlibversioned) |
|
77 endef |