|
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 # Linking support macros for supported e32 base architectures |
|
15 # |
|
16 # |
|
17 |
|
18 define e32link_genlibexpfile |
|
19 |
|
20 # $(1): generation type - 'exports' or 'deffile' |
|
21 # |
|
22 # 'exports' generation involves taking a list of the known exports, passing them to |
|
23 # gendef.pl to create a temporary .def file, prepdef-ing this .def file and then |
|
24 # passing this along to the import library generation tool to create the .lib.exp. |
|
25 # This is invoked for components with knowN interfaces that aren't making use of a .mmp |
|
26 # listed .def file |
|
27 # |
|
28 # 'deffile' generation takes the .def file used in the component build, for components |
|
29 # that either require a .def file or where a .def file is used to override default behaviour. |
|
30 # The .def file will already have been predef-ed during import library processing, so it's |
|
31 # just a matter of running the import library generation tool on the temporary .def file to |
|
32 # create the .lib.exp |
|
33 # |
|
34 # The resultant .lib.exp is then available for use in the final link. |
|
35 |
|
36 ifeq ($(1),exports) |
|
37 $(INTERMEDIATEPATH)/$(TARGET).gen.def: |
|
38 $(call startrule,e32link_gendeffile) \ |
|
39 $(DEFGENTOOL) $(call dblquote,$$@) $(subst $(CHAR_COMMA)1$(CHAR_SEMIC),,$(AUTOEXPORTS)) \ |
|
40 $(call endrule,e32link_gendeffile) |
|
41 |
|
42 CLEANTARGETS:=$$(CLEANTARGETS) $(INTERMEDIATEPATH)/$(TARGET).gen.def |
|
43 |
|
44 $(INTERMEDIATEPATH)/$(TARGET).prep: $(INTERMEDIATEPATH)/$(TARGET).gen.def |
|
45 $(call startrule,e32link_prepdef) \ |
|
46 $(PREPDEF) $(call dblquote,$$<) $(call dblquote,$$@) nodatasizes $(PREPDEF_ENTRYPOINT_PREFIX)$(ENTRYPOINT) \ |
|
47 $(call endrule,e32link_prepdef) |
|
48 |
|
49 CLEANTARGETS:=$$(CLEANTARGETS) $(INTERMEDIATEPATH)/$(TARGET).prep |
|
50 endif |
|
51 |
|
52 $(INTERMEDIATEPATH)/$(TARGET).lib.exp: $(INTERMEDIATEPATH)/$(TARGET).prep |
|
53 $(call startrule,e32link_genlibexpfile) \ |
|
54 $(IMPLIBTOOL) \ |
|
55 -m i386 \ |
|
56 --input-def $(call dblquote,$$<) \ |
|
57 --dllname $(call dblquote,$(LINKASVERSIONED)) \ |
|
58 -e $$(call dblquote,$$@) \ |
|
59 $(call endrule,e32link_genlibexpfile) |
|
60 |
|
61 CLEANTARGETS:=$$(CLEANTARGETS) $(INTERMEDIATEPATH)/$(TARGET).lib.exp |
|
62 |
|
63 endef |