Home | History | Annotate | Download | only in pp
      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 LOCAL_PATH:= $(call my-dir)
     16 
     17 include $(LOCAL_PATH)/../common.mk
     18 
     19 common_src := common_option.cpp
     20 
     21 common_libs := \
     22 	liboprofile_pp \
     23 	liboprofile_db \
     24 	liboprofile_op_regex \
     25 	liboprofile_opt++ \
     26 	liboprofile_util++ \
     27 	liboprofile_popt \
     28 	liboprofile_op \
     29 	liboprofile_util \
     30 	libbfd \
     31 	libiberty \
     32 	libintl
     33 
     34 common_ldlibs := -lz $(common_host_ldlibs_libiconv)
     35 
     36 ifeq ($(HAVE_LIBBFD),true)
     37 
     38 # Build opreport on host
     39 include $(CLEAR_VARS)
     40 
     41 LOCAL_SRC_FILES:= \
     42 	$(common_src) \
     43 	opreport.cpp \
     44 	opreport_options.cpp
     45 
     46 LOCAL_STATIC_LIBRARIES := $(common_libs)
     47 LOCAL_C_INCLUDES := $(common_host_c_includes)
     48 LOCAL_CFLAGS := $(common_host_cflags)
     49 LOCAL_LDLIBS := $(common_ldlibs)
     50 LOCAL_MODULE_TAGS := optional
     51 LOCAL_MODULE:= opreport
     52 
     53 include $(BUILD_HOST_EXECUTABLE)
     54 
     55 # Build opannotate on host
     56 include $(CLEAR_VARS)
     57 
     58 LOCAL_SRC_FILES:= \
     59 	$(common_src) \
     60 	opannotate.cpp \
     61 	opannotate_options.cpp
     62 
     63 LOCAL_STATIC_LIBRARIES := $(common_libs)
     64 LOCAL_C_INCLUDES := $(common_host_c_includes)
     65 LOCAL_CFLAGS := $(common_host_cflags)
     66 LOCAL_LDLIBS := $(common_ldlibs)
     67 LOCAL_MODULE_TAGS := optional
     68 LOCAL_MODULE:= opannotate
     69 
     70 include $(BUILD_HOST_EXECUTABLE)
     71 
     72 # Build opgprof
     73 include $(CLEAR_VARS)
     74 
     75 LOCAL_SRC_FILES:= \
     76 	$(common_src) \
     77 	opgprof.cpp \
     78 	opgprof_options.cpp
     79 
     80 LOCAL_STATIC_LIBRARIES := $(common_libs)
     81 LOCAL_C_INCLUDES := $(common_host_c_includes)
     82 LOCAL_CFLAGS := $(common_host_cflags)
     83 LOCAL_LDLIBS := $(common_ldlibs)
     84 LOCAL_MODULE_TAGS := optional
     85 LOCAL_MODULE:= opgprof
     86 
     87 include $(BUILD_HOST_EXECUTABLE)
     88 
     89 # Build oparchive
     90 include $(CLEAR_VARS)
     91 
     92 LOCAL_SRC_FILES:= \
     93 	$(common_src) \
     94 	oparchive.cpp \
     95 	oparchive_options.cpp
     96 
     97 LOCAL_STATIC_LIBRARIES := $(common_libs)
     98 LOCAL_C_INCLUDES := $(common_host_c_includes)
     99 LOCAL_CFLAGS := $(common_host_cflags)
    100 LOCAL_LDLIBS := $(common_ldlibs)
    101 LOCAL_MODULE_TAGS := optional
    102 LOCAL_MODULE:= oparchive
    103 
    104 include $(BUILD_HOST_EXECUTABLE)
    105 
    106 endif
    107