diff options
Diffstat (limited to 'pthreads')
-rw-r--r-- | pthreads/Makefile | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/pthreads/Makefile b/pthreads/Makefile index 2dc9d8d40..eca5a6d00 100644 --- a/pthreads/Makefile +++ b/pthreads/Makefile @@ -24,10 +24,11 @@ INLINED_STAMPS = pthreadVCE$(DLL_VER).stamp pthreadVSE$(DLL_VER).stamp pthreadVC STATIC_STAMPS = pthreadVCE$(DLL_VER).static pthreadVSE$(DLL_VER).static pthreadVC$(DLL_VER).static \
pthreadVCE$(DLL_VERD).static pthreadVSE$(DLL_VERD).static pthreadVC$(DLL_VERD).static
-OPTIM = /O2 /Ob2
-OPTIMD =
+OPTIM = /O2 /Ob2 /MD
+OPTIMD = /MDd
+
+CFLAGS = /W3 /nologo /I. /D_WIN32_WINNT=0x400 /DHAVE_CONFIG_H
-CFLAGS = /W3 /MD /nologo /I. /D_WIN32_WINNT=0x400 /DHAVE_CONFIG_H
CFLAGSD = /Zi $(CFLAGS)
# Uncomment this if config.h defines RETAIN_WSALASTERROR
@@ -46,8 +47,14 @@ VSEFLAGSD = $(CFLAGSD) VCFLAGS = $(CFLAGS)
VCFLAGSD= $(CFLAGSD)
+!ifdef DEBUG
+OUTDIR=obj_d
+!else
+OUTDIR=obj
+!endif
+
DLL_INLINED_OBJS = \
- pthread.obj \
+ $(OUTDIR)\pthread.obj \
version.res
# Aggregate modules for inlinability
@@ -442,7 +449,7 @@ VC-static: @ nmake /nologo EHFLAGS="$(OPTIM) $(VCFLAGS) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).static
VC-static-debug:
- @ nmake /nologo EHFLAGS="$(OPTIMD) $(VCFLAGSD) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).static
+ @ nmake /nologo DEBUG=1 EHFLAGS="$(OPTIMD) $(VCFLAGSD) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).static
realclean: clean
if exist pthread*.dll del pthread*.dll
@@ -472,18 +479,24 @@ $(DLLS): $(DLL_OBJS) /link /nodefaultlib:libcmt /implib:$*.lib \
msvcrt.lib $(XLIBS) /out:$@
-$(INLINED_STAMPS): $(DLL_INLINED_OBJS)
+$(INLINED_STAMPS): $(OUTDIR) $(DLL_INLINED_OBJS)
cl /LDd /Zi /nologo $(DLL_INLINED_OBJS) \
/link /nodefaultlib:libcmt /implib:$*.lib \
msvcrt.lib $(XLIBS) /out:$*.dll
-$(STATIC_STAMPS): $(DLL_INLINED_OBJS)
+$(STATIC_STAMPS): $(OUTDIR) $(DLL_INLINED_OBJS)
if exist $*.lib del $*.lib
lib $(DLL_INLINED_OBJS) /out:$*.lib
-
+
+$(OUTDIR):
+ mkdir $(OUTDIR)
+
.c.obj:
cl $(EHFLAGS) /D$(CLEANUP) -c $<
+.c{$(OUTDIR)}.obj:
+ cl $(EHFLAGS) /D$(CLEANUP) -Fo"$@" -c $<
+
.rc.res:
rc /dPTW32_RC_MSC /d$(CLEANUP) $<
|