Commit Graph

1901 Commits

Author SHA1 Message Date
nhmall
6c62b991c2 Merge branch 'wasm-bug-fixes' of https://github.com/apowers313/NetHack into wasm-pr403 2020-10-31 09:22:55 -04:00
Bart House
362fd6ffbf Add stopping in the debugger when nhassert() is hit in the windows port.
When stopping in the debugger after having called impossible, the windowing
state will have been modified since the assertion was hit.  This made
examining state that caused the nhassert to fire no longer possible.
To avoid this issue, we now detect the debugger and stop in the debugger
prior to impossible.
2020-10-19 15:56:49 -07:00
Bart House
93ce6857d3 Tweaks to nhassert implementation. Change to warnings on MSC build. 2020-10-19 15:55:32 -07:00
Bart House
3842da9dbd Added nhassert to core. 2020-10-19 15:51:41 -07:00
Bart House
dde11630e8 Modified nhassert_failed to call impossoible. 2020-10-19 15:36:34 -07:00
Adam Powers
b43b035321 fix wasm runtime errors 2020-10-19 13:22:02 -07:00
Adam Powers
6863730b63 remove wasm 2020-10-19 13:21:40 -07:00
Adam Powers
03e9eb6dd6 fix NO_SIGNAL 2020-10-19 13:21:07 -07:00
Adam Powers
5e5324c25b fix build flags 2020-10-19 11:55:04 -07:00
Adam Powers
6598b3d2d0 wasm requires HACKDIR for embedded files 2020-10-19 11:54:42 -07:00
Adam Powers
c91ec0068f update to new build system 2020-10-19 11:49:34 -07:00
Adam Powers
69264684bd fix build path 2020-10-19 11:47:56 -07:00
Adam Powers
8fcc02fb81 fix stash merge conflict 2020-10-19 11:45:22 -07:00
nhmall
4c933fbf3c recognize visual studio 2019 16.7.6 in sys/winnt/Makefile.msc 2020-10-15 09:38:52 -04:00
nhmall
d9395dcd23 more integration suggestion adoption 2020-10-11 13:42:12 -04:00
nhmall
6806c30a59 adopt some integration suggestions
sys/lib -> sys/libnh
sys/lib/libnethackmain.c -> sys/libnh/libnhmain.c
libnethack.a -> libnh.a
2020-10-11 13:33:51 -04:00
nhmall
0adb64e384 get this working: "make wasm" 2020-10-11 10:51:46 -04:00
nhmall
d4e97cc650 libnethackmain.c includes date.h 2020-10-11 09:43:15 -04:00
nhmall
eaa8b99eea follow-up bit
remove an unnecessary dependency for top Makefile wasm
2020-10-11 09:16:23 -04:00
nhmall
efdf4f8979 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-10-11 09:12:02 -04:00
nhmall
75f852f277 cross-compiles need not build host native lua library
Because some Makefile.top dependencies triggered the build
of the host native lua library, the cross-compiles were
building it needlessly.

Make it a make variable so that it can be overridden by
cross-compile recipes in sys/unix/hints/include/cross-*.2020
2020-10-11 09:08:27 -04:00
Bart House
bb04a9b041 Support both VS 2017 and VS 2019 without making changes to project files.
Renamed 'vs2017' folder to 'vs'.
2020-10-10 15:15:59 -07:00
Bart House
848f37207d Add text mentioning that LUA sources must be copied into tree. 2020-10-10 14:17:58 -07:00
PatR
d20394c4bc unix/Makefile.utl
Replace use of $(LINK) with $(CLINK) or $(CXXLINK) as warranted.
When the Qt interface is enabled, the utility programs were all
(except dlb) being linked with C++ support.  That didn't cause
any problems, just looked wrong.  Link them as C instead of C++.
Two actually do need C++ support (and still have it) but both
are dead:  'tile2beos' because the source file doesn't exist (not
even in 'outdated'), 'tileedit' because it won't build with Qt5.
I didn't bother with QUIETCC support for them.

There were still a couple of references to dgn_comp (for the lint
target; just in the name of a macro, not its value); remove those.
2020-10-09 08:45:03 -07:00
nhmall
3e39984877 more wasm dependency order tinkering 2020-10-09 09:18:51 -04:00
nhmall
139b138b78 follow-up bit
make variable had changed in PRE but not in POST
2020-10-09 09:05:56 -04:00
nhmall
a09a41f9a3 more wasm build
This issue
https://github.com/NetHack/NetHack/issues/398
reported some issues with the wasm build. Attempt to resolve
some of those.
2020-10-09 08:54:36 -04:00
nhmall
de80dd2437 cross-compile fix-up 2020-10-09 08:52:46 -04:00
nhmall
5dcc328759 be more consistent with CROSS_TO_target macro names for cross-compiles
-DCROSS_TO_MSDOS	msdos cross-compile (djgpp cross-compiler)
-DCROSS_TO_AMIGA	Amiga cross-compile
-DCROSS_TO_WASM		wasm cross-compile (emscripten)
2020-10-08 13:49:24 -04:00
nhmall
724e5fba25 adding ; was inappropriate for BUILDMORE list of dependencies 2020-10-06 02:26:40 -04:00
nhmall
a8d31910ec target lua build was missing -c on cross-compile 2020-10-06 02:01:30 -04:00
nhmall
dc47c46314 more wasm cross-compiling follow-up 2020-10-06 01:47:19 -04:00
nhmall
ac493aa455 placement of libnethack targets required adjusting
From -PRE to -POST section
2020-10-04 21:12:03 -04:00
nhmall
d8961b0067 updates for LIBNH build 2020-10-04 20:48:09 -04:00
nhmall
7bf5172f2e unixmain and libnethackmain diverged in the updated PR
put unixmain back the way it was, now that libnethackmain is in the tree after all.
2020-10-04 20:14:45 -04:00
nhmall
c3683eaa9b Merge branch 'libnethack2' into NetHack-3.7 2020-10-04 20:13:35 -04:00
nhmall
15c1cb648d integrate updates made to PR earlier on Oct 4 2020-10-04 20:05:29 -04:00
nhmall
751d5ef76c Merge branch 'libnethack' of https://github.com/apowers313/NetHack into libnethack2 2020-10-04 19:51:37 -04:00
PatR
49ef50fc54 Makefile.src: avoid extra feedback while linking
Recently added cross-compile stuff had resulted in an extra line
of feedback when linking:  'true;'.  Suppress that.

Also, I think 'AWK=nawk' was needed for Solaris or maybe even
SunOS.  Switch 'make depend' to use ordinary awk by default since
most systems have Posix-compliant awk these days and OSX doesn't
have nawk.
2020-10-04 16:34:59 -07:00
Adam Powers
ac4649e63f add globals, constants, and helpers 2020-10-04 14:03:04 -07:00
nhmall
de0195191b update original documentation for pr385
Changes to be committed:
	modified:   sys/lib/README.md
2020-10-04 15:19:58 -04:00
nhmall
b41b897565 remove two unneeded files 2020-10-04 14:51:10 -04:00
Adam Powers
dc2d757399 libnethack pr385
roll parts of pr385 into source tree

This does not take the PR as is.

Unlike the PR, this streamlines and minimizes the integration somewhat:

- use hints/include mechanism instead of creating alternative
  Makefile.dat, Makefile.src, Makefile.top, Makefile.utl in sys/lib;
  those would have been a maintenance nightmare.

- don't have alternative mkmkfile.sh and setup.sh in sys/lib.

- sys/lib/libnethackmain.c differed from sys/unix/unixmain.c by
  very little, so just place a small bit of conditional code at the
  top of sys/unix/unixmain.c instead.

- changed the conditional code bits from __EMSCRIPTEN__ to
  CROSS_TO_WASM.

- You should be able to build the wasm result by:
    cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
    make fetch-lua    (<-one time)
    make WANT_LIBNH all

- You should be able to build LIBNBH by:
    cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
    make fetch-lua    (<-one time)
    make CROSS_TO_WASM=1 all

As it is currently coded, winshim.c requires C99.
2020-10-04 14:46:32 -04:00
nhmall
ef6978ec51 update sys/winnt/console.rc 2020-10-02 16:01:04 -04:00
nhmall
1261aedd45 more recover and cross-compiling 2020-10-01 10:04:05 -04:00
nhmall
92902fd128 make sure recover utily is built for the CROSSCOMPILE target 2020-09-30 21:45:45 -04:00
nhmall
1ff5b519c8 reinstate one $(CROSSCOMPILE_TARGET) in sys/winnt/Makefile.msc
It was removed but shouldn't have been.
2020-09-29 15:13:52 -04:00
nhmall
945d10cfbc cross-compile update
Update the cross-compiling doc at the top.

Remove sys/msdos/Makefile1.cross, sys/msdos/Makefile2.cross, and
sys/msdos/msdos-cross-compile.sh as they are no longer required.

Remove occurrences of CROSSCOMPILE_HOST as the host-side of a
cross-compile can be determined from:
    defined(CROSSCOMPILE) && !defined(CROSSCOMPILE_TARGET)
without the additional macro.
2020-09-29 15:01:37 -04:00
nhmall
5e9303f9df msdos cross-compile follow-up bits
add missing make rule for ../win/share files to cross-pre.2020

adjust .travis.yml to use the new approach for building msdos target
2020-09-29 09:41:31 -04:00
nhmall
4b58cfd201 follow-up bit
break into TARGETDIR and TARGETPFX
2020-09-28 18:19:20 -04:00