1# Copyright (C) 2009 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15#
16
17LOCAL_PATH := $(call my-dir)
18
19astl_common_src_files := \
20    basic_ios.cpp \
21    ios_base.cpp \
22    ios_globals.cpp \
23    ios_pos_types.cpp \
24    list.cpp \
25    ostream.cpp \
26    sstream.cpp \
27    stdio_filebuf.cpp \
28    streambuf.cpp \
29    string.cpp
30
31# Target build
32include $(CLEAR_VARS)
33
34LOCAL_SRC_FILES := $(astl_common_src_files)
35LOCAL_C_INCLUDES := external/astl/include
36LOCAL_CFLAGS += -I bionic/libstdc++/include -I external/astl/include
37LOCAL_MODULE:= libastl
38
39include $(BUILD_STATIC_LIBRARY)
40
41# On linux we build a host version of the lib to run under valgrind.
42ifeq ($(HOST_OS),linux)
43include $(CLEAR_VARS)
44
45LOCAL_SRC_FILES := $(astl_common_src_files)
46LOCAL_C_INCLUDES := external/astl/include
47LOCAL_CFLAGS += -I bionic/libstdc++/include -I external/astl/include
48LOCAL_MODULE:= libastl_host
49
50include $(BUILD_HOST_STATIC_LIBRARY)
51endif
52