more Windows Makefile synch and gcc Makefile updates
The gcc-built tty version builds fully now, but it won't play. The GUI version definitely does not build right now.
This commit is contained in:
@@ -456,18 +456,16 @@ DATABASE = $(DAT)/data.base
|
||||
#==========================================
|
||||
#
|
||||
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
|
||||
|
||||
#==========================================
|
||||
@@ -601,8 +599,8 @@ $(OBJ)/%.o : $(UTIL)/%.c
|
||||
$(OBJ)/%.o : $(WSHR)/%.c
|
||||
$(cc) $(CFLAGS) -o$@ $<
|
||||
|
||||
$(INCL)/%.h : $(WSHR)/%.h
|
||||
@copy $< $@
|
||||
#$(INCL)/%.h : $(WSHR)/%.h
|
||||
# @copy $< $@
|
||||
|
||||
#{$(WSHR)}.txt{$(DAT)}.txt:
|
||||
# @copy $< $@
|
||||
@@ -667,8 +665,6 @@ YACC=
|
||||
#LEX = lex
|
||||
#LEX = flex
|
||||
LEX=
|
||||
export YACC
|
||||
export LEX
|
||||
|
||||
#
|
||||
# - Specify your flex skeleton file (if needed).
|
||||
@@ -681,6 +677,12 @@ YTABC = y_tab.c
|
||||
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
|
||||
@@ -811,10 +813,10 @@ $(O)winres.o: $(TILEBMP16) $(MSWIN)/winhack.rc $(MSWIN)/mnsel.bmp \
|
||||
$(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.
|
||||
@@ -886,9 +888,9 @@ initialchk: objdir.tag
|
||||
@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 ============
|
||||
@@ -899,7 +901,7 @@ objdir.tag:
|
||||
#==========================================
|
||||
|
||||
$(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 \
|
||||
@@ -956,7 +958,7 @@ $(DAT)/dungeon: utility.tag $(DAT)/dungeon.def
|
||||
#==========================================
|
||||
|
||||
$(U)uudecode.exe: $(O)uudecode.o
|
||||
@$(link) $(LFLAGSU) -o$@ $(O)uudecode.o
|
||||
$(link) $(LFLAGSU) -o$@ $(O)uudecode.o
|
||||
|
||||
$(O)uudecode.o: $(SSYS)/uudecode.c
|
||||
|
||||
@@ -1030,7 +1032,7 @@ $(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H)
|
||||
|
||||
$(U)levcomp.exe: $(LEVCOMPOBJS)
|
||||
@echo Linking $@...
|
||||
@$(link) $(LFLAGSU) -o$@ $(LEVCOMPOBJS)
|
||||
$(link) $(LFLAGSU) -o$@ $(LEVCOMPOBJS)
|
||||
|
||||
#==========================================
|
||||
# Dungeon Compiler Stuff
|
||||
@@ -1057,7 +1059,7 @@ $(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c
|
||||
$(U)dgncomp.exe: $(DGNCOMPOBJS)
|
||||
@echo Linking $@...
|
||||
@echo Linking $@...
|
||||
@$(link) $(LFLAGSU) -o$@ $(DGNCOMPOBJS)
|
||||
$(link) $(LFLAGSU) -o$@ $(DGNCOMPOBJS)
|
||||
|
||||
#=================================================
|
||||
# For a couple of devteam utilities
|
||||
@@ -1065,11 +1067,11 @@ $(U)dgncomp.exe: $(DGNCOMPOBJS)
|
||||
|
||||
$(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
|
||||
@@ -1087,7 +1089,7 @@ $(O)nhsizes2.o: $(CONFIG_H) nhsizes2.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
|
||||
@@ -1146,7 +1148,7 @@ $(SRC)/tile.c: $(U)tilemap.exe
|
||||
@$(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
|
||||
@@ -1178,16 +1180,16 @@ $(O)tilete32.o: $(WSHR)/tiletext.c $(CONFIG_H) $(TILE_H)
|
||||
|
||||
$(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)
|
||||
@@ -1200,11 +1202,11 @@ $(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
|
||||
@@ -1421,13 +1423,13 @@ $(O)ntsound.o: $(HACK_H) $(MSWSYS)/ntsound.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)
|
||||
|
||||
|
||||
@@ -118,10 +118,6 @@ WSHR = ..\win\share # Tile support files
|
||||
|
||||
OBJ = o
|
||||
|
||||
cc=cl
|
||||
link=link
|
||||
rc=Rc
|
||||
|
||||
#
|
||||
#==========================================
|
||||
# Exe File Info.
|
||||
@@ -159,93 +155,6 @@ DLBFLG =
|
||||
|
||||
#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 ==================
|
||||
@@ -444,18 +353,107 @@ TILE_H = ..\win\share\tile.h
|
||||
|
||||
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" \
|
||||
@@ -530,7 +528,7 @@ guilibs = $(winlibs)
|
||||
!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
|
||||
|
||||
#==========================================
|
||||
|
||||
Reference in New Issue
Block a user