The host build portion using sys/msdos/Makefile1.cross) was failing because it
was attempting to compile the generated tile.o which is using hack.h.
gcc -o../util/tilemap host_o/tilemap.o
A new ../src/tile.c has been created
gcc -c -O -I../include -I../sys/msdos -DDLB -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_HOST -ohost_o/tile.o ../src/tile.c
In file included from ../include/hack.h:201:0,
from ../src/tile.c:3:
../include/dungeon.h:70:5: error: unknown type name ‘lua_State’
lua_State *themelua; /* themerms compiled lua */
^
../sys/msdos/Makefile1.cross:286: recipe for target 'host_o/tile.o' failed
make: *** [host_o/tile.o] Error 1
I don't think think the tile.o is required on the host build build portion,
so it is probably an error in the Makefile. Try removing it.
646 lines
20 KiB
Plaintext
646 lines
20 KiB
Plaintext
# NetHack 3.7 Makefile1.cross
|
|
# Cross-compile msdos version of NetHack using a
|
|
# linux-hosted djgpp cross-compiler.
|
|
#
|
|
# Makefile1.cross (this file) is for the host-side obj files and
|
|
# utilities that will run on the host platform only.
|
|
#
|
|
# Makefile2.cross is for the target platform obj files
|
|
# and utilities.
|
|
#
|
|
# Makefile2 utilizes the djgpp cross-compiler from Andrew Wu:
|
|
# https://github.com/andrewwutw/build-djgpp
|
|
#
|
|
# Currently, in NetHack 3.7, it is now feasible to cross-compile
|
|
# the game in a 2-stage process. Makefile1.cross (this file) carries
|
|
# out the 1st stage.
|
|
#
|
|
# The GNU Make has a problem if you include a drive spec below.
|
|
GAMEDIR =../msdos-binary
|
|
|
|
#
|
|
#==============================================================================
|
|
# This marks the end of the BUILD DECISIONS section.
|
|
#==============================================================================
|
|
#
|
|
# Directories, gcc likes unix style directory specs
|
|
#
|
|
|
|
OBJ = o
|
|
HOBJ = host_o
|
|
DAT = ../dat
|
|
DOC = ../doc
|
|
INCL = ../include
|
|
LIB = ../lib
|
|
MSYS = ../sys/msdos
|
|
SRC = ../src
|
|
SSHR = ../sys/share
|
|
UTIL = ../util
|
|
WIN = ../win/tty
|
|
WCURSES = ../win/curses
|
|
WSHR = ../win/share
|
|
|
|
#
|
|
# Executables.
|
|
#
|
|
HOST_CC = gcc
|
|
HOST_LINK = gcc
|
|
MAKEBIN = make
|
|
|
|
#
|
|
# Special libraries and how to link them in.
|
|
#
|
|
LIBS = -lpc
|
|
LIBRARIES = $(LIBS)
|
|
|
|
#
|
|
# Yacc/Lex off
|
|
#
|
|
YACC_LEX = N
|
|
|
|
#
|
|
# Uncomment the line below if you want to store all the level files,
|
|
# help files, etc. in a single library file.
|
|
#
|
|
USE_DLB = Y
|
|
|
|
#===============================================
|
|
#======= End of Modification Section ===========
|
|
#===============================================
|
|
################################################
|
|
# #
|
|
# Nothing below here should have to be changed.#
|
|
# #
|
|
################################################
|
|
|
|
# Changing this conditional block is not recommended
|
|
ifeq "$(USE_DLB)" "Y"
|
|
DLBFLG = -DDLB
|
|
else
|
|
DLBFLG =
|
|
endif
|
|
|
|
TERMLIB =
|
|
|
|
#==========================================
|
|
#================ MACROS ==================
|
|
#==========================================
|
|
# This section creates shorthand macros for many objects
|
|
# referenced later on in the Makefile.
|
|
#
|
|
# Have windows path styles available for use in commands
|
|
#
|
|
W_OBJ =$(subst /,\, $(OBJ))
|
|
W_INCL =$(subst /,\, $(INCL))
|
|
W_DAT =$(subst /,\, $(DAT))
|
|
W_DOC =$(subst /,\, $(DOC))
|
|
W_UTIL =$(subst /,\, $(UTIL))
|
|
W_SRC =$(subst /,\, $(SRC))
|
|
W_SSYS =$(subst /,\, $(SSYS))
|
|
W_MSWSYS =$(subst /,\, $(MSWSYS))
|
|
W_TTY =$(subst /,\, $(TTY))
|
|
W_MSWIN =$(subst /,\, $(MSWIN))
|
|
ifeq "$(ADD_CURSES)" "Y"
|
|
W_WCURSES =$(subst /,\, $(WCURSES))
|
|
endif
|
|
W_WSHR =$(subst /,\, $(WSHR))
|
|
W_GAMEDIR =$(subst /,\, $(GAMEDIR))
|
|
|
|
#
|
|
# Shorten up the location for some files
|
|
#
|
|
|
|
O = $(OBJ)/
|
|
HOST_O = $(HOBJ)/
|
|
U = $(UTIL)/
|
|
|
|
#==========================================
|
|
# Utility Objects.
|
|
#==========================================
|
|
|
|
MAKESRC = makedefs.c
|
|
|
|
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 \
|
|
$(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 \
|
|
$(HOST_O)objects.o
|
|
|
|
TILE_BMP = $(DAT)/NHTILES.BMP
|
|
|
|
TILEUTIL = $(TILE_BMP)
|
|
|
|
TILEFILES = $(WSHR)/monsters.txt $(WSHR)/objects.txt $(WSHR)/other.txt
|
|
|
|
TILEFILES2 = $(WSHR)/monthin.txt $(WSHR)/objthin.txt $(WSHR)/oththin.txt
|
|
|
|
GIFREADERS = $(HOST_O)gifread.o $(HOST_O)alloc.o $(HOST_O)panic.o
|
|
|
|
GIFREAD2 = $(HOST_O)gifread2.o $(HOST_O)alloc.o $(HOST_O)panic.o
|
|
|
|
PPMWRITERS = $(HOST_O)ppmwrite.o $(HOST_O)alloc.o $(HOST_O)panic.o
|
|
|
|
PPMWRIT2 = $(HOST_O)ppmwrit2.o $(HOST_O)alloc.o $(HOST_O)panic.o
|
|
|
|
#==========================================
|
|
# Object files.
|
|
#==========================================
|
|
|
|
DLBOBJ = $(HOST_O)dlb.o
|
|
|
|
ALLOBJ = $(MAKEDEFSOBJS) $(TILOBJ) $(TILOBJ2) $(TEXTIO) $(TEXTIO2)
|
|
|
|
#==========================================
|
|
# Header file macros
|
|
#==========================================
|
|
|
|
PATCHLEV_H = $(INCL)/patchlev.h
|
|
DGN_FILE_H = $(INCL)/align.h $(INCL)/dgn_file.h
|
|
DUNGEON_H = $(INCL)/align.h $(INCL)/dungeon.h
|
|
MONDATA_H = $(INCL)/align.h $(INCL)/mondata.h
|
|
MONST_H = $(INCL)/align.h $(INCL)/monst.h $(INCL)/mextra.h
|
|
PERMONST_H = $(INCL)/monattk.h $(INCL)/monflag.h $(INCL)/align.h \
|
|
$(INCL)/permonst.h
|
|
REGION_H = $(INCL)/region.h
|
|
RM_H = $(INCL)/align.h $(INCL)/rm.h
|
|
SKILLS_H = $(INCL)/skills.h
|
|
SP_LEV_H = $(INCL)/align.h $(INCL)/sp_lev.h
|
|
YOUPROP_H = $(PERMONST_H) $(MONDATA_H) $(INCL)/prop.h \
|
|
$(INCL)/pm.h $(INCL)/youprop.h
|
|
YOU_H = $(MONST_H) $(YOUPROP_H) $(INCL)/align.h \
|
|
$(INCL)/attrib.h $(INCL)/you.h
|
|
DISPLAY_H = $(MONDATA_H) $(INCL)/vision.h $(INCL)/display.h
|
|
PCCONF_H = $(INCL)/micro.h $(INCL)/system.h $(INCL)/pcconf.h \
|
|
$(MSYS)/pcvideo.h
|
|
DECL_H = $(YOU_H) $(INCL)/spell.h $(INCL)/color.h \
|
|
$(INCL)/obj.h $(INCL)/onames.h $(INCL)/pm.h \
|
|
$(INCL)/decl.h
|
|
GLOBAL_H = $(PCCONF_H) $(INCL)/coord.h $(INCL)/global.h
|
|
|
|
CONFIG_H = $(INCL)/config.h $(INCL)/config1.h $(INCL)/tradstdc.h \
|
|
$(INCL)/global.h $(INCL)/coord.h $(INCL)/vmsconf.h \
|
|
$(INCL)/system.h $(INCL)/nhlua.h $(INCL)/unixconf.h \
|
|
$(INCL)/os2conf.h $(INCL)/micro.h $(INCL)/pcconf.h \
|
|
$(INCL)/tosconf.h $(INCL)/amiconf.h $(INCL)/macconf.h \
|
|
$(INCL)/beconf.h $(INCL)/wceconf.h $(INCL)/ntconf.h
|
|
|
|
HACK_H = $(INCL)/hack.h $(CONFIG_H) $(INCL)/lint.h $(INCL)/align.h \
|
|
$(INCL)/dungeon.h $(INCL)/monsym.h $(INCL)/mkroom.h \
|
|
$(INCL)/objclass.h $(INCL)/youprop.h $(INCL)/prop.h \
|
|
$(INCL)/permonst.h $(INCL)/monattk.h \
|
|
$(INCL)/monflag.h $(INCL)/mondata.h $(INCL)/pm.h \
|
|
$(INCL)/wintype.h $(INCL)/context.h $(INCL)/rm.h \
|
|
$(INCL)/botl.h $(INCL)/rect.h \
|
|
$(INCL)/region.h $(INCL)/decl.h $(INCL)/quest.h \
|
|
$(INCL)/spell.h $(INCL)/color.h $(INCL)/obj.h \
|
|
$(INCL)/you.h $(INCL)/attrib.h $(INCL)/monst.h \
|
|
$(INCL)/mextra.h $(INCL)/skills.h $(INCL)/onames.h \
|
|
$(INCL)/timeout.h $(INCL)/trap.h $(INCL)/flag.h \
|
|
$(INCL)/vision.h $(INCL)/display.h $(INCL)/engrave.h \
|
|
$(INCL)/winprocs.h $(INCL)/sys.h $(INCL)/wintty.h \
|
|
$(INCL)/trampoli.h
|
|
|
|
DLB_H = $(INCL)/dlb.h
|
|
|
|
ifeq ($(SUPPRESS_GRAPHICS),Y)
|
|
TILE_H =
|
|
else
|
|
TILE_H = $(WSHR)/tile.h $(INCL)/tileset.h
|
|
endif
|
|
|
|
ifeq ($(USE_DLB),Y)
|
|
DLB = dlb
|
|
DLBOBJS = $(HOST_O)dlb_main.o $(HOST_O)dlb.o $(HOST_O)alloc.o $(HOST_O)panic.o
|
|
else
|
|
DLB =
|
|
DLBOBJS =
|
|
endif
|
|
|
|
#==========================================
|
|
# More compiler setup macros
|
|
#==========================================
|
|
#
|
|
CURSESDEF=
|
|
CURSESLIB=
|
|
INCLDIR=-I../include -I../sys/msdos
|
|
# Debugging
|
|
#cflags = -pg -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS -DCROSSCOMPILE -CROSSCOMPILE_HOST
|
|
#LFLAGS = -pg
|
|
#
|
|
#cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS -DCROSSCOMPILE -DCROSSCOMPILE_HOST
|
|
#LFLAGS =
|
|
#
|
|
# Debugging
|
|
#cflags = -g -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_HOST
|
|
#LFLAGS = -g
|
|
#
|
|
# Normal
|
|
cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_HOST
|
|
LFLAGS =
|
|
|
|
#==========================================
|
|
#================ RULES ==================
|
|
#==========================================
|
|
|
|
.SUFFIXES: .o .til .uu .c .y .l
|
|
|
|
#==========================================
|
|
# Rules for host files in src
|
|
#==========================================
|
|
|
|
$(HOST_O)%.o : $(SRC)/%.c
|
|
$(HOST_CC) $(cflags) -o$@ $<
|
|
|
|
#==========================================
|
|
# Rules for host files in sys/msdos
|
|
#==========================================
|
|
|
|
$(HOST_O)%.o : $(MSYS)/%.c
|
|
$(HOST_CC) $(cflags) -I../sys/msdos -o$@ $<
|
|
|
|
#==========================================
|
|
# Rules for host files in util
|
|
#==========================================
|
|
|
|
$(HOST_O)%.o : $(SRC)/%.c
|
|
$(HOST_CC) $(cflags) -o$@ $<
|
|
|
|
$(HOST_O)%.o : $(UTIL)/%.c
|
|
$(HOST_CC) $(cflags) -o$@ $<
|
|
|
|
$(HOST_O)%.o : %.c
|
|
$(HOST_CC) $(cflags) -o$@ $<
|
|
|
|
#==========================================
|
|
# Rules for host files in win/share
|
|
#==========================================
|
|
|
|
$(HOST_O)%.o : $(WSHR)/%.c
|
|
$(HOST_CC) $(cflags) -I../win/share -o$@ $<
|
|
|
|
#==========================================
|
|
# Primary Targets.
|
|
#==========================================
|
|
|
|
# The default target.
|
|
|
|
all : prereq
|
|
|
|
prereq: $(HOST_O)prereq.tag
|
|
@echo Done.
|
|
|
|
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)
|
|
echo host utilities made > $@
|
|
|
|
tileutil: $(U)gif2txt $(U)txt2ppm
|
|
@echo Optional tile development utilities are up to date.
|
|
|
|
$(HOST_O)prereq.tag: $(INCL)/nhlua.h hobj.tag $(U)makedefs \
|
|
$(HOST_O)utility.tag $(DAT)/nhdat
|
|
echo prereq done >$@
|
|
|
|
$(INCL)/nhlua.h:
|
|
cd $(INCL); \
|
|
echo '/* nhlua.h - generated by Makefile1.cross */' > $@; \
|
|
echo '#include "../lib/lua-5.3.5/src/lua.h"' >> $@; \
|
|
sed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' < $(LIB)/lua-5.3.5/src/lua.h >> $@; \
|
|
echo '#include "../lib/lua-5.3.5/src/lualib.h"' >> $@; \
|
|
echo '#include "../lib/lua-5.3.5/src/lauxlib.h"' >> $@; \
|
|
echo '/*nhlua.h*/' >> $@; \
|
|
cd $(SRC)
|
|
|
|
#==========================================
|
|
# Other host targets.
|
|
#==========================================
|
|
|
|
#note that dir below assumes bin/dir from djgpp distribution
|
|
#
|
|
$(DAT)/nhdat: $(U)dlb_main $(DAT)/data $(DAT)/rumors \
|
|
$(DAT)/oracles \
|
|
$(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute
|
|
cd $(DAT); \
|
|
pwd; \
|
|
cp $(MSYS)/msdoshlp.txt .; \
|
|
ls -1 data oracles options rumors help hh >dlb.lst; \
|
|
ls -1 cmdhelp history opthelp wizhelp license >>dlb.lst; \
|
|
ls -1 bogusmon engrave epitaph tribute msdoshlp.txt >>dlb.lst; \
|
|
ls -1 *.lua >>dlb.lst; \
|
|
$(U)dlb_main cvIf dlb.lst nhdat; \
|
|
cd $(SRC)
|
|
|
|
$(U)dlb_main: $(DLBOBJS)
|
|
$(HOST_LINK) $(LFLAGS) -o$@ $(DLBOBJS)
|
|
|
|
$(HOST_O)dlb_main.o: $(U)dlb_main.c $(INCL)/config.h $(DLB_H)
|
|
$(HOST_CC) $(cflags) -o$@ $(U)dlb_main.c
|
|
|
|
|
|
$(INCL)/date.h : $(U)makedefs
|
|
-$(U)makedefs -v
|
|
|
|
$(INCL)/onames.h: $(U)makedefs
|
|
-$(U)makedefs -o
|
|
|
|
$(INCL)/pm.h: $(U)makedefs
|
|
-$(U)makedefs -p
|
|
|
|
#monstr.c: $(U)makedefs
|
|
# -$(U)makedefs -m
|
|
|
|
$(INCL)/vis_tab.h: $(U)makedefs
|
|
-$(U)makedefs -z
|
|
|
|
vis_tab.c: $(U)makedefs
|
|
-$(U)makedefs -z
|
|
|
|
# make data.base an 8.3 filename to prevent an make warning
|
|
DATABASE = $(DAT)/data.bas
|
|
|
|
$(DAT)/data: $(HOST_O)utility.tag $(DATABASE)
|
|
$(U)makedefs -d
|
|
|
|
$(DAT)/rumors: $(HOST_O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal
|
|
$(U)makedefs -r
|
|
|
|
$(DAT)/oracles: $(HOST_O)utility.tag $(DAT)/oracles.txt
|
|
$(U)makedefs -h
|
|
|
|
$(DAT)/bogusmon: $(HOST_O)utility.tag $(DAT)/bogusmon.txt
|
|
$(U)makedefs -s
|
|
|
|
$(DAT)/engrave: $(HOST_O)utility.tag $(DAT)/engrave.txt
|
|
$(U)makedefs -s
|
|
|
|
$(DAT)/epitaph: $(HOST_O)utility.tag $(DAT)/epitaph.txt
|
|
$(U)makedefs -s
|
|
|
|
#===============================================
|
|
# Create directory for holding host object files
|
|
#===============================================
|
|
|
|
hobj.tag:
|
|
mkdir -p ./$(HOBJ)
|
|
echo directory ready ./$(HOBJ)
|
|
|
|
#==========================================
|
|
# Makedefs Stuff
|
|
#==========================================
|
|
|
|
$(U)makedefs: $(MAKEDEFSOBJS)
|
|
$(HOST_LINK) $(LFLAGS) -o$@ $(MAKEDEFSOBJS)
|
|
|
|
$(HOST_O)makedefs.o: $(U)makedefs.c $(SRC)/mdlib.c $(CONFIG_H) $(INCL)/permonst.h \
|
|
$(INCL)/objclass.h $(INCL)/monsym.h \
|
|
$(INCL)/artilist.h $(INCL)/dungeon.h $(INCL)/obj.h \
|
|
$(INCL)/monst.h $(INCL)/you.h $(INCL)/flag.h \
|
|
$(INCL)/dlb.h $(INCL)/patchlevel.h
|
|
|
|
#=============================================
|
|
# Header file moves required for tile support
|
|
#=============================================
|
|
|
|
ifeq ($(SUPPRESS_GRAPHICS),Y)
|
|
|
|
else
|
|
#
|
|
# Tile Mapping
|
|
#
|
|
|
|
$(SRC)/tile.c: $(U)tilemap
|
|
@$(U)tilemap
|
|
@echo A new $@ has been created
|
|
|
|
$(U)tilemap: $(HOST_O)tilemap.o
|
|
$(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tilemap.o
|
|
|
|
$(HOST_O)tilemap.o: $(WSHR)/tilemap.c $(HACK_H) $(TILE_H)
|
|
$(HOST_CC) $(cflags) -I$(WSHR) -I$(MSYS) -DSTATUES_LOOK_LIKE_MONSTERS -o$@ $(WSHR)/tilemap.c
|
|
|
|
|
|
#==========================================
|
|
# Tile Utilities
|
|
# Required for tile support
|
|
#==========================================
|
|
|
|
#$(DAT)/NetHack1.tib: $(TILEFILES) $(U)tile2bin
|
|
# @echo Creating binary tile files
|
|
# cd $(DAT)
|
|
# $(U)tile2bin
|
|
# cd $(SRC)
|
|
|
|
#$(DAT)/NetHacko.tib: $(HOST_O)thintile.tag $(TILEFILES2) $(U)til2bin2
|
|
# @echo Creating overview binary tile files
|
|
# cd $(DAT)
|
|
# $(U)til2bin2
|
|
# cd $(SRC)
|
|
|
|
$(DAT)/NHTILES.BMP: $(TILEFILES) $(U)tile2bmp
|
|
@echo Creating binary tile files which may take some time
|
|
@cd $(DAT)
|
|
@$(U)tile2bmp $@
|
|
@cd $(SRC)
|
|
|
|
$(U)tile2bmp: $(HOST_O)tile2bmp.o $(TEXTIO)
|
|
-rm -f temp.a
|
|
ar r temp.a $(TEXTIO)
|
|
$(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tile2bmp.o temp.a
|
|
|
|
#$(U)tile2bin: $(HOST_O)tile2bin.o $(TEXTIO)
|
|
# -rm -f temp.a
|
|
# ar r temp.a $(TEXTIO)
|
|
# $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tile2bin.o temp.a
|
|
|
|
#$(U)til2bin2: $(HOST_O)til2bin2.o $(TEXTIO2)
|
|
# -rm -f temp.a
|
|
# ar r temp.a $(TEXTIO2)
|
|
# $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)til2bin2.o temp.a
|
|
|
|
#$(U)thintile: $(HOST_O)thintile.o
|
|
# $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)thintile.o
|
|
|
|
#$(HOST_O)thintile.o: $(HACK_H) $(WSHR)/tile.h $(WSHR)/thintile.c
|
|
# -rm -f temp.a
|
|
# ar r temp.a $(TEXTIO)
|
|
# $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tile2bmp.o temp.a
|
|
|
|
#$(HOST_O)thintile.o: $(HACK_H) $(WSHR)/tile.h $(WSHR)/thintile.c
|
|
# $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE -DOVERVIEW_FILE -o$@ $(WSHR)/thintile.c
|
|
|
|
#$(HOST_O)thintile.tag: $(U)thintile $(TILEFILES)
|
|
# $(U)thintile
|
|
# echo thintiles created >$@
|
|
|
|
$(HOST_O)tile2bmp.o: $(HACK_H) $(TILE_H) $(WSHR)/tile2bmp.c
|
|
$(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(WSHR)/tile2bmp.c
|
|
|
|
#$(HOST_O)tile2bin.o: $(HACK_H) $(TILE_H) $(MSYS)/pctiles.h $(MSYS)/pcvideo.h $(MSYS)/tile2bin.c
|
|
# $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/tile2bin.c
|
|
|
|
#$(HOST_O)til2bin2.o: $(HACK_H) $(TILE_H) $(MSYS)/pctiles.h $(MSYS)/pcvideo.h $(MSYS)/tile2bin.c
|
|
# $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE_X=8 -DOVERVIEW_FILE -o$@ $(MSYS)/tile2bin.c
|
|
|
|
$(HOST_O)tiletext.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tiletext.c
|
|
$(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(WSHR)/tiletext.c
|
|
|
|
$(HOST_O)tiletex2.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tiletext.c
|
|
$(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE_X=8 -o$@ $(WSHR)/tiletext.c
|
|
|
|
$(HOST_O)tiletxt.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tilemap.c
|
|
$(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILETEXT -o$@ $(WSHR)/tilemap.c
|
|
|
|
$(HOST_O)tiletxt2.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tilemap.c
|
|
$(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILETEXT -DTILE_X=8 -o$@ $(WSHR)/tilemap.c
|
|
#
|
|
# Optional GIF Utilities (for development)
|
|
#
|
|
|
|
$(U)gif2txt: $(GIFREADERS) $(TEXTIO)
|
|
$(HOST_LINK) $(LFLAGS) -o$@ $(GIFREADERS) $(TEXTIO)
|
|
|
|
$(U)gif2txt2: $(GIFREAD2) $(TEXTIO2)
|
|
$(HOST_LINK) $(LFLAGS) -o$@ $(GIFREAD2) $(TEXTIO2)
|
|
|
|
$(U)txt2ppm: $(PPMWRITERS) $(TEXTIO)
|
|
$(HOST_LINK) $(LFLAGS) -o$@ $(PPMWRITERS) $(TEXTIO)
|
|
|
|
$(U)txt2ppm2: $(PPMWRIT2) $(TEXTIO2)
|
|
$(HOST_LINK) $(LFLAGS) -o$@ $(PPMWRIT2) $(TEXTIO2)
|
|
|
|
$(HOST_O)gifread.o: $(CONFIG_H) $(WSHR)/tile.h $(WSHR)/gifread.c
|
|
|
|
$(HOST_O)gifread2.o: $(CONFIG_H) $(WSHR)/tile.h $(WSHR)/gifread.c
|
|
$(HOST_CC) $(cflags) -DTILE_X=8 -o$@ $(WSHR)/gifread.c
|
|
|
|
ppmwrite.c: $(WSHR)/ppmwrite.c
|
|
cp $(WSHR)/ppmwrite.c .
|
|
|
|
$(HOST_O)ppmwrite.o: $(CONFIG_H) $(WSHR)/tile.h
|
|
|
|
$(HOST_O)ppmwrit2.o: $(CONFIG_H) $(WSHR)/tile.h ppmwrite.c
|
|
$(HOST_CC) $(cflags) -DTILE_X=8 -o$@ ppmwrite.c
|
|
|
|
#
|
|
# Optional tile viewer (development sources only)
|
|
#
|
|
|
|
$(U)viewtib: $(HOST_O)viewtib.o
|
|
$(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)viewtib.o $(LIBRARIES)
|
|
|
|
$(HOST_O)viewtib.o: $(MSYS)/viewtib.c
|
|
|
|
endif
|
|
|
|
#==========================================
|
|
# Other host Util Dependencies.
|
|
#==========================================
|
|
|
|
$(HOST_O)monst.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/monsym.h \
|
|
$(INCL)/color.h monst.c
|
|
$(HOST_CC) $(cflags) -o$@ monst.c
|
|
|
|
$(HOST_O)objects.o: $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \
|
|
$(INCL)/prop.h $(INCL)/color.h objects.c
|
|
$(HOST_CC) $(cflags) -o$@ objects.c
|
|
|
|
$(HOST_O)panic.o: $(CONFIG_H) $(U)panic.c
|
|
$(HOST_CC) $(cflags) -o$@ $(U)panic.c
|
|
|
|
#==========================================
|
|
# Housekeeping for host side.
|
|
#==========================================
|
|
|
|
clean:
|
|
rm ./host_o/*.o
|
|
if [ -f $(HOST_O)prereq.tag ]; then rm $(HOST_O)prereq.tag; fi;
|
|
if [ -f hobj.tag ]; then rm hobj.tag; fi;
|
|
if [ -f $(HOST_O)utility.tag ]; then rm $(HOST_O)utility.tag; fi;
|
|
if [ -f temp.a ]; then rm temp.a; fi;
|
|
|
|
spotless: clean
|
|
|
|
if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi;
|
|
## if [ -f $(U)dgn_flex.c ]; then rm $(U)dgn_flex.c; fi;
|
|
## if [ -f $(U)dgn_lex.c ]; then rm $(U)dgn_lex.c; fi;
|
|
# if [ -f $(U)makedefs ]; then rm $(U)makedefs; fi;
|
|
## if [ -f $(U)dgn_comp ]; then rm $(U)dgn_comp; fi;
|
|
# if [ -f $(U)recover.exe ]; then rm $(U)recover.exe; fi;
|
|
# if [ -f $(U)tilemap ]; then rm $(U)tilemap; fi;
|
|
# if [ -f $(U)tile2bmp ]; then rm $(U)tile2bmp; fi;
|
|
## if [ -f $(U)tile2bin ]; then rm $(U)tile2bin; fi;
|
|
## if [ -f $(U)til2bin2 ]; then rm $(U)til2bin2; fi;
|
|
## if [ -f $(U)thintile ]; then rm $(U)thintile; fi;
|
|
# if [ -f $(U)dlb_main ]; then rm $(U)dlb_main; fi;
|
|
# if [ -f $(INCL)/vis_tab.h ]; then rm $(INCL)/vis_tab.h; fi;
|
|
# if [ -f $(INCL)/onames.h ]; then rm $(INCL)/onames.h; fi;
|
|
# if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi;
|
|
# if [ -f $(INCL)/date.h ]; then rm $(INCL)/date.h; fi;
|
|
## if [ -f $(INCL)/dgn_comp.h ]; then rm $(INCL)/dgn_comp.h; fi;
|
|
## if [ -f $(INCL)/lev_comp.h ]; then rm $(INCL)/lev_comp.h; fi;
|
|
# if [ -f $(SRC)/vis_tab.c ]; then rm $(SRC)/vis_tab.c; fi;
|
|
# if [ -f $(SRC)/tile.c ]; then rm $(SRC)/tile.c; fi;
|
|
# if [ -f $(DAT)/options ]; then rm $(DAT)/options; fi;
|
|
# if [ -f $(DAT)/data ]; then rm $(DAT)/data; fi;
|
|
# if [ -f $(DAT)/rumors ]; then rm $(DAT)/rumors; fi;
|
|
## if [ -f $(DAT)/dungeon.pdf ]; then rm $(DAT)/dungeon.pdf; fi;
|
|
## if [ -f $(DAT)/dungeon ]; then rm $(DAT)/dungeon; fi;
|
|
# if [ -f $(DAT)/oracles ]; then rm $(DAT)/oracles; fi;
|
|
## if [ -f $(DAT)/quest.dat ]; then rm $(DAT)/quest.dat; fi;
|
|
# if [ -f $(DAT)/bogusmon ]; then rm $(DAT)/bogusmon; fi;
|
|
# if [ -f $(DAT)/engrave ]; then rm $(DAT)/engrave; fi;
|
|
# if [ -f $(DAT)/epitaph ]; then rm $(DAT)/epitaph; fi;
|
|
# if [ -f $(DAT)/dlb.lst ]; then rm $(DAT)/dlb.lst; fi;
|
|
# if [ -f $(DAT)/nhdat ]; then rm $(DAT)/nhdat; fi;
|
|
# if [ -f $(DAT)/*.lev ]; then rm $(DAT)/*.lev; fi;
|
|
# if [ -f $(TILE_BMP) ]; then rm $(TILE_BMP); fi;
|
|
# if [ -f $(WSHR)/monthin.txt ]; then rm $(WSHR)/monthin.txt; fi;
|
|
# if [ -f $(WSHR)/objthin.txt ]; then rm $(WSHR)/objthin.txt; fi;
|
|
# if [ -f $(WSHR)/oththin.txt ]; then rm $(WSHR)/oththin.txt; fi;
|
|
|
|
#==========================================
|
|
# Game Dependencies
|
|
#==========================================
|
|
|
|
# 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
|
|
$(HOST_CC) $(cflags) -I../sys/msdos -o$@ dlb.c
|
|
$(HOST_O)monst.o: monst.c $(CONFIG_H) $(INCL)/permonst.h $(INCL)/align.h \
|
|
$(INCL)/monattk.h $(INCL)/monflag.h $(INCL)/monsym.h \
|
|
$(INCL)/color.h
|
|
$(HOST_O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \
|
|
$(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h
|
|
$(HOST_O)tileset.o: $(WSHR)/tileset.c $(HACK_H)
|
|
$(HOST_O)bmptiles.o: $(WSHR)/bmptiles.c $(INCL)/config.h $(INCL)/tileset.h $(INCL)/integer.h
|
|
$(HOST_O)giftiles.o: $(WSHR)/giftiles.c $(INCL)/config.h $(INCL)/tileset.h $(INCL)/integer.h
|
|
|
|
# end of file
|
|
|