author | Stefan Karlsson <stefan.karlsson@nokia.com> |
Tue, 16 Mar 2010 15:27:06 +0000 | |
branch | wip |
changeset 368 | 113d720d5a6c |
parent 319 | 17156855fe69 |
permissions | -rw-r--r-- |
317 | 1 |
# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 | 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 |
# Function-Like Makefile to build a TOOLS2 EXE with gcc |
|
15 |
# |
|
16 |
# |
|
17 |
||
18 |
## Outputs - externally relevant targets that this FLM generates |
|
319 | 19 |
ifeq ($(filter win,$(HOSTPLATFORM)),win) |
3 | 20 |
SYSTEMLIBS:=$(LIBS.WIN32) |
21 |
else |
|
317 | 22 |
ifneq ($(TOOLS2WIN32),) |
23 |
# Build win32 tools in Linux |
|
24 |
SYSTEMLIBS:=$(LIBS.WIN32) |
|
25 |
else |
|
26 |
# Build linux tools in Linux |
|
3 | 27 |
SYSTEMLIBS:=$(LIBS.LINUX) |
28 |
endif |
|
317 | 29 |
endif |
30 |
||
3 | 31 |
|
32 |
EXETARGET:=$(RELEASEPATH)/$(TARGET)$(DOTEXE) |
|
33 |
||
29
ee00c00df073
Catchup to Perforce WIP with timing, python24
timothy.murphy@nokia.com
parents:
3
diff
changeset
|
34 |
INSTALLED:= |
3 | 35 |
ifneq ($(TOOLSPATH),) |
36 |
INSTALLED:=$(TOOLSPATH)/$(TARGET)$(DOTEXE) |
|
37 |
endif |
|
38 |
||
39 |
## Target groups |
|
29
ee00c00df073
Catchup to Perforce WIP with timing, python24
timothy.murphy@nokia.com
parents:
3
diff
changeset
|
40 |
RELEASABLES:=$(INSTALLED) |
3 | 41 |
TARGETS:=$(EXETARGET) $(INSTALLED) |
42 |
||
43 |
## Common build steps (compiling and cleaning) |
|
44 |
include $(FLMHOME)/tools2common.flm |
|
45 |
||
46 |
## Static libraries |
|
47 |
ifneq ($(STATICLIBRARY),) |
|
48 |
STATICLIBS:=$(patsubst %,$(RELEASEPATH)/lib%.a,$(STATICLIBRARY)) |
|
49 |
LLIBS:=$(OPT.L)"$(RELEASEPATH)" $(patsubst %,$(OPT.l)%,$(STATICLIBRARY)) |
|
50 |
# |
|
51 |
ifneq ($(SYSTEMLIBS),) |
|
52 |
LLIBS:=$(LLIBS) $(patsubst %,$(OPT.l)%,$(SYSTEMLIBS)) |
|
53 |
endif |
|
54 |
# |
|
55 |
endif |
|
56 |
||
57 |
## Link executable |
|
58 |
# get OBJECTFILES from call to tools2common |
|
59 |
define tools2linkexe |
|
60 |
$(EXETARGET): $(OBJECTFILES) $(STATICLIBS) |
|
61 |
$(call startrule,tools2linkexe) \ |
|
109
52e5ae7bfcfe
DPDEF143051 Raptor doesn't process the LINKEROPTION keyword as Abld does
yiluzhu
parents:
29
diff
changeset
|
62 |
$(LINKER) $(CFLAGS) $(LFLAGS) $(OPT.O)"$(EXETARGET)" $(call dblquote,$(OBJECTFILES)) $(LLIBS) $(LINKER_OPTIONS) \ |
3 | 63 |
$(if $(SAVESPACE),; $(GNURM) -rf $(OUTPUTPATH); true,) \ |
64 |
$(call endrule,tools2linkexe) |
|
65 |
||
66 |
endef |
|
67 |
||
68 |
$(eval $(call tools2linkexe)) |
|
69 |
||
70 |
||
71 |
## Copy executable to the tools directory |
|
72 |
ifneq ($(TOOLSPATH),) |
|
73 |
define tools2install |
|
74 |
$(INSTALLED): $(EXETARGET) |
|
75 |
$(call startrule,tools2install) \ |
|
76 |
$(GNUCP) "$(EXETARGET)" "$(INSTALLED)" && \ |
|
77 |
$(GNUCHMOD) a+rwx "$(INSTALLED)" \ |
|
78 |
$(call endrule,tools2install) |
|
79 |
endef |
|
80 |
||
81 |
$(eval $(call tools2install)) |
|
82 |
||
83 |
endif |
|
84 |
||
85 |
## The End |