diff options
Diffstat (limited to 'pthreads/Makefile')
-rw-r--r-- | pthreads/Makefile | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/pthreads/Makefile b/pthreads/Makefile index f1789976f..ce762315b 100644 --- a/pthreads/Makefile +++ b/pthreads/Makefile @@ -26,9 +26,10 @@ STATIC_STAMPS = pthreadVCE$(DLL_VER).static pthreadVSE$(DLL_VER).static pthreadV CC = cl CPPFLAGS = /I. /DHAVE_PTW32_CONFIG_H -XCFLAGS = /W3 /MD /nologo -CFLAGS = /O2 /Ob2 $(XCFLAGS) -CFLAGSD = /Z7 $(XCFLAGS) +XCFLAGS = /W3 /Zi /Gy /GF /nologo +CFLAGS = /O2 /Ob2 /Oi /Ox /Oy /Ot /MD /GL $(XCFLAGS) +CFLAGSD = /Z7 /MDd $(XCFLAGS) + # Uncomment this if config.h defines RETAIN_WSALASTERROR #XLIBS = wsock32.lib @@ -46,8 +47,14 @@ VSEFLAGSD = $(CPPFLAGS) $(CFLAGSD) VCFLAGS = $(CPPFLAGS) $(CFLAGS) VCFLAGSD = $(CPPFLAGS) $(CFLAGSD) +!ifdef DEBUG +OUTDIR=obj_d +!else +OUTDIR=obj +!endif + DLL_INLINED_OBJS = \ - pthread.obj \ + $(OUTDIR)\pthread.obj \ version.res # Aggregate modules for inlinability @@ -448,7 +455,7 @@ VC-static: @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).static VC-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).static + @ $(MAKE) /E /nologo DEBUG=1 EHFLAGS="$(VCFLAGSD) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).static realclean: clean if exist pthread*.dll del pthread*.dll @@ -478,16 +485,22 @@ install: $(DLLS): $(DLL_OBJS) $(CC) /LDd /Zi /nologo $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@ -$(INLINED_STAMPS): $(DLL_INLINED_OBJS) +$(INLINED_STAMPS): $(OUTDIR) $(DLL_INLINED_OBJS) $(CC) /LDd /Zi /nologo $(DLL_INLINED_OBJS) /link /implib:$*.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: $(CC) $(EHFLAGS) /D$(CLEANUP) -c $< +.c{$(OUTDIR)}.obj: + $(CC) $(EHFLAGS) /D$(CLEANUP) -Fo"$@" -c $< + .rc.res: rc /dPTW32_RC_MSC /d$(CLEANUP) $< |