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 # first, call a library containing all object files 17 LOCAL_BUILT_MODULE := $(call local-shared-library-path,$(LOCAL_MODULE)) 18 include $(BUILD_SYSTEM)/binary.make 19 20 LOCAL_LIBRARIES := $(foreach lib,$(LOCAL_STATIC_LIBRARIES),$(call local-library-path,$(lib))) 21 22 LOCAL_LDLIBS := $(foreach lib,$(LOCAL_STATIC_LIBRARIES),$(call local-library-path,$(lib))) $(LOCAL_LDLIBS) 23 24 $(LOCAL_BUILT_MODULE): PRIVATE_LDFLAGS := $(LDFLAGS) $(LOCAL_LDFLAGS) 25 $(LOCAL_BUILT_MODULE): PRIVATE_LDLIBS := $(LOCAL_LDLIBS) 26 $(LOCAL_BUILT_MODULE): PRIVATE_OBJS := $(LOCAL_OBJECTS) 27 28 $(LOCAL_BUILT_MODULE): $(LOCAL_OBJECTS) $(LOCAL_LIBRARIES) 29 @ mkdir -p $(dir $@) 30 @ echo "SharedLibrary: $@" 31 $(hide) $(LD) $(PRIVATE_LDFLAGS) -shared -o $@ $(PRIVATE_LIBRARY) $(PRIVATE_OBJS) $(PRIVATE_LDLIBS) 32 33 EXECUTABLES += $(LOCAL_BUILT_MODULE) 34 $(LOCAL_BUILT_MODULE): $(foreach lib,$(LOCAL_STATIC_LIBRARIES),$(call local-library-path,$(lib))) 35 $(LOCAL_BUILT_MODULE): $(foreach lib,$(LOCAL_SHARED_LIBRARIES),$(call local-shared-library-path,$(lib))) 36 37