| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 1 | # Copyright (C) 2007 Google Inc. | 
 | 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 | LOCAL_PATH:= $(call my-dir) | 
 | 16 |  | 
 | 17 | include $(CLEAR_VARS) | 
 | 18 |  | 
 | 19 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/../mkbootimg | 
 | 20 | LOCAL_SRC_FILES := protocol.c engine.c bootimg.c fastboot.c  | 
 | 21 | LOCAL_MODULE := fastboot | 
 | 22 |  | 
 | 23 | ifeq ($(HOST_OS),linux) | 
 | 24 |   LOCAL_SRC_FILES += usb_linux.c util_linux.c | 
 | 25 | endif | 
 | 26 |  | 
 | 27 | ifeq ($(HOST_OS),darwin) | 
 | 28 |   LOCAL_SRC_FILES += usb_osx.c util_osx.c | 
 | 29 |   LOCAL_LDLIBS += -lpthread -framework CoreFoundation -framework IOKit \ | 
 | 30 | 	-framework Carbon | 
 | 31 | endif | 
 | 32 |  | 
 | 33 | ifeq ($(HOST_OS),windows) | 
 | 34 |   LOCAL_SRC_FILES += usb_windows.c util_windows.c | 
 | 35 |   EXTRA_STATIC_LIBS := AdbWinApi | 
| Raphael | b419c35 | 2010-04-13 15:25:50 -0700 | [diff] [blame] | 36 |   ifneq ($(strip $(USE_CYGWIN)),) | 
 | 37 |     # Pure cygwin case | 
 | 38 |     LOCAL_LDLIBS += -lpthread | 
 | 39 |     LOCAL_C_INCLUDES += /usr/include/w32api/ddk | 
 | 40 |   endif | 
 | 41 |   ifneq ($(strip $(USE_MINGW)),) | 
 | 42 |     # MinGW under Linux case | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 43 |     LOCAL_LDLIBS += -lws2_32 | 
 | 44 |     USE_SYSDEPS_WIN32 := 1 | 
| Raphael | b419c35 | 2010-04-13 15:25:50 -0700 | [diff] [blame] | 45 |     LOCAL_C_INCLUDES += /usr/i586-mingw32msvc/include/ddk | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 46 |   endif | 
| Raphael | b419c35 | 2010-04-13 15:25:50 -0700 | [diff] [blame] | 47 |   LOCAL_C_INCLUDES += development/host/windows/usb/api | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 48 | endif | 
 | 49 |  | 
 | 50 | LOCAL_STATIC_LIBRARIES := $(EXTRA_STATIC_LIBS) libzipfile libunz | 
 | 51 |  | 
 | 52 | include $(BUILD_HOST_EXECUTABLE) | 
 | 53 | $(call dist-for-goals,droid,$(LOCAL_BUILT_MODULE)) | 
 | 54 |  | 
 | 55 | ifeq ($(HOST_OS),linux) | 
 | 56 | include $(CLEAR_VARS) | 
 | 57 | LOCAL_SRC_FILES := usbtest.c usb_linux.c | 
 | 58 | LOCAL_MODULE := usbtest | 
 | 59 | include $(BUILD_HOST_EXECUTABLE) | 
 | 60 | endif | 
 | 61 |  | 
 | 62 | ifeq ($(HOST_OS),windows) | 
 | 63 | $(LOCAL_INSTALLED_MODULE): $(HOST_OUT_EXECUTABLES)/AdbWinApi.dll | 
 | 64 | endif |