Skip to content

Commit

Permalink
minor build fixes & restore injection of vc_crt_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Feb 4, 2016
1 parent b95880f commit 8d939a7
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 34 deletions.
6 changes: 6 additions & 0 deletions plugins/arclite/arclite.vcxproj
Expand Up @@ -18,6 +18,12 @@
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140</PlatformToolset>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="archive.cpp" />
<ClCompile Include="attr.cpp" />
Expand Down
6 changes: 5 additions & 1 deletion plugins/arclite/example/makefile_vc
Expand Up @@ -10,6 +10,10 @@ LINKFLAGS = -nologo -incremental:no -map -manifest:no -dynamicbase -nxcompat -la
RCFLAGS = -nologo
ASFLAGS = -nologo -c

!if $(VC) >= 14
FIXCRT_CPPFLAGS = /Zc:threadSafeInit-
!endif

!if "$(BUILD_PLATFORM)" == "AMD64"
BITS = 64
RCFLAGS = $(RCFLAGS) -Dx64
Expand Down Expand Up @@ -64,7 +68,7 @@ $(OUTDIR)\vc_crt_fix.obj: ..\..\common\vc_crt_fix.asm
$(AS) $(ASFLAGS) ..\..\common\vc_crt_fix.asm

$(OUTDIR)\vc_crt_fix_impl.obj: ..\..\common\vc_crt_fix_impl.cpp
$(CPP) $(CPPFLAGS) -Yuheaders.hpp -FIheaders.hpp -Fp$(OUTDIR)\headers.pch ..\..\common\vc_crt_fix_impl.cpp
$(CPP) $(CPPFLAGS) $(FIXCRT_CPPFLAGS) ..\..\common\vc_crt_fix_impl.cpp

depfile: $(OUTDIR)
$(TOOLSDIR)\tool gendep $(INCLUDES) > $(OUTDIR)\dep.mak
Expand Down
6 changes: 5 additions & 1 deletion plugins/arclite/makefile_vc
Expand Up @@ -38,6 +38,10 @@ CPPFLAGS = $(CPPFLAGS) -Fo$(OUTDIR)\ -Fd$(OUTDIR)\ $(INCLUDES) $(DEFINES) $(USER
RCFLAGS = $(RCFLAGS) $(INCLUDES) $(DEFINES)
ASFLAGS = $(ASFLAGS) -Fo$(OUTDIR)\

!if $(VC) >= 14
FIXCRT_CPPFLAGS = /Zc:threadSafeInit-
!endif

!ifdef BUILD
!include $(OUTDIR)\far.ini
!endif
Expand Down Expand Up @@ -147,7 +151,7 @@ $(OUTDIR)\vc_crt_fix.obj: ..\common\vc_crt_fix.asm
$(AS) $(ASFLAGS) ..\common\vc_crt_fix.asm

$(OUTDIR)\vc_crt_fix_impl.obj: ..\common\vc_crt_fix_impl.cpp
$(CPP) $(CPPFLAGS) -Yuheaders.hpp -FIheaders.hpp -Fp$(OUTDIR)\headers.pch ..\common\vc_crt_fix_impl.cpp
$(CPP) $(CPPFLAGS) $(FIXCRT_CPPFLAGS) ..\common\vc_crt_fix_impl.cpp

$(OUTDIR):
if not exist $(OUTDIR) mkdir $(OUTDIR)
Expand Down
12 changes: 7 additions & 5 deletions plugins/makefile_all_vc
Expand Up @@ -34,11 +34,13 @@ INSTALL=$(DEFINSTALL)
!endif

!if !defined(VC) && defined(_NMAKE_VER)
!if "$(_NMAKE_VER)">"9"
VC=9
!elseif "$(_NMAKE_VER)">"8"
VC=8
!elseif "$(_NMAKE_VER)">"10"

!if "$(_NMAKE_VER)">"14"
VC=14
!elseif "$(_NMAKE_VER)">"11"
VC=11
!else
#default
VC=10
!endif
!endif
Expand Down
10 changes: 3 additions & 7 deletions plugins/makefile_vc_base
Expand Up @@ -14,12 +14,9 @@ DIRBIT = 32
!endif

!if !defined(VC) && defined(_NMAKE_VER)
!if "$(_NMAKE_VER)">"9"
VC=9
!elseif "$(_NMAKE_VER)">"8"
VC=8
!elseif "$(_NMAKE_VER)">"10"
VC=10

!if "$(_NMAKE_VER)">"14"
VC=14
!elseif "$(_NMAKE_VER)">"11"
VC=11
!else
Expand All @@ -28,7 +25,6 @@ VC=10
!endif
!endif


!ifndef ROOT_PATH
ROOT_PATH=../
!endif
Expand Down
4 changes: 4 additions & 0 deletions plugins/makefile_vc_def_inc
Expand Up @@ -128,6 +128,10 @@ CPPFLAGS=$(CPPFLAGS) /DDEBUG /Od
CPPFLAGS=$(CPPFLAGS) /Zi
!endif

!if $(VC) >= 14
FIXCRT_CPPFLAGS = /Zc:threadSafeInit-
!endif

!if "$(BUILD_PLATFORM)" == "AMD64"
ULOUT=-Tpd+
!elseif "$(BUILD_PLATFORM)" == "IA64"
Expand Down
41 changes: 21 additions & 20 deletions plugins/makefile_vc_target_inc
@@ -1,4 +1,4 @@
!ifdef NEEDDEFLIB
!ifndef NODEFLIB
!if "$(BUILD_PLATFORM)" =="X86"
!ifndef ULINK
LINK_OBJS = $(LINK_OBJS) $(OBJDIR)\vc_crt_fix.obj $(OBJDIR)\vc_crt_fix_impl.obj
Expand All @@ -12,58 +12,59 @@ ALL: dirs $(INSTALL) $(DLLFULLNAME)

$(DLLFULLNAME) : $(LINK_OBJS) $(RES) $(LINK_DEP)
!ifndef __MAKE__
@$(LNK) @<<
$(LNK) @<<
$(LINK_FLAGS) $(LIBS) $(LINK_OBJS) $(RES)
<<
!else
@$(LNK) $(LINK_FLAGS) $(LIBS) $(LINK_OBJS) $(RES)
$(LNK) $(LINK_FLAGS) $(LIBS) $(LINK_OBJS) $(RES)
!endif
!ifdef DOCS
!ifndef __MAKE__
@for %%i in ($(DOCS)) do @copy /Y %%i $(OUTDIR)$(ADDOUTDIR) > nul 2> nul
for %%i in ($(DOCS)) do @copy /Y %%i $(OUTDIR)$(ADDOUTDIR) > nul
!else
@for %i in ($(DOCS)) do @copy /Y %i $(OUTDIR)$(ADDOUTDIR) > nul 2> nul
for %i in ($(DOCS)) do @copy /Y %i $(OUTDIR)$(ADDOUTDIR) > nul
!endif
!endif

!ifndef __MAKE__
.cpp{$(OBJDIR)}.obj::
@$(CC) @<<
$(CC) @<<
$(CPPFLAGS) $<
<<

{$(COMMON)}.cpp{$(OBJDIR)}.obj::
@$(CC) @<<
$(CC) @<<
$(CPPFLAGS) $<
<<
!else
.cpp{$(OBJDIR)}.obj:
@$(CC) $(CPPFLAGS) { $< }
$(CC) $(CPPFLAGS) { $< }

{$(COMMON)}.cpp{$(OBJDIR)}.obj:
@$(CC) $(CPPFLAGS) { $< }
$(CC) $(CPPFLAGS) { $< }
!endif

.asm{$(OBJDIR)}.obj:
@$(AS) $(AFLAGS) $<
$(AS) $(AFLAGS) $<

{$(COMMON)}.asm{$(OBJDIR)}.obj:
@$(AS) $(AFLAGS) $<
$(AS) $(AFLAGS) $<

$(RES): $(RC_NAME).rc $(COMINC)\farversion.hpp $(COMINC)\plugin.hpp
@$(RC) /nologo /I"$(COMINC)" $(ENV_INC_OPT) $(RC_WIDE) /fo"$(RES)" $(RC_NAME).rc
$(RC) /nologo /I"$(COMINC)" $(ENV_INC_OPT) $(RC_WIDE) /fo"$(RES)" $(RC_NAME).rc

$(OUTDIR)\vc_crt_fix.obj: $(COMMON)\vc_crt_fix.asm
$(AS) $(ASFLAGS) $(COMMON)\vc_crt_fix.asm
$(OBJDIR)\vc_crt_fix.obj: $(COMMON)\vc_crt_fix.asm
$(AS) $(AFLAGS) $(COMMON)\vc_crt_fix.asm

$(OBJDIR)\vc_crt_fix_impl.obj: $(COMMON)\vc_crt_fix_impl.cpp
$(CPP) $(CPPFLAGS) $(FIXCRT_CPPFLAGS) $(COMMON)\vc_crt_fix_impl.cpp

$(OUTDIR)\vc_crt_fix_impl.obj: $(COMMON)\vc_crt_fix_impl.cpp
$(CPP) $(CPPFLAGS) $(COMMON)\vc_crt_fix_impl.cpp

.PHONY: dirs
dirs:
!ifdef INSTALL
@if not exist "$(WORKDIR)\$(NULL)" mkdir "$(WORKDIR)"
if not exist "$(WORKDIR)\$(NULL)" mkdir "$(WORKDIR)"
!endif
@if not exist "$(OBJDIR)\$(NULL)" mkdir "$(OBJDIR)"
@if not exist "$(OUTDIR)\$(NULL)" mkdir "$(OUTDIR)"
@if not exist "$(OUTDIR)$(ADDOUTDIR)\$(NULL)" mkdir "$(OUTDIR)$(ADDOUTDIR)"
if not exist "$(OBJDIR)\$(NULL)" mkdir "$(OBJDIR)"
if not exist "$(OUTDIR)\$(NULL)" mkdir "$(OUTDIR)"
if not exist "$(OUTDIR)$(ADDOUTDIR)\$(NULL)" mkdir "$(OUTDIR)$(ADDOUTDIR)"

0 comments on commit 8d939a7

Please sign in to comment.