GIT_AVAILABLE=Y
!ENDIF
+#==============================================================================
+#
+# The version of the game this Makefile was designed for
+NETHACK_VERSION="3.7.0"
+
+# A brief version for use in macros
+NHV=$(NETHACK_VERSION:.=)
+NHV=$(NHV:"=)
+
+#
+# Source directories. Makedefs hardcodes these, don't change them.
+#
+
+INCL = ..\include # NetHack include files
+DAT = ..\dat # NetHack data files
+DOC = ..\doc # NetHack documentation files
+UTIL = ..\util # Utility source
+SRC = ..\src # Main source
+SSYS = ..\sys\share # Shared system files
+MSWSYS = ..\sys\windows # MS windows specific files
+TTY = ..\win\tty # window port files (tty)
+MSWIN = ..\win\win32 # window port files (win32)
+WCURSES = ..\win\curses # window port files (curses)
+WSHR = ..\win\share # Tile support files
+QT = ..\win\Qt # QT support files
+X11 = ..\win\X11 # X11 support files
+LIBDIR = ..\lib # libraries and external bits
+SUBM = ..\submodules # NetHack git submodules
+
+#
+# Object directory.
+#
+
+OBJ = o
+
#==============================================================================
# Sanity checks for prerequisite Lua and pdcurses
#
# First, Lua
!IF "$(INTERNET_AVAILABLE)" == "Y"
!IF "$(GIT_AVAILABLE)" == "Y"
-LUATOP=..\submodules\lua
+LUATOP=$(SUBM)\lua
LUASRC=$(LUATOP)
LUA_MAY_PROCEED=Y
!ELSE # GIT_AVAILABLE
-LUATOP = ..\lib\lua-$(LUAVER)
+LUATOP = $(LIBDIR)\lua-$(LUAVER)
LUASRC = $(LUATOP)\src
LUA_MAY_PROCEED=Y
!ENDIF # GIT_AVAILABLE
# method (git or download). Check to see if it is available already, with
# precedence given to ../submodules, then ../lib.
#
-!IF EXIST("..\submodules\lua\lua.h")
-LUATOP=..\submodules\lua
+!IF EXIST("$(SUBM)\lua\lua.h")
+LUATOP=$(SUBM)\lua
LUASRC=$(LUATOP)
LUA_MAY_PROCEED=Y
-!ELSEIF EXIST("..\lib\lua-$(LUAVER)\src\lua.h")
-LUATOP = ..\lib\lua-$(LUAVER)
+!ELSEIF EXIST("$(LIBDIR)\lua-$(LUAVER)\src\lua.h")
+LUATOP = $(LIBDIR)\lua-$(LUAVER)
LUASRC = $(LUATOP)\src
LUA_MAY_PROCEED=Y
!ENDIF # Lua sources
!IF "$(INTERNET_AVAILABLE)" != "Y"
!MESSAGE Your Makefile settings do not allow use of the internet to obtain Lua
!ENDIF # INTERNET_AVAILABLE
-!MESSAGE and no copy of Lua was found in either ..\submodules\lua or ..\lib\lua-$(LUAVER).
+!MESSAGE and no copy of Lua was found in either $(SUBM)\lua or $(LIBDIR)\lua-$(LUAVER).
!MESSAGE Change your nmake command line to include:
!MESSAGE GIT=1
!MESSAGE or modify your Makefile to set the following:
# Now, pdcurses
!IF "$(INTERNET_AVAILABLE)" == "Y"
!IF "$(GIT_AVAILABLE)" == "Y"
-PDCURSES_TOP=..\submodules\pdcurses
+PDCURSES_TOP=$(SUBM)\pdcurses
ADD_CURSES=Y
!ELSE # GIT_AVAILABLE
-PDCURSES_TOP=..\lib\pdcurses
+PDCURSES_TOP=$(LIBDIR)\pdcurses
ADD_CURSES=Y
!ENDIF # GIT_AVAILABLE
!ELSE # INTERNET_AVAILABLE is not Y below
# the expected locations already, with precedence given to ../submodules,
# then ../lib.
#
-!IF EXIST("..\submodules\pdcurses\curses.h")
-PDCURSES_TOP=..\submodules\pdcurses
+!IF EXIST("$(SUBM)\pdcurses\curses.h")
+PDCURSES_TOP=$(SUBM)\pdcurses
ADD_CURSES=Y
-!ELSEIF EXIST("..\lib\pdcurses\curses.h")
-PDCURSES_TOP=..\lib\pdcurses
+!ELSEIF EXIST("$(LIBDIR)\pdcurses\curses.h")
+PDCURSES_TOP=$(LIBDIR)\pdcurses
ADD_CURSES=Y
!ENDIF # pdcurses sources available somewhere
!IF "$(ADD_CURSES)" == "Y"
#TEST_CROSSCOMPILE=Y
-#==============================================================================
-#
-# The version of the game this Makefile was designed for
-NETHACK_VERSION="3.7.0"
-
-# A brief version for use in macros
-NHV=$(NETHACK_VERSION:.=)
-NHV=$(NHV:"=)
-
-#
-# Source directories. Makedefs hardcodes these, don't change them.
-#
-
-INCL = ..\include # NetHack include files
-DAT = ..\dat # NetHack data files
-DOC = ..\doc # NetHack documentation files
-UTIL = ..\util # Utility source
-SRC = ..\src # Main source
-SSYS = ..\sys\share # Shared system files
-MSWSYS = ..\sys\windows # MS windows specific files
-TTY = ..\win\tty # window port files (tty)
-MSWIN = ..\win\win32 # window port files (win32)
-WCURSES = ..\win\curses # window port files (curses)
-WSHR = ..\win\share # Tile support files
-QT = ..\win\Qt # QT support files
-X11 = ..\win\X11 # X11 support files
-
-#
-# Object directory.
-#
-
-OBJ = o
-
#
#==========================================
# Exe File Info.
LUAVER=5.4.4
!ENDIF
-LUALIB = $(O)lua$(LUAVER)-static.lib
-LUADLL = $(O)lua$(LUAVER).dll
+LUALIB = $(LIBDIR)\lua$(LUAVER)-static.lib
+LUADLL = $(LIBDIR)\lua$(LUAVER).dll
LUAINCL = /I$(LUASRC)
LUATARGETS = lua.exe $(LUADLL) $(LUALIB)
PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o $(O)pdcscrn.o \
$(O)pdcsetsc.o $(O)pdcutil.o
-PDCLIB = $(O)pdcurses.lib
+PDCLIB = $(LIBDIR)\pdcurses.lib
PDCINCL = /I$(PDCURSES_TOP) /I$(PDCSRC) /I$(PDCWINCON)
$(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \
$(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \
$(VOBJ26) $(VOBJ27) $(VOBJ28) $(VOBJ29) $(VOBJ30) \
- $(REGEX) $(CURSESOBJ)
+ $(REGEX)
WINDHDR = $(MSWSYS)\win10.h $(MSWSYS)\winos.h $(MSWSYS)\win32api.h
#
#CTAGSCMD=ctags-orig.exe
!IF "$(CI_BUILD_DIR)" != ""
-CTAGSCMD=..\lib\ctags\ctags.exe
+CTAGSCMD=$(LIBDIR)\ctags\ctags.exe
!ELSE
CTAGSCMD=..\..\..\ctags\ctags.exe
!ENDIF
TINC = $(INCL:\=/)
TSRC = $(SRC:\=/)
-
-cc=cl
-cpp=cpp
-link=link
-rc=Rc
+cc=cl.exe
+cpp=cpp.exe
+link=link.exe
+librarian=lib.exe
+rc=Rc.exe
# Before we get started, this section is used to determine the version of
# Visual Studio we are using. We set VSVER to 0000 to flag any version that
#==========================================
{$(WCURSES)}.c{$(OBJ)}.o:
- $(cc) -DPDC_NCMOUSE $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $<
+ @$(cc) -DPDC_NCMOUSE $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $<
#{$(WCURSES)}.txt{$(DAT)}.txt:
# @copy $< $@
all : install
-install: $(LUASRC)\lua.h $(PDCDEP) $(INCL)\nhlua.h $(O)envchk.tag $(O)obj.tag $(O)utility.tag \
+install: $(O)envchk.tag $(O)libdir.tag $(O)objdir.tag $(LUASRC)\lua.h $(PDCDEP) \
+ $(INCL)\nhlua.h $(O)utility.tag \
$(DAT)\data $(DAT)\rumors $(DAT)\oracles $(DAT)\engrave \
$(DAT)\epitaph $(DAT)\bogusmon $(GAMEDIR)\NetHack.exe \
$(GAMEDIR)\NetHackW.exe $(O)install.tag
$(LUASRC)\lua.h:
git submodule init ../submodules/lua
git submodule update --remote ../submodules/lua
+#
+#aka PDCDEP
$(PDCURSES_TOP)\curses.h:
git submodule init ../submodules/pdcurses
git submodule update --remote ../submodules/pdcurses
CURLPDCDST=pdcurses.zip
$(LUASRC)\lua.h:
- cd ..\lib
+ cd $(LIBDIR)
curl -L $(CURLLUASRC) -o $(CURLLUADST)
tar -xvf $(CURLLUADST)
cd ..\src
$(PDCURSES_TOP)\curses.h:
- cd ..\lib
+ cd $(LIBDIR)
curl -L $(CURLPDCSRC) -o $(CURLPDCDST)
if not exist pdcurses\*.* mkdir pdcurses
tar -C pdcurses --strip-components=1 -xvf $(CURLPDCDST)
$(GAMEDIR)\NetHack.exe : $(O)gamedir.tag $(O)tile.o $(O)consoletty.o $(O)guistub.o \
- $(ALLOBJ) $(TTYOBJ) $(O)date.o $(O)console.res \
- $(LUATARGETS) $(PDCLIB)
+ $(ALLOBJ) $(CURSESOBJ) $(TTYOBJ) $(O)date.o $(O)console.res \
+ $(LUALIB) $(PDCLIB)
@if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
@echo Linking $(@:\=/)
$(link) $(lflagsBuild) $(conlflags) /STACK:2048 /PDB:$(GAMEDIR)\$(@B).PDB /MAP:$(O)$(@B).MAP \
$(conlibs) $(BCRYPT) -out:$@ @<<$(@B).lnk
$(GAMEOBJ)
$(TTYOBJ)
+ $(CURSESOBJ)
$(O)consoletty.o
$(O)tile.o
$(O)guistub.o
$(GAMEDIR)\NetHackW.exe : $(O)gamedir.tag $(O)tile.o $(O)ttystub.o \
$(ALLOBJ) $(GUIOBJ) $(O)date.o $(O)NetHackW.res \
$(O)gamedir.tag \
- $(LUATARGETS)
+ $(LUALIB)
@if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
@echo Linking $(@:\=/)
$(link) $(lflagsBuild) $(guilflags) /STACK:2048 /PDB:$(GAMEDIR)\$(@B).PDB \
- /MAP:$(O)$(@B).MAP $(LIBS) $(PDCLIB) $(LUALIB) \
+ /MAP:$(O)$(@B).MAP $(LIBS) $(LUALIB) \
$(guilibs) $(COMCTRL) $(BCRYPT) -out:$@ @<<$(@B).lnk
$(GAMEOBJ)
$(GUIOBJ)
@echo directory created > $@
$(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\oracles \
- $(O)sp_lev.tag $(DLB)
+ $(DLB)
! IF ("$(USE_DLB)"=="Y")
copy nhdat$(NHV) $(GAMEDIR)
copy $(DAT)\license $(GAMEDIR)
if exist $(U)recover.exe copy $(U)recover.exe $(GAMEDIR)
if exist $(DOC)\recover.txt copy $(DOC)\recover.txt $(GAMEDIR)\recover.txt
-$(O)sp_lev.tag:
- echo sp_levs done > $(O)sp_lev.tag
-
$(O)utility.tag: $(INCL)\nhlua.h $(U)tile2bmp.exe $(U)makedefs.exe
@echo utilities made >$@
@echo utilities made.
$(MSWIN)\mnselcnt.bmp $(MSWIN)\mnunsel.bmp \
$(MSWIN)\petmark.bmp $(MSWIN)\pilemark.bmp $(MSWIN)\NetHack.ico \
$(MSWIN)\rip.bmp $(MSWIN)\splash.bmp
- @$(rc) -r -fo$@ -i$(MSWIN) -dNDEBUG $(MSWIN)\NetHackW.rc
+ @echo Building resource file $@ from $**
+ @$(rc) -nologo -r -fo$@ -i$(MSWIN) -dNDEBUG $(MSWIN)\NetHackW.rc
$(O)console.res: $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico
- @$(rc) -r -fo$@ -i$(MSWSYS) -dNDEBUG $(MSWSYS)\console.rc
+ @echo Building resource file $@ from $**
+ @$(rc) -nologo -r -fo$@ -i$(MSWSYS) -dNDEBUG $(MSWSYS)\console.rc
#
# Secondary Targets.
#==========================================
$(U)nhsizes3.exe: $(O)nhsizes3.o
@echo Linking $(@:\=/)
- $(link) $(lflagsBuild) -out:$@ $(O)nhsizes.o $(O)panic$(HOST).o $(O)alloc$(HOST).o
+ @$(link) $(lflagsBuild) -out:$@ $(O)nhsizes.o $(O)panic$(HOST).o $(O)alloc$(HOST).o
$(O)nhsizes3.o: $(CONFIG_H) nhsizes3.c
@$(cc) $(cflagsBuild) $(CROSSCOMPILE) -Fo$@ nhsizes3.c
# We build a temporary Makefile on-the-fly for compiling date.c and
# invoke nmake again.
#
-$(O)date.o: $(HACKINCL) $(HACKSRC) $(HACKOBJ) $(ALLOBJ)
+$(O)date.o: $(HACKINCL) $(HACKSRC) $(HACKOBJ) $(ALLOBJ) $(CURSESOBJ)
!IF "$(GIT_AVAILABLE)" == "1"
@git rev-parse --verify HEAD 2>&1 >$(O)date1.tmp
@git rev-parse --abbrev-ref HEAD 2>&1 >$(O)date2.tmp
@$(cc) $(cflagsBuild) $(CROSSCOMPILE) /D_CRT_SECURE_NO_DEPRECATE -Fo$@ $(SSYS)\uudecode.c
$(MSWSYS)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu
- chdir $(MSWSYS)
- ..\..\util\uudecode.exe nhico.uu
- chdir ..\..\src
+ @chdir $(MSWSYS)
+ @..\..\util\uudecode.exe nhico.uu
+ @chdir ..\..\src
$(MSWIN)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu
- chdir $(MSWIN)
- ..\..\util\uudecode.exe ../../sys/windows/nhico.uu
- chdir ..\..\src
+ @chdir $(MSWIN)
+ @..\..\util\uudecode.exe ../../sys/windows/nhico.uu
+ @chdir ..\..\src
$(MSWIN)\mnsel.bmp: $(U)uudecode.exe $(MSWIN)\mnsel.uu
- chdir $(MSWIN)
- ..\..\util\uudecode.exe mnsel.uu
- chdir ..\..\src
+ @chdir $(MSWIN)
+ @..\..\util\uudecode.exe mnsel.uu
+ @chdir ..\..\src
$(MSWIN)\mnselcnt.bmp: $(U)uudecode.exe $(MSWIN)\mnselcnt.uu
- chdir $(MSWIN)
- ..\..\util\uudecode.exe mnselcnt.uu
- chdir ..\..\src
+ @chdir $(MSWIN)
+ @..\..\util\uudecode.exe mnselcnt.uu
+ @chdir ..\..\src
$(MSWIN)\mnunsel.bmp: $(U)uudecode.exe $(MSWIN)\mnunsel.uu
- chdir $(MSWIN)
- ..\..\util\uudecode.exe mnunsel.uu
- chdir ..\..\src
+ @chdir $(MSWIN)
+ @..\..\util\uudecode.exe mnunsel.uu
+ @chdir ..\..\src
$(MSWIN)\petmark.bmp: $(U)uudecode.exe $(MSWIN)\petmark.uu
- chdir $(MSWIN)
- ..\..\util\uudecode.exe petmark.uu
- chdir ..\..\src
+ @chdir $(MSWIN)
+ @..\..\util\uudecode.exe petmark.uu
+ @chdir ..\..\src
$(MSWIN)\pilemark.bmp: $(U)uudecode.exe $(MSWIN)\pilemark.uu
- chdir $(MSWIN)
- ..\..\util\uudecode.exe pilemark.uu
- chdir ..\..\src
+ @chdir $(MSWIN)
+ @..\..\util\uudecode.exe pilemark.uu
+ @chdir ..\..\src
$(MSWIN)\rip.bmp: $(U)uudecode.exe $(MSWIN)\rip.uu
- chdir $(MSWIN)
- ..\..\util\uudecode.exe rip.uu
- chdir ..\..\src
+ @chdir $(MSWIN)
+ @..\..\util\uudecode.exe rip.uu
+ @chdir ..\..\src
$(MSWIN)\splash.bmp: $(U)uudecode.exe $(MSWIN)\splash.uu
- chdir $(MSWIN)
- ..\..\util\uudecode.exe splash.uu
- chdir ..\..\src
+ @chdir $(MSWIN)
+ @..\..\util\uudecode.exe splash.uu
+ @chdir ..\..\src
#=================================================
# Create directory for holding object files
#=================================================
-$(O)obj.tag:
+$(O)objdir.tag:
@if not exist $(OBJ)\*.* echo creating directory $(OBJ:\=/)
@if not exist $(OBJ)\*.* mkdir $(OBJ)
@echo directory created >$@
+#==================================================================
+# Create directory for holding built libraries (among other things)
+#==================================================================
+
+$(O)libdir.tag:
+ @if not exist $(LIBDIR)\*.* echo creating directory $(LIB:\=/)
+ @if not exist $(LIBDIR)\*.* mkdir $(LIBDIR)
+ @echo directory created >$@
+
#==========================================
# Notify of any CL environment variables
# in effect since they change the compiler
# options.
#==========================================
-$(O)envchk.tag: $(O)obj.tag
+$(O)envchk.tag: $(O)objdir.tag
! IF "$(TARGET_CPU)"=="x64"
@echo Windows x64 64-bit target build
! ELSE
# @echo Warning, the CL Environment variable is defined:
# @echo CL=$(CL)
! ENDIF
- echo envchk >$@
+ @echo "cflags=$(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET)"
+ @echo envchk >$@
#==========================================
#=========== SECONDARY TARGETS ============
fetch-Lua: fetch-actual-Lua
fetch-actual-Lua:
- @if not exist ..\lib\*.* mkdir ..\lib
- cd ..\lib
+ @if not exist $(LIBDIR)\*.* mkdir $(LIBDIR)
+ cd $(LIBDIR)
curl -R -O http://www.lua.org/ftp/lua-$(LUAVER).tar.gz
tar zxf lua-$(LUAVER).tar.gz
if exist lua-$(LUAVER).tar.gz del lua-$(LUAVER).tar.gz
if exist lua-$(LUAVER).tar del lua-$(LUAVER).tar
cd ..\src
- @echo Lua has been fetched into ..\lib\lua-$(LUAVER)
+ @echo Lua has been fetched into $(LIBDIR)\lua-$(LUAVER)
fetch-pdcurses:
- @if not exist ..\lib\*.* mkdir ..\lib
- cd ..\lib
+ @if not exist $(LIBDIR)\*.* mkdir $(LIBDIR)
+ cd $(LIBDIR)
curl -L -R https://codeload.github.com/wmcbrine/PDCurses/zip/master -o pdcurses.zip
powershell -command "Expand-Archive -Path .\pdcurses.zip -DestinationPath ./pdcurses-temp"
if exist .\pdcurses\* rd .\pdcurses /s /Q
if exist .\pdcurses-temp\* rd .\pdcurses-temp /s /Q
if exist .\pdcurses.zip del .\pdcurses.zip
cd ..\src
- @echo pdcurses has been fetched into ..\lib\pdcurses
+ @echo pdcurses has been fetched into $(LIBDIR)\pdcurses
#==========================================
# DLB utility and nhdatNNN file creation
nhdat$(NHV): $(U)dlb.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) $(DAT)\quest.lua \
$(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp $(DAT)\keyhelp \
$(DAT)\history $(DAT)\opthelp $(DAT)\optmenu $(DAT)\wizhelp $(DAT)\porthelp \
- $(DAT)\license $(DAT)\engrave $(DAT)\epitaph $(DAT)\bogusmon $(DAT)\tribute $(O)sp_lev.tag
- cd $(DAT)
- echo data >dlb.lst
- echo oracles >>dlb.lst
- if exist options echo options >>dlb.lst
- if exist ttyoptions echo ttyoptions >>dlb.lst
- if exist guioptions echo guioptions >>dlb.lst
- if exist porthelp echo porthelp >>dlb.lst
- echo rumors >>dlb.lst
- echo help >>dlb.lst
- echo hh >>dlb.lst
- echo cmdhelp >>dlb.lst
- echo keyhelp >>dlb.lst
- echo history >>dlb.lst
- echo opthelp >>dlb.lst
- echo optmenu >>dlb.lst
- echo wizhelp >>dlb.lst
- echo license >>dlb.lst
- echo engrave >>dlb.lst
- echo epitaph >>dlb.lst
- echo bogusmon >>dlb.lst
- echo tribute >>dlb.lst
- for %%N in (*.lua) do echo %%N >>dlb.lst
- $(U)dlb cIf dlb.lst $(SRC)\nhdat
- cd $(SRC)
+ $(DAT)\license $(DAT)\engrave $(DAT)\epitaph $(DAT)\bogusmon $(DAT)\tribute
+ @echo Building $@
+ @cd $(DAT)
+ @echo data >dlb.lst
+ @echo oracles >>dlb.lst
+ @if exist options @echo options >>dlb.lst
+ @if exist ttyoptions @echo ttyoptions >>dlb.lst
+ @if exist guioptions @echo guioptions >>dlb.lst
+ @if exist porthelp @echo porthelp >>dlb.lst
+ @echo rumors >>dlb.lst
+ @echo help >>dlb.lst
+ @echo hh >>dlb.lst
+ @echo cmdhelp >>dlb.lst
+ @echo keyhelp >>dlb.lst
+ @echo history >>dlb.lst
+ @echo opthelp >>dlb.lst
+ @echo optmenu >>dlb.lst
+ @echo wizhelp >>dlb.lst
+ @echo license >>dlb.lst
+ @echo engrave >>dlb.lst
+ @echo epitaph >>dlb.lst
+ @echo bogusmon >>dlb.lst
+ @echo tribute >>dlb.lst
+ @for %%N in (*.lua) do @echo %%N >>dlb.lst
+ @$(U)dlb cIf dlb.lst $(SRC)\nhdat
+ @cd $(SRC)
#==========================================
# Recover Utility
$(U)recover.exe: $(RECOVOBJS)
@echo Linking $(@:\=/)
- $(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(RECOVOBJS)
+ @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(RECOVOBJS)
$(O)recover.o: $(CONFIG_H) $(U)recover.c $(MSWSYS)\win32api.h
@$(cc) $(cflagsBuild) -Fo$@ $(U)recover.c
# PDCurses
#===============================================================================
-$(O)pdcurses.lib : $(PDCLIBOBJS) $(PDCOBJS)
- lib -nologo /out:$@ $(PDCLIBOBJS) $(PDCOBJS)
+$(LIBDIR)\pdcurses.lib : $(PDCLIBOBJS) $(PDCOBJS)
+ @echo Building library $@ from $**
+ @$(librarian) -nologo /out:$@ $(PDCLIBOBJS) $(PDCOBJS)
$(O)pdcscrn.o : $(PDCURSES_HEADERS) $(PDCWINCON)\pdcscrn.c $(MSWSYS)\stub-pdcscrn.c
@$(cc) $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $(MSWSYS)\stub-pdcscrn.c
#===============================================================================
lua.exe: $(O)lua.o $(LUALIB)
- link /OUT:$@ $(O)lua.o $(LUALIB)
+ @echo Linking $(@:\=/)
+ @$(link) /OUT:$@ $(O)lua.o $(LUALIB)
#luac.exe: $(O)luac.o $(LUALIB)
-# link /OUT:$@ $(O)luac.o $(LUALIB)
+# @echo Linking $(@:\=/)
+# @$(link) /OUT:$@ $(O)luac.o $(LUALIB)
-$(O)lua$(LUAVER).dll: $(LUAOBJFILES)
- link /DLL /IMPLIB:lua$(LUAVER).lib /OUT:$@ $(LUAOBJFILES)
+$(LIBDIR)\lua$(LUAVER).dll: $(LUAOBJFILES)
+ @echo Linking $(@:\=/)
+ @$(link) /DLL /IMPLIB:$(LIBDIR)\lua$(LUAVER).lib /OUT:$@ $(LUAOBJFILES)
-$(O)lua$(LUAVER)-static.lib: $(LUAOBJFILES)
- lib /OUT:$@ $(LUAOBJFILES)
+$(LIBDIR)\lua$(LUAVER)-static.lib: $(LUAOBJFILES)
+ @echo Building library $@ from $**
+ @$(librarian) /OUT:$@ $(LUAOBJFILES)
$(O)lua.o: $(LUASRC)\lua.c
#$(O)luac.o: $(LUASRC)\luac.c
if exist $(DAT)\engrave del $(DAT)\engrave
if exist $(DAT)\epitaph del $(DAT)\epitaph
if exist $(DAT)\bogusmon del $(DAT)\bogusmon
- if exist $(DAT)\dlb.lst del $(DAT)\dlb.lst
if exist $(DAT)\porthelp del $(DAT)\porthelp
- if exist $(O)sp_lev.tag del $(O)sp_lev.tag
if exist nhdat$(NHV). del nhdat$(NHV).
- if exist $(O)obj.tag del $(O)obj.tag
+ if exist $(O)objdir.tag del $(O)objdir.tag
+ if exist $(O)libdir.tag del $(O)libdir.tag
if exist $(O)gamedir.tag del $(O)gamedir.tag
if exist $(O)nh*key.lib del $(O)nh*key.lib
if exist $(O)nh*key.exp del $(O)nh*key.exp
if exist $(U)uudecode.exe del $(U)uudecode.exe
if exist $(U)dlb.exe del $(U)dlb.exe
!IF "$(ADD_CURSES)" == "Y"
- if exist $(O)pdcurses.lib del $(O)pdcurses.lib
+ if exist $(PDCLIB) del $(PDCLIB)
!ENDIF
+ if exist $(LUALIB) del $(LUALIB)
if exist $(DAT)\oracles del $(DAT)\oracles
if exist $(DAT)\rumors del $(DAT)\rumors
if exist $(DAT)\options del $(DAT)\options
if exist $(SRC)\*.lnk del $(SRC)\*.lnk
if exist $(SRC)\*.map del $(SRC)\*.map
if exist $(O)install.tag del $(O)install.tag
- if exist $(O)dlb.MAP del $(O)dlb.MAP
- if exist $(O)dlb.PDB del $(O)dlb.PDB
- if exist $(O)gamedir.tag del $(O)gamedir.tag
- if exist $(O)makedefs.MAP del $(O)makedefs.MAP
- if exist $(O)makedefs.PDB del $(O)makedefs.PDB
- if exist $(O)NetHack.MAP del $(O)NetHack.MAP
- if exist $(O)envchk.tag del $(O)envchk.tag
- if exist $(O)obj.tag del $(O)obj.tag
- if exist $(O)sp_lev.tag del $(O)sp_lev.tag
- if exist $(O)uudecode.MAP del $(O)uudecode.MAP
- if exist $(O)uudecode.PDB del $(O)uudecode.PDB
- if exist $(SRC)\tiles.bmp del $(SRC)\tiles.bmp
- if exist $(O)console.res del $(O)console.res
- if exist $(O)NetHack.res del $(O)NetHack.res
- if exist $(O)NetHackW.res del $(O)NetHackW.res
+ if exist $(O)dlb.MAP del $(O)dlb.MAP
+ if exist $(DAT)\dlb.lst del $(DAT)\dlb.lst
+ if exist $(O)dlb.PDB del $(O)dlb.PDB
+ if exist $(O)gamedir.tag del $(O)gamedir.tag
+ if exist $(O)makedefs.MAP del $(O)makedefs.MAP
+ if exist $(O)makedefs.PDB del $(O)makedefs.PDB
+ if exist $(O)NetHack.MAP del $(O)NetHack.MAP
+ if exist $(O)envchk.tag del $(O)envchk.tag
+ if exist $(O)objdir.tag del $(O)objdir.tag
+ if exist $(O)sp_lev.tag del $(O)sp_lev.tag
+ if exist $(O)uudecode.MAP del $(O)uudecode.MAP
+ if exist $(O)uudecode.PDB del $(O)uudecode.PDB
+ if exist $(SRC)\tiles.bmp del $(SRC)\tiles.bmp
+ if exist $(O)console.res del $(O)console.res
+ if exist $(O)NetHack.res del $(O)NetHack.res
+ if exist $(O)NetHackW.res del $(O)NetHackW.res
#===================================================================
# OTHER DEPENDENCIES