]> granicus.if.org Git - nethack/commitdiff
more CROSSCOMPILE fixes
authornhmall <nhmall@nethack.org>
Tue, 5 May 2020 18:04:29 +0000 (14:04 -0400)
committernhmall <nhmall@nethack.org>
Tue, 5 May 2020 18:04:29 +0000 (14:04 -0400)
Cross-compiling
src/drawing.c
sys/msdos/Makefile1.cross
sys/msdos/Makefile2.cross
sys/winnt/Makefile.msc

index 9e074a9466cfd11c628d5981141f11443d57966f..c21ad661b5d44e092cc8a660469c63c96ae746a0 100644 (file)
@@ -281,7 +281,7 @@ On the HOST, here are the mandatory things that have to be built.
        for use in linking other HOST utilities if the HOST-native obj files
        produced from them are still around.  
 
-       NOTE: A few other source files (src/drawing.c, src/decl.c) that need to
+       NOTE: A few other source files (src/drawing.c) that need to
        be compiled for native HOST utilities, also need to be compiled again
        later as TARGET obj files for linking into the TARGET executable. It is
        important to keep the compiled HOST-side obj files produced by the HOST
@@ -319,14 +319,14 @@ On the HOST, here are the mandatory things that have to be built.
 
                    from sources: win/share/tile2bmp.c, win/share/tiletext.c,
                                  win/share/tilemap.c, src/drawing.c,
-                                 src/decl.c, src/monst.c, src/objects.c
+                                 src/monst.c, src/objects.c
                    purpose:      <TBD>
 
           util/gif2txt
 
                    from sources: win/share/gifread.c, win/share/tiletext.c,
                                  win/share/tilemap.c, src/drawing.c,
-                                 src/decl.c, src/monst.c, src/objects.c,
+                                 src/monst.c, src/objects.c,
                                  src/alloc.c, util/panic.c
                    purpose:      <TBD>
 
@@ -334,7 +334,7 @@ On the HOST, here are the mandatory things that have to be built.
 
                    from sources: win/share/ppmwrite.c, win/share/tiletext.c,
                                  win/share/tilemap.c, src/drawing.c,
-                                 src/decl.c, src/monst.c, src/objects.c,
+                                 src/monst.c, src/objects.c,
                                  src/alloc.c, util/panic.c
                    purpose:      <TBD>
 
index 424cfbbb36959c586c6240f0e5d4089d73de235a..6bc35abd8304716e1568f63e67a0335a6fcdbd8f 100644 (file)
@@ -2,7 +2,15 @@
 /* Copyright (c) NetHack Development Team 1992.                   */
 /* NetHack may be freely redistributed.  See license for details. */
 
+#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET)
 #include "hack.h"
+#else
+#include "config.h"
+#include "color.h"
+#include "rm.h"
+#include "objclass.h"
+#include "monsym.h"
+#endif
 #include "tcap.h"
 
 /* Relevant header information in rm.h, objclass.h, and monsym.h. */
index d3c8ffc089b559c3db548d3239765e8c42189770..b51e285dc5beb304503dc5876848bee279af3b0c 100644 (file)
@@ -124,26 +124,16 @@ MAKEDEFSOBJS    = $(HOST_O)makedefs.o  $(HOST_O)monst.o    $(HOST_O)objects.o
 
 LUA_QTEXT_FILE = "quest.lua"
 
-#SPLEVSRC    = lev_yacc.c  lev_$(LEX).c         lev_main.c  panic.c
-#DGNCOMPSRC  = dgn_yacc.c  dgn_$(LEX).c         dgn_main.c
-#SPLEVOBJS   = $(HOST_O)lev_yacc.o $(HOST_O)lev_$(LEX).o $(HOST_O)lev_main.o $(HOST_O)alloc.o \
-#              $(HOST_O)monst.o $(HOST_O)objects.o $(HOST_O)panic.o                     \
-#              $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)stubvid.o
-#DGNCOMPOBJS = $(HOST_O)dgn_yacc.o  $(HOST_O)dgn_$(LEX).o $(HOST_O)dgn_main.o  $(HOST_O)alloc.o  \
-#              $(HOST_O)panic.o
-
 #==========================================
 #  Tile related object files.
 #==========================================
 
-TILOBJ      = $(HOST_O)tile.o $(VGAOBJ)
-
 TILOBJ2     = $(HOST_O)tileset.o $(HOST_O)bmptiles.o $(HOST_O)giftiles.o
 
-TEXTIO      = $(HOST_O)tiletext.o $(HOST_O)tiletxt.o $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)monst.o \
+TEXTIO      = $(HOST_O)tiletext.o $(HOST_O)tiletxt.o $(HOST_O)drawing.o $(HOST_O)monst.o \
                $(HOST_O)objects.o
 
-TEXTIO2     = $(HOST_O)tiletex2.o $(HOST_O)tiletxt2.o $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)monst.o \
+TEXTIO2     = $(HOST_O)tiletex2.o $(HOST_O)tiletxt2.o $(HOST_O)drawing.o $(HOST_O)monst.o \
                $(HOST_O)objects.o
 
 TILE_BMP    = $(DAT)/NHTILES.BMP
@@ -314,7 +304,7 @@ default: prereq
 util: $(HOST_O)utility.tag
 
 $(HOST_O)utility.tag: $(INCL)/date.h $(INCL)/trap.h $(INCL)/onames.h \
-       $(INCL)/pm.h vis_tab.c $(TILEUTIL)
+       $(INCL)/pm.h vis_tab.c $(TILEUTIL) $(SRC)/tile.c
        echo host utilities made > $@
 
 tileutil: $(U)gif2txt $(U)txt2ppm
@@ -627,7 +617,6 @@ spotless: clean
 
 # src dependencies
 
-#$(HOST_O)tile.o: tile.c $(HACK_H)
 $(HOST_O)vis_tab.o: vis_tab.c $(CONFIG_H) $(INCL)/vis_tab.h
 $(HOST_O)alloc.o: alloc.c $(CONFIG_H)
 $(HOST_O)dlb.o: dlb.c $(CONFIG_H) $(INCL)/dlb.h
index 31268dea1ce0577a7d024ca5761f9a2763349868..08dfc1e200f3e15486f980e4e85b8dc353a7fa97 100644 (file)
@@ -249,7 +249,7 @@ U  = $(UTIL)/
 #
 #else
 #
-#TILOBJ      = $(O)tile.o $(VIDEO_OBJ)
+TILOBJ      = $(O)tile.o $(VIDEO_OBJ)
 #
 #TILOBJ2     = $(O)tileset.o $(O)bmptiles.o $(O)giftiles.o
 #
@@ -898,6 +898,7 @@ $(O)pmatchre.o : $(HACK_H) $(SSHR)/pmatchre.c
        $(TARGET_CC) $(cflags) -o$@ $(SSHR)/pmatchre.c
 
 # sys/msdos
+$(O)tile.o : $(HACK_H) $(SRC)/tile.c
 $(O)msdos.o : $(HACK_H)  $(MSYS)/msdos.c
 $(O)pckeys.o : $(HACK_H)  $(MSYS)/pckeys.c
 $(O)pctiles.o : $(HACK_H)  $(MSYS)/pctiles.c $(MSYS)/portio.h
index 8f0617ebb62910c57dc541f7cba1986addf5a1b0..ffb0ee1ec0e01349d74c6d544510de7a493b20ad 100644 (file)
@@ -98,8 +98,8 @@ GAMEDIR = ..\binary               # Default game build directory
 #    PDCurses header (.h) files and PDCURSES_C to the location
 #    of your PDCurses C files.
 #
-#ADD_CURSES=Y
-#PDCURSES_TOP=..\lib\pdcurses
+ADD_CURSES=Y
+PDCURSES_TOP=..\lib\pdcurses
 #
 #------------------------------------------------------------------------------
 # OPTIONAL - zlib support (to allow compressed savefile exchange across platforms
@@ -149,7 +149,6 @@ LUATOP=..\lib\lua-5.3.5
 #==============================================================================
 #
 #TEST_CROSSCOMPILE=Y
-#OPTIONS_AT_RUNTIME=Y
 #
 #==============================================================================
 #======================== End of Modification Section =========================
@@ -248,7 +247,6 @@ U  = $(UTIL)^\
 CROSSCOMPILE_TARGET = -DCROSSCOMPILE_TARGET
 CROSSCOMPILE_HOST = -DCROSSCOMPILE_HOST
 CROSSCOMPILE = -DCROSSCOMPILE
-OPTIONS_AT_RUNTIME=Y
 HOST=_host
 !ELSE
 !UNDEF CROSSCOMPILE_TARGET
@@ -283,10 +281,10 @@ DO_UTILS = N
 
 !IF "$(DO_UTILS)" == "Y"
 TEXT_IO        = $(O)tiletext$(HOST).o $(O)tiletxt$(HOST).o    $(O)drawing$(HOST).o \
-                $(O)decl$(HOST).o      $(O)monst$(HOST).o      $(O)objects$(HOST).o
+                $(O)monst$(HOST).o     $(O)objects$(HOST).o
 
 TEXT_IO32      = $(O)tilete32$(HOST).o $(O)tiletx32$(HOST).o $(O)drawing$(HOST).o \
-                $(O)decl$(HOST).o $(O)monst$(HOST).o $(O)objects$(HOST).o
+                $(O)monst$(HOST).o $(O)objects$(HOST).o
 
 GIFREADERS     = $(O)gifread$(HOST).o  $(O)alloc$(HOST).o $(O)panic$(HOST).o
 GIFREADERS32   = $(O)gifrd32$(HOST).o $(O)alloc$(HOST).o $(O)panic$(HOST).o
@@ -340,12 +338,6 @@ TTYOBJ = $(O)topl.o     $(O)getline.o  $(O)wintty.o
 
 MDLIB = $(O)mdlib.o
 
-!IF "$(OPTIONS_AT_RUNTIME)" == "Y"
-RUNTIMEOPTDEF=-DOPTIONS_AT_RUNTIME
-!ELSE
-RUNTIMEOPTDEF=
-!ENDIF
-
 !IFNDEF ADD_CURSES
 CURSESOBJ=
 !ELSE