1 # Copyright (C) 2008 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 16 # definitions shared by host_executable.make and host_static_library.make 17 # 18 19 # the directory where we're going to place our object files 20 LOCAL_OBJS_DIR := $(call intermediates-dir-for,EXECUTABLES,$(LOCAL_MODULE)) 21 LOCAL_OBJECTS := 22 LOCAL_CC ?= $(CC) 23 LOCAL_C_SOURCES := $(filter %.c,$(LOCAL_SRC_FILES) $(LOCAL_GENERATED_SOURCES)) 24 LOCAL_CXX_SOURCES := $(filter %$(LOCAL_CPP_EXTENSION),$(LOCAL_SRC_FILES) $(LOCAL_GENERATED_SOURCES)) 25 LOCAL_OBJC_SOURCES := $(filter %.m,$(LOCAL_SRC_FILES) $(LOCAL_GENERATED_SOURCES)) 26 27 $(foreach src,$(LOCAL_C_SOURCES), \ 28 $(eval $(call compile-c-source,$(src))) \ 29 ) 30 31 $(foreach src,$(LOCAL_CXX_SOURCES), \ 32 $(eval $(call compile-cxx-source,$(src))) \ 33 ) 34 35 $(foreach src,$(LOCAL_OBJC_SOURCES), \ 36 $(eval $(call compile-objc-source,$(src))) \ 37 ) 38 39 CLEAN_OBJS_DIRS += $(LOCAL_OBJS_DIR) 40