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