blob: 4e431d5acde0c9ea5b0e5c0551d79565af4fc5b5 [file] [log] [blame]
Jeff Brownc3efb232011-03-17 16:08:14 -07001# Copyright (C) 2011 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# Common flags
16common_c_includes := \
17 external/oprofile \
18 external/oprofile/libabi \
19 external/oprofile/libdb \
20 external/oprofile/libop \
21 external/oprofile/libop++ \
22 external/oprofile/libopt++ \
23 external/oprofile/libpp \
24 external/oprofile/libregex \
25 external/oprofile/libutil \
26 external/oprofile/libutil++
27
28common_cflags := -DHAVE_CONFIG_H
29
30# Common target flags
31common_target_c_includes := $(common_c_includes)
32common_target_cflags := $(common_cflags)
33
34# Common host flags
Jeff Brownc3efb232011-03-17 16:08:14 -070035HAVE_LIBBFD := false
Jeff Brownc3efb232011-03-17 16:08:14 -070036
Jeff Brown6e67eb02011-04-08 12:38:32 -070037ifeq ($(TARGET_ARCH),arm)
38toolchain := prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x
Jeff Brownc3efb232011-03-17 16:08:14 -070039common_host_c_includes := $(common_c_includes) $(toolchain)/include
Jeff Brown6e67eb02011-04-08 12:38:32 -070040common_host_cflags := $(common_cflags) -fexceptions -DANDROID_HOST -DHAVE_XCALLOC
41common_host_ldlibs_libiconv :=
Jeff Brownc3efb232011-03-17 16:08:14 -070042
Jeff Brown6e67eb02011-04-08 12:38:32 -070043ifeq ($(HOST_OS)-$(HOST_ARCH),darwin-x86)
44HAVE_LIBBFD := true
Jeff Brownc3efb232011-03-17 16:08:14 -070045common_host_cflags += -DMISSING_MREMAP
Jeff Brown6e67eb02011-04-08 12:38:32 -070046common_host_ldlibs_libiconv := -liconv
47else
48ifeq ($(HOST_OS)-$(HOST_ARCH),linux-x86)
49HAVE_LIBBFD := true
50endif
Jeff Brownc3efb232011-03-17 16:08:14 -070051endif
52
Jeff Brownc3efb232011-03-17 16:08:14 -070053endif