1#TARGETTYPE is not defined, to allow selection between static lib or DLL with ddk_build 2TARGETNAME=libusb-1.0 3DLLDEF=..\libusb-1.0.def 4 5!IFNDEF MSC_WARNING_LEVEL 6MSC_WARNING_LEVEL=/W3 7!ENDIF 8 9!IFDEF STATIC_LIBC 10USE_LIBCMT=1 11!ELSE 12USE_MSVCRT=1 13!ENDIF 14 15!IFDEF WITH_USBDK 16BACKEND_DEFINES="/DUSE_USBDK" 17!ENDIF 18 19INCLUDES=..;..\..\msvc;$(DDK_INC_PATH) 20C_DEFINES= $(C_DEFINES) $(LIBUSB_DEFINES) $(BACKEND_DEFINES) /DDDKBUILD 21 22# http://jpassing.com/2009/10/21/ltcg-issues-with-the-win7amd64-environment-of-wdk-7600/ 23# prevents the following error when using the 64 bit static lib with Visual Studio 2010: 24# "fatal error C1001: An internal error has occurred in the compiler. 25# (compiler file 'f:\dd\vctools\compiler\utc\src\p2\p2symtab.c', line 1823)" 26# and the following with Visual Studio 2010: 27# "fatal error C1047: The object or library file 'libusb-1.0.lib' was created with 28# an older compiler than other objects; rebuild old objects and libraries" 29USER_C_FLAGS=/GL- 30 31TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib 32 33SOURCES=..\core.c \ 34 ..\descriptor.c \ 35 ..\io.c \ 36 ..\strerror.c \ 37 ..\sync.c \ 38 ..\hotplug.c \ 39 threads_windows.c \ 40 poll_windows.c \ 41 windows_winusb.c \ 42 windows_usbdk.c \ 43 windows_nt_common.c \ 44 ..\libusb-1.0.rc 45