#==========================================
#
ifeq "$(ADD_CURSES)" "Y"
-#CURSESDEF=-D"PDC_DLL_BUILD" -D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
else
CURSDEF=
CURSESLIB=
-CURSESINCL=
endif
ifneq "$(ADD_CURSES)" "Y"
INCLDIR=-I../include -I../sys/winnt
else
-INCLDIR=-I../include -I../sys/winnt -I$(CURSESINCL)
+INCLDIR=-I../include -I../sys/winnt
endif
#==========================================
$(OBJ)/%.o : $(WSHR)/%.c
$(cc) $(CFLAGS) -o$@ $<
-$(INCL)/%.h : $(WSHR)/%.h
- @copy $< $@
+#$(INCL)/%.h : $(WSHR)/%.h
+# @copy $< $@
#{$(WSHR)}.txt{$(DAT)}.txt:
# @copy $< $@
#LEX = lex
#LEX = flex
LEX=
-export YACC
-export LEX
#
# - Specify your flex skeleton file (if needed).
YTABH = y_tab.h
LEXYYC = lexyy.c
+export YACC
+export LEX
+export FLEXSKEL
+export YTABC
+export YTABH
+export LEXYYC
#==========================================
# Rules for files in win/Qt4
$(MSWIN)/mnselcnt.bmp $(MSWIN)/mnunsel.bmp \
$(MSWIN)/petmark.bmp $(MSWIN)/pilemark.bmp $(MSWIN)/NetHack.ico $(MSWIN)/rip.bmp \
$(MSWIN)/splash.bmp
- @$(rc) -o$@ --include-dir $(MSWIN) -i $(MSWIN)/winhack.rc
+ $(rc) -o$@ --include-dir $(MSWIN) -i $(MSWIN)/winhack.rc
$(O)conres.o: $(MSWSYS)/console.rc $(MSWSYS)/NetHack.ico
- @$(rc) -o$@ --include-dir $(MSWSYS) -i $(MSWSYS)/console.rc
+ $(rc) -o$@ --include-dir $(MSWSYS) -i $(MSWSYS)/console.rc
#==========================================
# The game targets.
@echo ----
objdir.tag:
- test -d $(OBJ) || echo creating directory $(OBJ)
- test -d $(OBJ) || mkdir $(OBJ)
- test -d $(OBJ) && echo directory created > $@
+ @test -d $(OBJ) || echo creating directory $(OBJ)
+ @test -d $(OBJ) || mkdir $(OBJ)
+ @test -d $(OBJ) && echo directory created > $@
#==========================================
#=========== SECONDARY TARGETS ============
#==========================================
$(U)makedefs.exe: $(MAKEOBJS)
- @$(link) $(LFLAGSU) -o$@ $(MAKEOBJS)
+ $(link) $(LFLAGSU) -o$@ $(MAKEOBJS)
$(O)makedefs.o: $(CONFIG_H) $(INCL)/monattk.h $(INCL)/monflag.h \
$(INCL)/objclass.h $(INCL)/monsym.h $(INCL)/qtext.h \
#==========================================
$(U)uudecode.exe: $(O)uudecode.o
- @$(link) $(LFLAGSU) -o$@ $(O)uudecode.o
+ $(link) $(LFLAGSU) -o$@ $(O)uudecode.o
$(O)uudecode.o: $(SSYS)/uudecode.c
$(U)levcomp.exe: $(LEVCOMPOBJS)
@echo Linking $@...
- @$(link) $(LFLAGSU) -o$@ $(LEVCOMPOBJS)
+ $(link) $(LFLAGSU) -o$@ $(LEVCOMPOBJS)
#==========================================
# Dungeon Compiler Stuff
$(U)dgncomp.exe: $(DGNCOMPOBJS)
@echo Linking $@...
@echo Linking $@...
- @$(link) $(LFLAGSU) -o$@ $(DGNCOMPOBJS)
+ $(link) $(LFLAGSU) -o$@ $(DGNCOMPOBJS)
#=================================================
# For a couple of devteam utilities
$(U)nhsizes.exe: $(O)nhsizes.o
@echo Linking $@...
- @$(link) $(LFLAGSU) -o$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o$(U)nhsizes.exe: $(O)nhsizes.o
+ $(link) $(LFLAGSU) -o$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o$(U)nhsizes.exe: $(O)nhsizes.o
$(U)nhsize2.exe: $(O)nhsizes2.o
@echo Linking $@...
- @$(link) $(LFLAGSU) -o$@ $(O)nhsizes2.o $(O)panic.o $(O)alloc.o
+ $(link) $(LFLAGSU) -o$@ $(O)nhsizes2.o $(O)panic.o $(O)alloc.o
$(O)nhsizes.o: $(CONFIG_H) nhsizes.c
$(cc) $(CFLAGSU) -o$@ nhsizes.c
#==========================================
$(U)dlb_main.exe: $(DLBOBJ) $(O)dlb.o
- @$(link) $(LFLAGSU) -o$@ $(O)dlb_main.o $(O)dlb.o $(O)alloc.o $(O)panic.o
+ $(link) $(LFLAGSU) -o$@ $(O)dlb_main.o $(O)dlb.o $(O)alloc.o $(O)panic.o
$(O)dlb.o: $(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)/dlb.h
@$(U)tilemap
$(U)tilemap.exe: $(O)tilemap.o
- @$(link) $(LFLAGSU) -o$@ $(O)tilemap.o
+ $(link) $(LFLAGSU) -o$@ $(O)tilemap.o
$(O)tilemap.o: $(WSHR)/tilemap.c $(HACK_H)
$(cc) $(CFLAGSU) -o$@ $(WSHR)/tilemap.c
$(U)gif2txt.exe: $(GIFREADERS) $(TEXT_IO)
@echo Linking $@...
- @$(link) $(LFLAGSU) -o$@ $(GIFREADERS) $(TEXT_IO)
+ $(link) $(LFLAGSU) -o$@ $(GIFREADERS) $(TEXT_IO)
$(U)gif2tx32.exe: $(GIFREADERS32) $(TEXT_IO32)
@echo Linking $@...
- @$(link) $(LFLAGSU) -o$@ $(GIFREADERS32) $(TEXT_IO32)
+ $(link) $(LFLAGSU) -o$@ $(GIFREADERS32) $(TEXT_IO32)
$(U)txt2ppm.exe: $(PPMWRITERS) $(TEXT_IO)
@echo Linking $@...
- @$(link) $(LFLAGSU) -o$@ $(PPMWRITERS) $(TEXT_IO)
+ $(link) $(LFLAGSU) -o$@ $(PPMWRITERS) $(TEXT_IO)
$(TILEBMP16): $(TILEUTIL16) $(TILEFILES)
$(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO)
@echo Linking $@...
- @$(link) $(LFLAGSU) -o$@ $(O)tile2bmp.o $(TEXT_IO)
+ $(link) $(LFLAGSU) -o$@ $(O)tile2bmp.o $(TEXT_IO)
$(U)til2bm32.exe: $(O)til2bm32.o $(TEXT_IO32)
@echo Linking $@...
- @$(link) $(LFLAGSU) -o$@ $(O)til2bm32.o $(TEXT_IO32)
+ $(link) $(LFLAGSU) -o$@ $(O)til2bm32.o $(TEXT_IO32)
$(O)tile2bmp.o: $(WSHR)/tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)/win32api.h
$(cc) $(CFLAGS) -mno-ms-bitfields -I$(WSHR) -o$@ $(WSHR)/tile2bmp.c
#include the following stub for proper linkage.
$(O)guistub.o: $(HACK_H) $(MSWSYS)/stubs.c
- @$(cc) $(CFLAGS) -DGUISTUB -o$@ $(MSWSYS)/stubs.c
+ $(cc) $(CFLAGS) -DGUISTUB -o$@ $(MSWSYS)/stubs.c
#if you aren't linking in the full tty then
#include the following stub for proper linkage.
$(O)ttystub.o: $(HACK_H) $(MSWSYS)/stubs.c
- @$(cc) $(CFLAGS) -DTTYSTUB -o$@ $(MSWSYS)/stubs.c
+ $(cc) $(CFLAGS) -DTTYSTUB -o$@ $(MSWSYS)/stubs.c
$(O)tile.o: $(SRC)/tile.c $(HACK_H)
OBJ = o
-cc=cl
-link=link
-rc=Rc
-
#
#==========================================
# Exe File Info.
#ZLIB = zlib.lib
-#==========================================
-#==========================================
-# Setting up the compiler and linker
-#==========================================
-#==========================================
-
-# 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
-# is too old or untested.
-#
-#NMAKE version 1414264330 is distributed with VS 15.7.5
-
-#!MESSAGE $(MAKEFLAGS)
-#!MESSAGE $(MAKEDIR)
-#!MESSAGE $(MAKE)
-
-MAKEVERSION=$(_NMAKE_VER:.= )
-MAKEVERSION=$(MAKEVERSION: =)
-#!MESSAGE $(_NMAKE_VER)
-#!MESSAGE $(MAKEVERSION)
-
-VSNEWEST=2017
-!IF ($(MAKEVERSION) < 1000000000)
-VSVER=0000 #untested ancient version
-!ELSEIF ($(MAKEVERSION) > 1000000000) && ($(MAKEVERSION) < 1100000000)
-VSVER=2010
-!ELSEIF ($(MAKEVERSION) > 1100000000) && ($(MAKEVERSION) < 1200000000)
-VSVER=2012
-!ELSEIF ($(MAKEVERSION) > 1200000000) && ($(MAKEVERSION) < 1400000000)
-VSVER=2013
-!ELSEIF ($(MAKEVERSION) > 1400000000) && ($(MAKEVERSION) < 1411000000)
-VSVER=2015
-!ELSEIF ($(MAKEVERSION) > 1411000000) && ($(MAKEVERSION) < 1414264331)
-VSVER=$(VSNEWEST)
-!ELSEIF ($(MAKEVERSION) > 1414264330)
-VSVER=2999 #untested future version
-!ENDIF
-
-!IF ($(VSVER) >= 2012)
-!MESSAGE Autodetected Visual Studio $(VSVER)
-!ELSEIF ($(VSVER) == 2999
-!MESSAGE The version of Visual Studio is newer than the most recent at
-!MESSAGE the time this Makefile was crafted (Visual Studio $(VSNEWEST)).
-!MESSAGE Because it is newer we'll proceed expecting that the
-!MESSAGE VS$(VSNEWEST) processing will still work.
-!ELSEIF ($(VSVER) == 0000)
-!MESSAGE The version of Visual Studio appears to be quite old, older
-!MESSAGE than VS2010 which is the oldest supported version by this
-!MESSAGE Makefile, so we'll stop now.
-!ERROR Untested old Visual Studio version with NMAKE $(_NMAKE_VER).
-!ENDIF
-
-!IF ($(VSVER) == 2010)
-# For VS2010 use "setenv /x86" or "setenv /x64" before invoking make process
-# DO NOT DELETE THE FOLLOWING LINE
-!include <win32.mak>
-! ENDIF
-
-#These will be in the environment variables with one of the VS2017
-#developer command prompts.
-#VSCMD_ARG_HOST_ARCH=x64
-#VSCMD_ARG_TGT_ARCH=x86
-
-!IFDEF VSCMD_ARG_HOST_ARCH
-!MESSAGE Host architecture is $(VSCMD_ARG_HOST_ARCH)
-!MESSAGE Target architecture is $(VSCMD_ARG_TGT_ARCH)
-! IFNDEF TARGET_CPU
-! IF "$(VSCMD_ARG_TGT_ARCH)"=="x64"
-TARGET_CPU=x64
-! ELSE
-TARGET_CPU=x86
-! ENDIF
-! ENDIF
-!ENDIF
-
-!IF "$(TARGET_CPU)" == ""
-TARGET_CPU=x86
-!ENDIF
-
-!IF ($(VSVER) == 2010)
-CL_RECENT=
-!ELSE
-! IF ($(VSVER) > 2010)
-CL_RECENT=-sdl
-! ENDIF
-!ENDIF
-
#==========================================
#================ MACROS ==================
DATABASE = $(DAT)\data.base
+#==========================================
+#==========================================
+# Setting up the compiler and linker
+#==========================================
+#==========================================
+
+cc=cl
+link=link
+rc=Rc
+
+# 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
+# is too old or untested.
+#
+#NMAKE version 1414264330 is distributed with VS 15.7.5
+
+#!MESSAGE $(MAKEFLAGS)
+#!MESSAGE $(MAKEDIR)
+#!MESSAGE $(MAKE)
+
+MAKEVERSION=$(_NMAKE_VER:.= )
+MAKEVERSION=$(MAKEVERSION: =)
+#!MESSAGE $(_NMAKE_VER)
+#!MESSAGE $(MAKEVERSION)
+
+VSNEWEST=2017
+!IF ($(MAKEVERSION) < 1000000000)
+VSVER=0000 #untested ancient version
+!ELSEIF ($(MAKEVERSION) > 1000000000) && ($(MAKEVERSION) < 1100000000)
+VSVER=2010
+!ELSEIF ($(MAKEVERSION) > 1100000000) && ($(MAKEVERSION) < 1200000000)
+VSVER=2012
+!ELSEIF ($(MAKEVERSION) > 1200000000) && ($(MAKEVERSION) < 1400000000)
+VSVER=2013
+!ELSEIF ($(MAKEVERSION) > 1400000000) && ($(MAKEVERSION) < 1411000000)
+VSVER=2015
+!ELSEIF ($(MAKEVERSION) > 1411000000) && ($(MAKEVERSION) < 1414264331)
+VSVER=$(VSNEWEST)
+!ELSEIF ($(MAKEVERSION) > 1414264330)
+VSVER=2999 #untested future version
+!ENDIF
+
+!IF ($(VSVER) >= 2012)
+!MESSAGE Autodetected Visual Studio $(VSVER)
+!ELSEIF ($(VSVER) == 2999
+!MESSAGE The version of Visual Studio is newer than the most recent at
+!MESSAGE the time this Makefile was crafted (Visual Studio $(VSNEWEST)).
+!MESSAGE Because it is newer we'll proceed expecting that the
+!MESSAGE VS$(VSNEWEST) processing will still work.
+!ELSEIF ($(VSVER) == 0000)
+!MESSAGE The version of Visual Studio appears to be quite old, older
+!MESSAGE than VS2010 which is the oldest supported version by this
+!MESSAGE Makefile, so we'll stop now.
+!ERROR Untested old Visual Studio version with NMAKE $(_NMAKE_VER).
+!ENDIF
+
+!IF ($(VSVER) == 2010)
+# For VS2010 use "setenv /x86" or "setenv /x64" before invoking make process
+# DO NOT DELETE THE FOLLOWING LINE
+!include <win32.mak>
+! ENDIF
+
+#These will be in the environment variables with one of the VS2017
+#developer command prompts.
+#VSCMD_ARG_HOST_ARCH=x64
+#VSCMD_ARG_TGT_ARCH=x86
+
+!IFDEF VSCMD_ARG_HOST_ARCH
+!MESSAGE Host architecture is $(VSCMD_ARG_HOST_ARCH)
+!MESSAGE Target architecture is $(VSCMD_ARG_TGT_ARCH)
+! IFNDEF TARGET_CPU
+! IF "$(VSCMD_ARG_TGT_ARCH)"=="x64"
+TARGET_CPU=x64
+! ELSE
+TARGET_CPU=x86
+! ENDIF
+! ENDIF
+!ENDIF
+
+!IF "$(TARGET_CPU)" == ""
+TARGET_CPU=x86
+!ENDIF
+
+!IF ($(VSVER) == 2010)
+CL_RECENT=
+!ELSE
+! IF ($(VSVER) > 2010)
+CL_RECENT=-sdl
+! ENDIF
+!ENDIF
+
#==========================================
# More compiler setup post-macros
#==========================================
#----------------------------------------------------------------
!IF "$(ADD_CURSES)" == "Y"
-#CURSESDEF=-D"PDC_DLL_BUILD" -D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
!ELSE
CURSDEF=
CURSESLIB=
-CURSESINCL=
!ENDIF
ccommon= -c -nologo -D"_CONSOLE" -D"_CRT_NONSTDC_NO_DEPRECATE" -D"_CRT_SECURE_NO_DEPRECATE" \
!IFNDEF ADD_CURSES
INCLDIR= /I..\include /I..\sys\winnt
!ELSE
-INCLDIR= /I..\include /I..\sys\winnt /I$(CURSESINCL)
+INCLDIR= /I..\include /I..\sys\winnt
!ENDIF
#==========================================