more CROSSCOMPILE fixes

This commit is contained in:
nhmall
2020-05-05 14:04:29 -04:00
parent 116642ce1e
commit f1d7676bfb
5 changed files with 21 additions and 31 deletions

View 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>

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

View 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

View 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

View 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