1LOCAL_PATH := $(call my-dir) 2include $(CLEAR_VARS) 3 4commonSources := \ 5 diskconfig.c \ 6 diskutils.c \ 7 write_lst.c \ 8 config_mbr.c 9 10ifneq ($(TARGET_SIMULATOR),true) 11ifeq ($(TARGET_ARCH),x86) 12 13########################### 14# static library for host 15LOCAL_SRC_FILES := $(commonSources) 16 17LOCAL_CFLAGS := -O2 -g -W -Wall -Werror -D_LARGEFILE64_SOURCE 18 19LOCAL_MODULE := libdiskconfig_host 20LOCAL_STATIC_LIBRARIES := libcutils 21include $(BUILD_HOST_STATIC_LIBRARY) 22 23## Build a test executable for host (to dump configuration files). 24include $(CLEAR_VARS) 25LOCAL_SRC_FILES := $(commonSources) 26LOCAL_SRC_FILES += dump_diskconfig.c 27LOCAL_MODULE := dump_diskconfig 28LOCAL_STATIC_LIBRARIES := libdiskconfig_host libcutils 29include $(BUILD_HOST_EXECUTABLE) 30 31########################### 32# shared library for target 33include $(CLEAR_VARS) 34 35LOCAL_SRC_FILES := $(commonSources) 36 37LOCAL_CFLAGS := -O2 -g -W -Wall -Werror 38 39LOCAL_MODULE := libdiskconfig 40LOCAL_MODULE_TAGS := system_builder 41LOCAL_SYSTEM_SHARED_LIBRARIES := libcutils liblog libc 42 43include $(BUILD_SHARED_LIBRARY) 44 45endif # ! TARGET_SIMULATOR 46endif # TARGET_ARCH == x86 47