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 UMTYPE = windows
     22 DLLDEF = AdbWinUsbApi.def
     23 
     24 # Use statically linked atl libraries:
     25 # - atls.lib for free build
     26 # - atlsd.lib for checked build
     27 USE_STATIC_ATL  = 1
     28 # Use ATL v. 7.1
     29 ATL_VER         = 71
     30 # Use STL v. 6.0
     31 USE_STL         = 1
     32 STL_VER         = 60
     33 # Use multithreaded libraries
     34 USE_LIBCMT      = 1
     35 
     36 # Include directories
     37 INCLUDES = $(DDK_INC_PATH);           \
     38            $(SDK_INC_PATH);           \
     39            $(CRT_INC_PATH);           \
     40            $(SDK_INC_PATH)\crt;       \
     41            $(CRT_INC_PATH)\atl71;     \
     42            $(SDK_INC_PATH)\crt\stl60
     43 
     44 # Common target libraries
     45 TARGETLIBS = $(SDK_LIB_PATH)\ole32.lib    \
     46              $(SDK_LIB_PATH)\Advapi32.lib \
     47              $(SDK_LIB_PATH)\Kernel32.lib \
     48              $(SDK_LIB_PATH)\User32.lib   \
     49              $(SDK_LIB_PATH)\oleaut32.lib \
     50              $(SDK_LIB_PATH)\wbemuuid.lib \
     51              $(SDK_LIB_PATH)\uuid.lib     \
     52              $(SDK_LIB_PATH)\setupapi.lib \
     53              $(SDK_LIB_PATH)\usbd.lib     \
     54              $(SDK_LIB_PATH)\winusb.lib   \
     55              ..\api\obj$(BUILD_ALT_DIR)\i386\AdbWinApi.lib
     56 
     57 !IF "$(DDKBUILDENV)" == "fre"
     58 # Libraries for release (free) builds
     59 TARGETLIBS = $(TARGETLIBS) $(ATL_LIB_PATH)\atls.lib
     60 !ELSE
     61 # Libraries for debug (checked) builds
     62 TARGETLIBS = $(TARGETLIBS) $(ATL_LIB_PATH)\atlsd.lib
     63 !ENDIF
     64 
     65 # Common C defines
     66 C_DEFINES= $(C_DEFINES) -DADBWINUSB_EXPORTS -D_UNICODE \
     67            -DUNICODE -DWIN32 -D_WINDOWS -D_USRDLL -D_WINDLL
     68 
     69 !IF "$(DDKBUILDENV)" == "fre"
     70 # C defines for release (free) builds
     71 C_DEFINES = $(C_DEFINES) -DNDEBUG
     72 !ELSE
     73 # C defines for debug (checked) builds
     74 C_DEFINES = $(C_DEFINES) -D_DEBUG
     75 !ENDIF
     76 
     77 # Turn on all warnings, and treat warnings as errors
     78 MSC_WARNING_LEVEL = /W4 /Wp64 /WX
     79 
     80 # Common C defines
     81 USER_C_FLAGS = $(USER_C_FLAGS) /FD /EHsc /wd4100 /wd4200 /wd4702 /nologo
     82 
     83 # Set precompiled header information
     84 PRECOMPILED_CXX = 1
     85 PRECOMPILED_INCLUDE = stdafx.h
     86 PRECOMPILED_SOURCEFILE = stdafx.cpp
     87 
     88 # Define source files for AdbWinUsbApi.dll
     89 SOURCES = adb_winusb_endpoint_object.cpp  \
     90           adb_winusb_interface.cpp        \
     91           adb_winusb_io_completion.cpp    \
     92           AdbWinUsbApi.cpp                \
     93 		      AdbWinUsbApi.rc
     94