# sources file for use with DDK BUILD utility
#
# File created on 8/12/2008
#
TARGETNAME = TVTuner
TARGETPATH = $(SOLUTION_PATH)Bin\$(CONFIG_NAME)\UsbDriver\Sys
TARGETTYPE = DRIVER
DRIVERTYPE = WDM

#uncomment the following line to build with C++ compiler
#USECXX_FLAG=/Tp

!IF ("$(DDKBUILDENV)"=="chk") || ("$(DDKBUILDENV)"=="checked")
BUILDTYPE = CHECKED
!ELSE
BUILDTYPE = FREE
NTDEBUG=
!ENDIF


# Singly linked lists have been optimized in a non-back
# compatible way for XP and later platforms.  As such,
# any binary built with the XP or later DDK and using
# singly linked lists will not load on 2000 and earlier
# platforms without the use of the following define in
# the build.  This define turns off the new optimizations,
# and thus it should only be used for cross-platform
# binaries.
#C_DEFINES =$(C_DEFINES) -D_WIN2K_COMPAT_SLIST_USAGE


!if !defined(DDK_TARGET_OS) || "$(DDK_TARGET_OS)"=="Win2K"
C_DEFINES =$(C_DEFINES) -DWIN2K
!endif


TARGETLIBS=$(DDK_LIB_PATH)\ntstrsafe.lib $(DDK_LIB_PATH)\csq.lib
TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\usbd.lib

# ntstrsafe.h is in DDK_INC_PATH even for WDM driver
INCLUDES=$(INCLUDE);$(DDK_INC_PATH)
TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\ntoskrnl.lib

SOURCES=TVTuner.rc \
        usb.c \
        registry.c \
        debug.c \
        TVTuner.c \
        wmi.c \
        iorw.c \
        queue.c \
        pnp.c \
        power.c

PRECOMPILED_INCLUDE=pch.h
PRECOMPILED_PCH=pch.pch
PRECOMPILED_OBJ=pch.obj


#TVTUNER_WMI_TRACE=1

!ifdef TVTUNER_WMI_TRACE

C_DEFINES =$(C_DEFINES) -DTVTUNER_WMI_TRACE

!if ("$(PRECOMPILED_CXX)" == "") && ("$(USECXX_FLAG)" == "")
RUN_WPP=$(SOURCES)\
        -km \
        -func:TVTunerDebugPrint(AREA,LEVEL,MSG,...)
!else
RUN_WPP=$(SOURCES)\
        -km -dll\
        -func:TVTunerDebugPrint(AREA,LEVEL,MSG,...)
!endif

!endif

