aboutsummaryrefslogtreecommitdiff
path: root/pthreads
diff options
context:
space:
mode:
Diffstat (limited to 'pthreads')
-rw-r--r--pthreads/Makefile29
1 files changed, 21 insertions, 8 deletions
diff --git a/pthreads/Makefile b/pthreads/Makefile
index 162a08e25..1faac14e3 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 /MD /nologo /Yd /I. /D_WIN32_WINNT=0x400 /DHAVE_CONFIG_H
+CFLAGS = /W3 /nologo /Yd /I. /D_WIN32_WINNT=0x400 /DHAVE_CONFIG_H
+#CFLAGS = /W3 /nologo /Yd /I. /D_WIN32_WINNT=0x400 /DHAVE_CONFIG_H
CFLAGSD = /Zi $(CFLAGS)
@@ -44,8 +45,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
@@ -438,7 +445,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
@@ -468,18 +475,24 @@ $(DLLS): $(DLL_OBJS)
/link /nodefaultlib:libcmt /implib:$*.lib \
msvcrt.lib wsock32.lib /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 wsock32.lib /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) $<