Home | History | Annotate | Download | only in oprofile
      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
     35 HAVE_LIBBFD := false
     36 
     37 ifeq ($(TARGET_ARCH),arm)
     38 toolchain := prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6
     39 common_host_extra_flags := -DANDROID_TARGET_ARM
     40 endif
     41 
     42 ifeq ($(TARGET_ARCH),mips)
     43 toolchain := prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-4.6
     44 common_host_extra_flags := -DANDROID_TARGET_MIPS
     45 endif
     46 
     47 ifneq ($(filter arm mips,$(TARGET_ARCH)),)
     48 common_host_c_includes := $(common_c_includes) $(toolchain)/include
     49 common_host_cflags := $(common_cflags) -fexceptions -DANDROID_HOST -DHAVE_XCALLOC
     50 common_host_ldlibs_libiconv :=
     51 
     52 ifeq ($(HOST_OS)-$(HOST_ARCH),darwin-x86)
     53 HAVE_LIBBFD := true
     54 common_host_cflags += -DMISSING_MREMAP
     55 common_host_ldlibs_libiconv := -liconv
     56 else
     57 ifeq ($(HOST_OS)-$(HOST_ARCH),linux-x86)
     58 HAVE_LIBBFD := true
     59 endif
     60 endif
     61 
     62 endif
     63