Commit Graph

1597 Commits

Author SHA1 Message Date
PatR
8f5cca8e3d 3.7 build cleanup
Unix Makefile.utl wasn't aware of the dependency of makedefs.o on
src/mdlib.c so didn't rebuild makedefs when it should have.

Eliminate several warnings:
mdlib.c  - #if inside the arguments to macro Sprintf();
nhlua.c  - nhl_error() ends with a call to lua_error() which doesn't
           return, but neither of them were declared that way;
nhlsel.c - because of the previous, the 'else error' case of
           l_selection_ellipse() led to complaints about uninitialized
	   variables;
sp_lev.c - missing 'const'.

I did minimal testing which went ok, but revisiting a couple of levels
gave me un-freed memory allocated by restore.c line 1337.  (I haven't
looked at that at all.)
2019-11-24 17:56:01 -08:00
nhmall
8bc171ec50 more sys/msdos/Makefile?.cross updates 2019-11-23 18:57:17 -05:00
Pasi Kallinen
3afbcb76f5 Minor msdos cross compile improvements 2019-11-23 23:40:25 +02:00
nhmall
69136fbb98 more cross-compile djgpp build tweaks 2019-11-23 12:19:33 -05:00
nhmall
95c1ccd716 another cross-compile script bit 2019-11-23 10:20:18 -05:00
nhmall
ad6ef85177 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2019-11-23 10:15:05 -05:00
nhmall
308ebea68e add some msdos files to .gitignore, produce zip 2019-11-23 10:13:10 -05:00
nhmall
89b315be47 Makefile?.cross bits 2019-11-23 08:49:55 -05:00
nhmall
11678e72f2 fix an error with msdos cross-compiler NetHack packaging 2019-11-23 01:30:54 -05:00
nhmall
1e0c03b3f6 incremental improvements to cross-compiling support in NetHack 3.7
Some support of new code #defines to faciliate cross-compiling:

    OPTIONS_AT_RUNTIME    If this is defined, code to support obtaining
                          the compile time options and features is
                          included. If you define this, you'll also have
                          to compile sys/mdlib.c and link the resulting
                          object file into your game binary/executable.

    CROSSCOMPILE          Flags that this is a cross-compiled NetHack build,
                          where there are two stages:
                          1. makedefs and some other utilities are compiled
                          on the host platform and executed there to generate
                          some output files and header files needed by the
                          game.
                          2. the NetHack game files are compiled by a
                          cross-compiler to generate binary/executables for
                          a different platform than the one the build is
                          being run on. The executables produced for the
                          target platform may not be able to execute on the
                          build platform, except perhaps via a software
                          emulator.

                          The 2-stage process (1. host, 2.target) can be done
                          on the same platform to test the cross-compile
                          process. In that case, the host and target platforms
                          would be the same.

    CROSSCOMPILE_HOST     Separates/identifies code paths that should only be
                          be included in the compile on the host side, for
                          utilities that will be run on the host as part of
                          stage 1 to produce output files needed to build the
                          game. Examples are the code for makedefs, tile
                          conversion utilities, uudecode, dlb, etc.

    CROSSCOMPILE_TARGET   Separates/identifies code paths that should be
                          included on the build for the target platform
                          during stage 2, the cross-compiler stage. That
                          includes most of the pieces of the game itself
                          but the code is only flagged as such if it must
                          not execute on the host.

If you don't define any of those, things should build as before.
One follow-on change that is likely required is setting the new dependency
makedefs has on src/mdlib.c in Makefiles etc.

More information about the changes:

    makedefs

    - splinter off some of makedefs functionality into a separate file
      called src/mdlib.c.
        - src/mdlib.c, while included during the compile of makedefs.c
          for producing the makedefs utility, can also be compiled
          as a stand-alone object file for inclusion in the link step
          of your NetHack game build. The src/mdlib.c code can then
          deliver the same functionality that it provided to makedefs
          right to your NetHack game code at run-time.
          For example, do_runtime_info() will provide the caller with
          the features and options that were built into the game.
          Previously, that information was produced at build time on the
          host and stored in a dat file. Under a cross-compile situation,
          those values are highly suspect and might not even reflect the
          correct options and setting for the cross-compiled target
          platform's binary/executable. The compile of those values and
          the functionality to obtain them needs to move to the target
          cross-compiler stage of the build (stage 2).
        - date information on the target-side binary is produced from
          the cross-compiler preprocessor pre-defined macros __DATE__
          and __TIME__, as they reflect the actual compile time of the
          cross-compiled target and not host-side execution of a utility
          to produce them. The cross-compiler itself, through those
          pre-defined preprocessor macros, provides them to the target
          platform binary/executable. They reflect the actual build
          time of the target binary/executable (not values produced
          at the time the makefiles utility was built and the
          appropriate option selected to store them in a text file.)
        - most Makefiles should not require adding the new file
          src/mdlib.c because util/makedefs.c has a preprocessor
          include "../src/mdlib.c" to draw in its contents. As previously
          stated though, the Makefile dependency may be required:
		makedefs.o: ../util/makedefs.c ../src/mdlib.c
                                               ^^^^^^^^^^^^^^^
2019-11-22 22:35:48 -05:00
nhmall
c9e7182f43 Merge branch 'NetHack-3.6' 2019-11-22 07:46:42 -05:00
nhmall
c8af8e23c1 slash vs backslash Makefile bit 2019-11-22 07:45:43 -05:00
nhmall
fa4552e09e Merge branch 'NetHack-3.6' 2019-11-22 07:41:53 -05:00
nhmall
7af4797671 when decl.h changes, ensure windmain is rebuilt 2019-11-22 07:40:17 -05:00
nhmall
3545374e9c internal self-recover fix and bones name buffers 2019-11-21 23:41:11 -05:00
nhmall
4a8b9ee26c merge fix 2019-11-18 19:21:50 -05:00
nhmall
47fb8e5c0e Merge branch 'NetHack-3.6' 2019-11-18 19:20:55 -05:00
nhmall
893fa4efa8 update nhusage output on Windows 2019-11-18 19:20:03 -05:00
Pasi Kallinen
65ccd1d89e Fix double DLB definition in linux hints file 2019-11-18 09:16:51 +02:00
nhmall
cc5ecbcb56 Merge NetHack-3.6 2019-11-17 00:19:33 -05:00
nhmall
80b90f2b0f Merge branch 'NetHack-3.6' 2019-11-17 00:18:24 -05:00
nhmall
21e4595127 sysconf template for windows 2019-11-17 00:16:02 -05:00
nhmall
5f3398347c Merge branch 'NetHack-3.6' 2019-11-16 23:14:34 -05:00
nhmall
a364348098 add an mgflags parameter to mapglyph() to alter how it behaves internally
avoid a recent save-value,call,restore-value kludge by adding
an mgflags parameter to mapglyph() to control its behavior

 Changes to be committed:
	modified:   doc/window.doc
	modified:   include/extern.h
	modified:   include/hack.h
	modified:   src/detect.c
	modified:   src/mapglyph.c
	modified:   src/pager.c
	modified:   sys/amiga/winfuncs.c
	modified:   sys/wince/mhmap.c
	modified:   win/Qt/qt_win.cpp
	modified:   win/Qt4/qt4map.cpp
	modified:   win/X11/winmap.c
	modified:   win/curses/cursdial.c
	modified:   win/curses/cursinvt.c
	modified:   win/curses/cursmain.c
	modified:   win/gem/wingem.c
	modified:   win/tty/wintty.c
	modified:   win/win32/mhmap.c
	modified:   win/win32/mswproc.c
2019-11-16 22:49:36 -05:00
nhmall
18f6af1466 Merge branch 'NetHack-3.6' 2019-11-16 18:27:50 -05:00
PatR
2a07924063 rename S_player_override to S_hero_override 2019-11-16 14:31:57 -08:00
nhmall
f319a8ce3f Merge branch 'master' into NetHack-3.7 2019-11-15 13:24:31 -05:00
nhmall
f3cb37e7ca Merge branch 'NetHack-3.6' 2019-11-15 13:23:58 -05:00
PatR
304673dcab hints/macosx10.14 comment
A comment in macosx10.14 describing how to create a signed package
had the last sample command wrong.  Fix it now in case that part
carries over to hypothetical--but likely--new macosx10.15 hints.

Also, shorten a couple of wide comment lines in the same area.
2019-11-15 10:12:45 -08:00
nhmall
8bd6ef629a update post-Lua
add lib/ to .gitignore

add optional "make fetch-Lua" step to simplify prerequisite to "make all"
2019-11-15 11:12:00 -05:00
nhmall
b7d16efd76 Makefile.msc updates post-Lua integration 2019-11-15 09:51:04 -05:00
nhmall
d2128968fa Merge branch 'NetHack-3.7' into paxed-lua-v2-merged 2019-11-14 19:50:20 -05:00
nhmall
6c97b0f9a1 Merge branch 'NetHack-3.6' 2019-11-14 19:48:57 -05:00
nhmall
e0fbd52359 header issues so just remove them for now on msdos *.cross Makefiles 2019-11-14 19:18:49 -05:00
nhmall
61a8ad35f5 more minor msdos Makefile bits 2019-11-14 19:17:44 -05:00
nhmall
6ea483242e some msdos cross-compile additional notes and a clarification 2019-11-14 19:12:14 -05:00
nhmall
8e7888d631 introduce msdos build support for cross-compiling on other platforms 2019-11-14 14:10:56 -05:00
nhmall
9470138324 Merge branch 'NetHack-3.6' 2019-11-13 01:08:33 -05:00
nhmall
392ddb2fef updates to vmsbuild.com to include lua and new 3.7 files 2019-11-12 23:41:01 -05:00
nhmall
bc0d78138f some, but not all, vms issues fixed 2019-11-12 19:58:48 -05:00
nhmall
ec91626316 fix mingw Makefile.gcc for 3.7 and lua support 2019-11-12 12:42:42 -05:00
nhmall
2359a9820e prototype fix after Windows gcc complaint 2019-11-11 18:12:39 -05:00
nhmall
3bc26e6c65 Merge branch 'NetHack-3.7' into paxed-lua-v2-merged 2019-11-11 14:33:31 -05:00
nhmall
900a826e8e Merge branch 'NetHack-3.6' 2019-11-11 14:32:09 -05:00
nhmall
6dfbff9d4b --showpaths wasn't returning the paths if there was an error in a config file
Also,
Windows only: Introduces some environment variable substitution for paths
specified in a config file
2019-11-11 12:49:54 -05:00
nhmall
bc69fc65d2 Merge branch 'NetHack-3.6' into bart-test 2019-11-11 11:27:50 -05:00
nhmall
10411fbd39 Merge branch 'NetHack-3.7' into paxed-lua-v2-merged 2019-11-09 21:57:26 -05:00
nhmall
641eeeab49 Merge branch 'NetHack-3.6' 2019-11-09 21:50:18 -05:00
nhmall
fddffc2fa0 updates to reveal_paths 2019-11-09 21:20:46 -05:00
nhmall
632c2efdcd Merge branch 'NetHack-3.7' into paxed-lua-v2-merged 2019-11-09 12:25:43 -05:00