common.mk revision c3efb236108cf27a97d4cf7f05ee4a9a02f8e5fa
1c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# Copyright (C) 2011 The Android Open Source Project 2c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# 3c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# Licensed under the Apache License, Version 2.0 (the "License"); 4c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# you may not use this file except in compliance with the License. 5c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# You may obtain a copy of the License at 6c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# 7c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# http://www.apache.org/licenses/LICENSE-2.0 8c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# 9c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# Unless required by applicable law or agreed to in writing, software 10c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# distributed under the License is distributed on an "AS IS" BASIS, 11c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# See the License for the specific language governing permissions and 13c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# limitations under the License. 14c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown 15c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# Common flags 16c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Browncommon_c_includes := \ 17c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown external/oprofile \ 18c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown external/oprofile/libabi \ 19c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown external/oprofile/libdb \ 20c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown external/oprofile/libop \ 21c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown external/oprofile/libop++ \ 22c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown external/oprofile/libopt++ \ 23c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown external/oprofile/libpp \ 24c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown external/oprofile/libregex \ 25c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown external/oprofile/libutil \ 26c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown external/oprofile/libutil++ 27c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown 28c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Browncommon_cflags := -DHAVE_CONFIG_H 29c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown 30c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# Common target flags 31c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Browncommon_target_c_includes := $(common_c_includes) 32c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Browncommon_target_cflags := $(common_cflags) 33c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown 34c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown# Common host flags 35c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brownifeq ($(strip $(TARGET_ARCH)),arm) 36c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Browntoolchain := prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x 37c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff BrownHAVE_LIBBFD := true 38c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brownelse 39c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff BrownHAVE_LIBBFD := false 40c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brownendif 41c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown 42c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brownifeq ($(HAVE_LIBBFD),true) 43c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Browncommon_host_c_includes := $(common_c_includes) $(toolchain)/include 44c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown 45c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Browncommon_host_cflags = $(common_cflags) -fexceptions -DANDROID_HOST -DHAVE_XCALLOC 46c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brownifneq ($(HOST_OS),linux) 47c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Browncommon_host_cflags += -DMISSING_MREMAP 48c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brownendif 49c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brown 50c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Browncommon_host_ldflags := -L$(toolchain)/lib 51c3efb236108cf27a97d4cf7f05ee4a9a02f8e5faJeff Brownendif 52