2009-03-04 11:32:55 +08:00
|
|
|
# Copyright (C) 2007 Google Inc.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
LOCAL_PATH:= $(call my-dir)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2011-12-16 09:50:18 +08:00
|
|
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../mkbootimg \
|
|
|
|
$(LOCAL_PATH)/../../extras/ext4_utils
|
|
|
|
LOCAL_SRC_FILES := protocol.c engine.c bootimg.c fastboot.c
|
2009-03-04 11:32:55 +08:00
|
|
|
LOCAL_MODULE := fastboot
|
2012-09-27 00:58:07 +08:00
|
|
|
LOCAL_MODULE_TAGS := debug
|
2009-03-04 11:32:55 +08:00
|
|
|
|
|
|
|
ifeq ($(HOST_OS),linux)
|
|
|
|
LOCAL_SRC_FILES += usb_linux.c util_linux.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HOST_OS),darwin)
|
|
|
|
LOCAL_SRC_FILES += usb_osx.c util_osx.c
|
|
|
|
LOCAL_LDLIBS += -lpthread -framework CoreFoundation -framework IOKit \
|
|
|
|
-framework Carbon
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HOST_OS),windows)
|
|
|
|
LOCAL_SRC_FILES += usb_windows.c util_windows.c
|
|
|
|
EXTRA_STATIC_LIBS := AdbWinApi
|
2010-04-14 06:25:50 +08:00
|
|
|
ifneq ($(strip $(USE_CYGWIN)),)
|
|
|
|
# Pure cygwin case
|
|
|
|
LOCAL_LDLIBS += -lpthread
|
|
|
|
LOCAL_C_INCLUDES += /usr/include/w32api/ddk
|
|
|
|
endif
|
|
|
|
ifneq ($(strip $(USE_MINGW)),)
|
|
|
|
# MinGW under Linux case
|
2009-03-04 11:32:55 +08:00
|
|
|
LOCAL_LDLIBS += -lws2_32
|
|
|
|
USE_SYSDEPS_WIN32 := 1
|
2010-04-14 06:25:50 +08:00
|
|
|
LOCAL_C_INCLUDES += /usr/i586-mingw32msvc/include/ddk
|
2009-03-04 11:32:55 +08:00
|
|
|
endif
|
2010-04-14 06:25:50 +08:00
|
|
|
LOCAL_C_INCLUDES += development/host/windows/usb/api
|
2009-03-04 11:32:55 +08:00
|
|
|
endif
|
|
|
|
|
2012-07-19 03:03:33 +08:00
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
|
|
$(EXTRA_STATIC_LIBS) \
|
|
|
|
libzipfile \
|
|
|
|
libunz \
|
|
|
|
libext4_utils_host \
|
2012-07-24 10:15:14 +08:00
|
|
|
libsparse_host \
|
2012-07-19 03:03:33 +08:00
|
|
|
libz
|
2009-03-04 11:32:55 +08:00
|
|
|
|
2012-04-09 02:25:04 +08:00
|
|
|
ifneq ($(HOST_OS),windows)
|
|
|
|
LOCAL_STATIC_LIBRARIES += libselinux
|
|
|
|
endif # HOST_OS != windows
|
|
|
|
|
2009-03-04 11:32:55 +08:00
|
|
|
include $(BUILD_HOST_EXECUTABLE)
|
2012-07-24 10:15:14 +08:00
|
|
|
|
|
|
|
|
2012-09-06 01:26:43 +08:00
|
|
|
$(call dist-for-goals,dist_files sdk,$(LOCAL_BUILT_MODULE))
|
2009-03-04 11:32:55 +08:00
|
|
|
|
2012-07-24 10:15:14 +08:00
|
|
|
|
2009-03-04 11:32:55 +08:00
|
|
|
ifeq ($(HOST_OS),linux)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_SRC_FILES := usbtest.c usb_linux.c
|
|
|
|
LOCAL_MODULE := usbtest
|
|
|
|
include $(BUILD_HOST_EXECUTABLE)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HOST_OS),windows)
|
|
|
|
$(LOCAL_INSTALLED_MODULE): $(HOST_OUT_EXECUTABLES)/AdbWinApi.dll
|
|
|
|
endif
|