Home | History | Annotate | Download | only in winusb
      1 #
      2 #  Copyright (C) 2009 The Android Open Source Project
      3 # 
      4 #  Licensed under the Apache License, Version 2.0 (the "License");
      5 #  you may not use this file except in compliance with the License.
      6 #  You may obtain a copy of the License at
      7 # 
      8 #       http://www.apache.org/licenses/LICENSE-2.0
      9 # 
     10 #  Unless required by applicable law or agreed to in writing, software
     11 #  distributed under the License is distributed on an "AS IS" BASIS,
     12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 #  See the License for the specific language governing permissions and
     14 #  limitations under the License.
     15 #
     16 
     17 TARGETNAME = AdbWinUsbApi
     18 TARGETPATH = obj
     19 TARGETTYPE = DYNLINK
     20 
     21 _NT_TARGET_VERSION = $(_NT_TARGET_VERSION_VISTA)
     22 
     23 UMTYPE = windows
     24 DLLDEF = AdbWinUsbApi.def
     25 # Use the same load address as previous versions just to be conservative. This
     26 # really doesn't matter on newer OSes that use ASLR.
     27 DLLBASE = 0x400000
     28 
     29 # Use statically linked atl libraries:
     30 # - atls.lib for free build
     31 # - atlsd.lib for checked build
     32 USE_STATIC_ATL  = 1
     33 # Use ATL v. 7.1
     34 ATL_VER         = 71
     35 # Use STL v. 6.0
     36 USE_STL         = 1
     37 STL_VER         = 60
     38 # Use multithreaded libraries
     39 USE_LIBCMT      = 1
     40 
     41 !IF !$(FREEBUILD)
     42 # In checked build, ATL headers call APIs that are only in atlsd.lib. To use
     43 # atlsd.lib in checked build, set DEBUG_CRTS.
     44 DEBUG_CRTS=1
     45 !ENDIF
     46 
     47 # Include directories
     48 INCLUDES = $(DDK_INC_PATH);           \
     49            $(SDK_INC_PATH);           \
     50            $(CRT_INC_PATH);           \
     51            $(SDK_INC_PATH)\crt;       \
     52            $(CRT_INC_PATH)\atl71;     \
     53            $(SDK_INC_PATH)\crt\stl60
     54 
     55 # Common target libraries
     56 TARGETLIBS = $(SDK_LIB_PATH)\ole32.lib    \
     57              $(SDK_LIB_PATH)\Advapi32.lib \
     58              $(SDK_LIB_PATH)\Kernel32.lib \
     59              $(SDK_LIB_PATH)\User32.lib   \
     60              $(SDK_LIB_PATH)\oleaut32.lib \
     61              $(SDK_LIB_PATH)\wbemuuid.lib \
     62              $(SDK_LIB_PATH)\uuid.lib     \
     63              $(SDK_LIB_PATH)\setupapi.lib \
     64              $(SDK_LIB_PATH)\usbd.lib     \
     65              $(SDK_LIB_PATH)\winusb.lib   \
     66              ..\api\obj$(BUILD_ALT_DIR)\i386\AdbWinApi.lib
     67 
     68 # Common C defines
     69 C_DEFINES= $(C_DEFINES) -DADBWINUSB_EXPORTS -D_UNICODE \
     70            -DUNICODE -DWIN32 -D_WINDOWS -D_USRDLL -D_WINDLL
     71 
     72 !IF "$(DDKBUILDENV)" == "fre"
     73 # C defines for release (free) builds
     74 C_DEFINES = $(C_DEFINES) -DNDEBUG
     75 !ELSE
     76 # C defines for debug (checked) builds
     77 C_DEFINES = $(C_DEFINES) -D_DEBUG
     78 !ENDIF
     79 
     80 # Turn on all warnings, and treat warnings as errors
     81 MSC_WARNING_LEVEL = /W4 /WX
     82 
     83 # operator new throws C++ exceptions
     84 USE_NATIVE_EH=1
     85 
     86 # Common C defines
     87 USER_C_FLAGS = $(USER_C_FLAGS) /FD /wd4100 /wd4200 /wd4702 /nologo
     88 
     89 # Set precompiled header information
     90 PRECOMPILED_CXX = 1
     91 PRECOMPILED_INCLUDE = stdafx.h
     92 PRECOMPILED_SOURCEFILE = stdafx.cpp
     93 
     94 # Define source files for AdbWinUsbApi.dll
     95 SOURCES = adb_winusb_endpoint_object.cpp  \
     96           adb_winusb_interface.cpp        \
     97           adb_winusb_io_completion.cpp    \
     98           AdbWinUsbApi.cpp                \
     99 		      AdbWinUsbApi.rc
    100