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# build a host executable, the name of the final executable should be 17# put in LOCAL_BUILT_MODULE for use by the caller 18# 19 20#$(info STATIC_LIBRARY SRCS=$(LOCAL_SRC_FILES)) 21LOCAL_BUILT_MODULE := $(call library-path,$(LOCAL_MODULE)) 22LOCAL_CC ?= $(CC) 23include $(BUILD_SYSTEM)/binary.make 24 25LOCAL_AR ?= $(AR) 26ARFLAGS := crs 27 28$(LOCAL_BUILT_MODULE): PRIVATE_AR := $(LOCAL_AR) 29$(LOCAL_BUILT_MODULE): PRIVATE_OBJECTS := $(LOCAL_OBJECTS) 30$(LOCAL_BUILT_MODULE): $(LOCAL_OBJECTS) 31 @mkdir -p $(dir $@) 32 @echo "Library: $@" 33 $(hide) $(PRIVATE_AR) $(ARFLAGS) $@ $(PRIVATE_OBJECTS) 34 35LIBRARIES += $(LOCAL_BUILT_MODULE) 36