Jeff Brown | c3efb23 | 2011-03-17 16:08:14 -0700 | [diff] [blame] | 1 | # 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 |
| 16 | common_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 | |
| 28 | common_cflags := -DHAVE_CONFIG_H |
| 29 | |
| 30 | # Common target flags |
| 31 | common_target_c_includes := $(common_c_includes) |
| 32 | common_target_cflags := $(common_cflags) |
| 33 | |
| 34 | # Common host flags |
Jeff Brown | 0ff435a | 2011-04-05 16:11:53 -0700 | [diff] [blame] | 35 | # FIXME: Temporarily disabled until we get libiconv.a in the prebuilts. |
| 36 | #ifeq ($(strip $(TARGET_ARCH)),arm) |
| 37 | #toolchain := prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x |
| 38 | #HAVE_LIBBFD := true |
| 39 | #else |
Jeff Brown | c3efb23 | 2011-03-17 16:08:14 -0700 | [diff] [blame] | 40 | HAVE_LIBBFD := false |
Jeff Brown | 0ff435a | 2011-04-05 16:11:53 -0700 | [diff] [blame] | 41 | #endif |
Jeff Brown | c3efb23 | 2011-03-17 16:08:14 -0700 | [diff] [blame] | 42 | |
| 43 | ifeq ($(HAVE_LIBBFD),true) |
| 44 | common_host_c_includes := $(common_c_includes) $(toolchain)/include |
| 45 | |
| 46 | common_host_cflags = $(common_cflags) -fexceptions -DANDROID_HOST -DHAVE_XCALLOC |
| 47 | ifneq ($(HOST_OS),linux) |
| 48 | common_host_cflags += -DMISSING_MREMAP |
| 49 | endif |
| 50 | |
| 51 | common_host_ldflags := -L$(toolchain)/lib |
| 52 | endif |