sbsv1/buildsystem/extension/tools/stlport.mk
author jjkang
Wed, 30 Jun 2010 11:35:58 +0800
changeset 607 378360dbbdba
parent 599 fa7a3cc6effd
permissions -rw-r--r--
Merge missed changeset 11 (raptor v2.14 and helium 10.0)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
599
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     1
# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     2
# All rights reserved.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     3
# This component and the accompanying materials are made available
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     4
# under the terms of "Eclipse Public License v1.0"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     5
# which accompanies this distribution, and is available
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     7
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     8
# Initial Contributors:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     9
# Nokia Corporation - initial contribution.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    10
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    11
# Contributors:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    12
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    13
# Description:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    14
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    15
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    16
# To ensure that EPOCROOT always ends with a forward slash
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    17
TMPROOT:=$(subst \,/,$(EPOCROOT))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    18
EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    19
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    20
include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    21
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    22
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    23
SOURCE_ARCHIVE:=$(EXTENSION_ROOT)/$(SOURCE_ARCHIVE)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    24
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    25
ISPATH:=$(call settPath)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    26
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    27
ifeq "$(ISPATH)" "1"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    28
Path:=$(EPOCROOT)epoc32/gcc_mingw/bin;$(Path)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    29
PATH:=$(Path)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    30
endif
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    31
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    32
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    33
EXTRACT_DIR=$(EPOCROOT)epoc32/build
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    34
STL_DIR=$(EXTRACT_DIR)/STLport-$(STLPORT_VERSION)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    35
BUILD_DIR=$(STL_DIR)/build/lib
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    36
UNZIPPED=$(STL_DIR)/unzipped.ok
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    37
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    38
RELEASE_DIR=$(EPOCROOT)epoc32/release/tools2
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    39
RELEASE_DIR_REL=$(RELEASE_DIR)/rel
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    40
RELEASE_DIR_DEB=$(RELEASE_DIR)/deb
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    41
RELEASE_DIRS=$(RELEASE_DIR_REL) $(RELEASE_DIR_DEB)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    42
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    43
STL_REL_LIB_PATH=$(STL_DIR)/lib/libstlport.a
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    44
STL_DEB_LIB_PATH=$(STL_DIR)/lib/libstlportg.a
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    45
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    46
REL_LIB=$(RELEASE_DIR_REL)/$(STL_REL_LIB_NAME)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    47
DEB_LIB=$(RELEASE_DIR_DEB)/$(STL_REL_LIB_NAME)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    48
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    49
STL_HEADERS_PATH=$(EPOCROOT)epoc32/include/tools/stlport
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    50
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    51
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    52
$(UNZIPPED): $(SOURCE_ARCHIVE)  $(EXTRACT_DIR)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    53
	unzip -o $(SOURCE_ARCHIVE) -d $(EXTRACT_DIR)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    54
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    55
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    56
$(REL_LIB): $(UNZIPPED) $(STL_REL_LIB_PATH)  $(RELEASE_DIR_REL)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    57
	$(call ecopy) $(STL_REL_LIB_PATH) $(REL_LIB)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    58
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    59
$(DEB_LIB): $(UNZIPPED) $(STL_DEB_LIB_PATH)  $(RELEASE_DIR_DEB)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    60
	$(call ecopy) $(STL_DEB_LIB_PATH) $(DEB_LIB)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    61
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    62
LIB: $(REL_LIB) $(DEB_LIB)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    63
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    64
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    65
$(EXTRACT_DIR) $(RELEASE_DIRS):
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    66
	$(call createdir,$@)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    67
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    68
# -Wno-uninitialized is needed by mingw gcc v3.4.5 because it gets
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    69
#  # confused by some of the STLport source and gives this error erroneously
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    70
export EXTRA_CXXFLAGS=-Wno-uninitialized
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    71
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    72
$(STL_REL_LIB_PATH) (STL_DEB_LIB_PATH):
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    73
	$(call tmpmacro)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    74
	make -C $(BUILD_DIR) -fgcc.mak install-release-static install-dbg-static LIB_SUFFIX=
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    75
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    76
CLEAN:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    77
	$(call remove,$(REL_LIB))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    78
	$(call remove,$(DEB_LIB))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    79
	make -C $(BUILD_DIR) -fgcc.mak clobber LIB_SUFFIX=
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    80
	$(call remove,$(STL_DIR))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    81
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    82
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    83
RELEASABLES:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    84
	@echo $(REL_LIB)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    85
	@echo $(DEB_LIB)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    86
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    87
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    88
MAKMAKE BLD SAVESPACE FREEZE CLEANLIB RESOURCE FINAL:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    89
	@echo $@ does nothing in $(TEMPLATE_EXTENSION_MAKEFILE)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    90
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    91