summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2010-04-19 11:56:33 +0100
committerPete Batard <pbatard@gmail.com>2010-04-19 11:56:33 +0100
commit63edc0276d5f3fb2975954c33f14d2b995257b0e (patch)
treed062c93c3ec628ce861253aa0a9c6db6fba0f71a
parent7e0a17af9df644b2d30576b58b97e8782a40386a (diff)
downloadlibusb-63edc0276d5f3fb2975954c33f14d2b995257b0e.tar.gz
restore builds of DLLs from the DDKr264
-rw-r--r--ddk_build.cmd10
-rw-r--r--libusb/os/libusb_sources6
2 files changed, 12 insertions, 4 deletions
diff --git a/ddk_build.cmd b/ddk_build.cmd
index 4ce38bd..23f2711 100644
--- a/ddk_build.cmd
+++ b/ddk_build.cmd
@@ -8,9 +8,17 @@ set version=1.0
cd libusb\os
rem DLL or static lib selection (must use concatenation)
+if Test%1==TestDLL goto libusb_dll
+:libusb_static
set TARGET=LIBRARY
-if Test%1==TestDLL set TARGET=DYNLINK
+set LIBDEF=
+goto libusb_common
+:libusb_dll
+set TARGET=DYNLINK
+set LIBDEF=/DLIBUSB_DLL_BUILD
+:libusb_common
echo TARGETTYPE=%TARGET% > target
+echo LIBUSB_DEFINES=%LIBDEF% >> target
copy target+libusb_sources sources >NUL 2>&1
del target
@echo on
diff --git a/libusb/os/libusb_sources b/libusb/os/libusb_sources
index a660084..ab1a2a1 100644
--- a/libusb/os/libusb_sources
+++ b/libusb/os/libusb_sources
@@ -1,5 +1,7 @@
#TARGETTYPE is not defined, to allow selection between static lib or DLL with ddk_build
TARGETNAME=libusb-1.0
+#Must be set, else DLL build will look for libusb-1.0.def
+DLLDEF=
!IFNDEF MSC_WARNING_LEVEL
MSC_WARNING_LEVEL=/W3
@@ -8,8 +10,7 @@ MSC_WARNING_LEVEL=/W3
USE_MSVCRT=1
INCLUDES=..;..\..;..\..\msvc;$(DDK_INC_PATH)
-C_DEFINES = $(C_DEFINES) /DDDKBUILD
-#### NEED to conditionally (on DLL vs static) #define /DLIBUSB_DLL_BUILD
+C_DEFINES = $(C_DEFINES) $(LIBUSB_DEFINES) /DDDKBUILD
TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \
$(SDK_LIB_PATH)\advapi32.lib \
@@ -24,4 +25,3 @@ SOURCES=..\core.c \
poll_windows.c \
windows_usb.c \
libusb-1.0.rc
-