Home | History | Annotate | Download | only in api
      1 #
      2 #  Copyright (C) 2006 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 = AdbWinApi
     18 TARGETPATH = obj
     19 TARGETTYPE = DYNLINK
     20 
     21 _NT_TARGET_VERSION = $(_NT_TARGET_VERSION_VISTA)
     22 
     23 UMTYPE = windows
     24 DLLDEF = AdbWinApi.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            
     66 # Common C defines           
     67 C_DEFINES= $(C_DEFINES) -DADBWIN_EXPORTS -D_UNICODE \
     68            -DUNICODE -DWIN32 -D_WINDOWS -D_USRDLL -D_WINDLL
     69 
     70 !IF "$(DDKBUILDENV)" == "fre"
     71 # C defines for release (free) builds
     72 C_DEFINES = $(C_DEFINES) -DNDEBUG
     73 !ELSE
     74 # C defines for debug (checked) builds
     75 C_DEFINES = $(C_DEFINES) -D_DEBUG
     76 !ENDIF
     77 
     78 # Turn on all warnings, and treat warnings as errors
     79 MSC_WARNING_LEVEL = /W4 /WX
     80 
     81 # operator new throws C++ exceptions
     82 USE_NATIVE_EH=1
     83 
     84 # Common C defines           
     85 USER_C_FLAGS = $(USER_C_FLAGS) /FD /wd4100 /wd4200 /wd4702 /nologo
     86 
     87 # Set precompiled header information
     88 PRECOMPILED_CXX = 1
     89 PRECOMPILED_INCLUDE = stdafx.h
     90 PRECOMPILED_SOURCEFILE = stdafx.cpp
     91 
     92 # Define source files for AdbWinApi.dll
     93 SOURCES = adb_api.cpp                     \
     94           adb_endpoint_object.cpp         \
     95           adb_legacy_endpoint_object.cpp  \
     96           adb_helper_routines.cpp         \
     97           adb_interface.cpp               \
     98           adb_legacy_interface.cpp        \
     99           adb_interface_enum.cpp          \
    100           adb_io_completion.cpp           \
    101           adb_legacy_io_completion.cpp    \
    102           adb_object_handle.cpp           \
    103           AdbWinApi.cpp                   \
    104 		      AdbWinApi.rc
    105