]> granicus.if.org Git - nethack/commitdiff
build bits - mostly for Windows
authornhmall <nhmall@nethack.org>
Tue, 29 Jan 2019 16:31:41 +0000 (11:31 -0500)
committernhmall <nhmall@nethack.org>
Tue, 29 Jan 2019 16:31:41 +0000 (11:31 -0500)
Allow sys/share/random.c to be included in the build
always, even if USE_ISAAC64 is defined, by making most
of its contents conditional in that case.

That avoids Makefile tinkering when going back and
forth between USE_ISAAC64 and not during testing.

sys/share/random.c
sys/winnt/Makefile.msc
win/win32/vs2017/NetHack.vcxproj
win/win32/vs2017/NetHackW.vcxproj

index 6d3d5e45cc294c2fe0094a45477449ca524176f6..cc865c4e576790ec7d41da4a091da7cd4af024f2 100644 (file)
@@ -38,6 +38,8 @@
 
 #include "hack.h"
 
+#if defined(USE_ISAAC64) && !defined(RANDOM)
+#else
 #ifdef LIBC_SCCS
 #ifndef lint
 static char sccsid[] = "@(#)random.c   5.5 (Berkeley) 7/6/88";
@@ -377,3 +379,7 @@ random()
     }
     return (i);
 }
+#endif /* else defined(USE_ISAAC64) && !defined(RANDOM) */
+
+
+
index 97001da6e1f061b3233080020a3b86193e8cbef7..9dd4822184506580190cf4d44de95c5634b7cc16 100644 (file)
@@ -129,13 +129,9 @@ OBJ     = o
 # (see pcconf.h). Set to nothing if not used.
 #
 
-RANDOM = $(OBJ)\isaac64.o
-#RANDOM        = $(OBJ)\random.o
+RANDOM = $(OBJ)\random.o
 #RANDOM        =
-BCRYPT=
-! IF ("$(RANDOM)"=="$(OBJ)\isaac64.o")
 BCRYPT=bcrypt.lib
-! ENDIF
 WINPFLAG= -DTILES -DMSWIN_GRAPHICS -DWIN32CON
 
 # To store all the level files,
@@ -223,7 +219,7 @@ VOBJ10 = $(O)mail.o     $(O)makemon.o  $(O)mapglyph.o $(O)mcastu.o
 VOBJ11 = $(O)mhitm.o    $(O)mhitu.o    $(O)minion.o   $(O)mklev.o   
 VOBJ12 = $(O)mkmap.o    $(O)mkmaze.o   $(O)mkobj.o    $(O)mkroom.o  
 VOBJ13 = $(O)mon.o      $(O)mondata.o  $(O)monmove.o  $(O)monst.o   
-VOBJ14 = $(O)mplayer.o  $(O)mthrowu.o  $(O)muse.o    
+VOBJ14 = $(O)mplayer.o  $(O)mthrowu.o  $(O)muse.o     $(O)isaac64.o
 VOBJ15 = $(O)music.o    $(O)o_init.o   $(O)objects.o  $(O)objnam.o  
 VOBJ16 = $(O)options.o  $(O)pager.o    $(O)pickup.o   $(O)pline.o   
 VOBJ17 = $(O)polyself.o $(O)potion.o   $(O)pray.o     $(O)priest.o  
index 3a4412efee7413a4e495ef703010e159d8fcb35c..be83d0a86d998160104a095a5eed6deea9860226 100644 (file)
     <ClCompile Include="$(SrcDir)zap.c" />\r
     <ClCompile Include="$(SysShareDir)cppregex.cpp" />\r
     <ClCompile Include="$(SysShareDir)nhlan.c" />\r
+    <ClCompile Include="$(SysShareDir)random.c" />\r
     <ClCompile Include="$(SysWinntDir)ntsound.c" />\r
     <ClCompile Include="$(SysWinntDir)nttty.c" />\r
     <ClCompile Include="$(SysWinntDir)stubs.c">\r
index e801b1583d88ab8f2968ded3f98f2af7544000d6..a50dccb3a17d9be96bc10d289ceede2129e7f23a 100644 (file)
     <ClCompile Include="$(SrcDir)zap.c" />\r
     <ClCompile Include="$(SysShareDir)cppregex.cpp" />\r
     <ClCompile Include="$(SysShareDir)nhlan.c" />\r
+    <ClCompile Include="$(SysShareDir)random.c" />\r
     <ClCompile Include="$(SysWinntDir)ntsound.c" />\r
     <ClCompile Include="$(SysWinntDir)stubs.c">\r
       <PreprocessorDefinitions>TTYSTUB;</PreprocessorDefinitions>\r