build bits - mostly for Windows

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.
This commit is contained in:
nhmall
2019-01-29 11:31:41 -05:00
parent b7edc7f8e8
commit 97fdc3f3e4
4 changed files with 10 additions and 6 deletions

View 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) */

View 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

View File

@@ -152,6 +152,7 @@
<ClCompile Include="$(SrcDir)zap.c" />
<ClCompile Include="$(SysShareDir)cppregex.cpp" />
<ClCompile Include="$(SysShareDir)nhlan.c" />
<ClCompile Include="$(SysShareDir)random.c" />
<ClCompile Include="$(SysWinntDir)ntsound.c" />
<ClCompile Include="$(SysWinntDir)nttty.c" />
<ClCompile Include="$(SysWinntDir)stubs.c">

View File

@@ -147,6 +147,7 @@
<ClCompile Include="$(SrcDir)zap.c" />
<ClCompile Include="$(SysShareDir)cppregex.cpp" />
<ClCompile Include="$(SysShareDir)nhlan.c" />
<ClCompile Include="$(SysShareDir)random.c" />
<ClCompile Include="$(SysWinntDir)ntsound.c" />
<ClCompile Include="$(SysWinntDir)stubs.c">
<PreprocessorDefinitions>TTYSTUB;</PreprocessorDefinitions>