windows cmdline Makefile

This commit is contained in:
nhmall
2018-03-04 09:07:16 -05:00
parent 4328cf49ef
commit eddfcc4422
3 changed files with 72 additions and 20 deletions
+21 -8
View File
@@ -569,7 +569,7 @@ default : install
all : install all : install
install: envchk $(O)obj.tag $(O)utility.tag $(GAMEDIR)\NetHack.exe $(GAMEDIR)\NetHackW.exe $(O)install.tag install: $(O)envchk.tag $(O)obj.tag $(O)utility.tag $(GAMEDIR)\NetHack.exe $(GAMEDIR)\NetHackW.exe $(O)install.tag
@echo Done. @echo Done.
$(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \
@@ -913,14 +913,19 @@ $(MSWIN)\splash.bmp: $(U)uudecode.exe $(MSWIN)\splash.uu
# defer to the steps in ..\win\win32\levstuff.mak # defer to the steps in ..\win\win32\levstuff.mak
# #
$(U)lev_yacc.c $(INCL)\lev_comp.h: $(U)lev_comp.y $(U)lev_yacc.c:
nmake -nologo -f ..\win\win32\levstuff.mak default nmake -nologo -f ..\win\win32\levstuff.mak $(U)lev_yacc.c
$(U)lev_lex.c:
nmake -nologo -f ..\win\win32\levstuff.mak $(U)lev_lex.c
$(INCL)\lev_comp.h:
nmake -nologo -f ..\win\win32\levstuff.mak $(INCL)\lev_comp.h
$(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)\lev_comp.h $(U)lev_yacc.c $(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)\lev_comp.h $(U)lev_yacc.c
@$(cc) $(cflagsBuild) -Fo$@ $(U)lev_yacc.c @$(cc) $(cflagsBuild) -Fo$@ $(U)lev_yacc.c
$(O)lev_lex.o: $(HACK_H) $(INCL)\lev_comp.h $(SP_LEV_H) \ $(O)lev_lex.o: $(HACK_H) $(INCL)\lev_comp.h $(SP_LEV_H) $(U)lev_lex.c
$(U)lev_lex.c
@$(cc) $(cflagsBuild) -Fo$@ $(U)lev_lex.c @$(cc) $(cflagsBuild) -Fo$@ $(U)lev_lex.c
$(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H) $(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H)
@@ -939,8 +944,14 @@ $(U)levcomp.exe: $(LEVCOMPOBJS)
# #
# defer to the steps in ..\win\win32\dgnstuff.mak # defer to the steps in ..\win\win32\dgnstuff.mak
# #
$(U)dgn_yacc.c $(INCL)\dgn_comp.h : $(U)dgn_comp.y $(U)dgn_yacc.c:
nmake -nologo -f ..\win\win32\dgnstuff.mak default nmake -nologo -f ..\win\win32\dgnstuff.mak $(U)dgn_yacc.c
$(INCL)\dgn_comp.h:
nmake -nologo -f ..\win\win32\dgnstuff.mak $(INCL)\dgn_comp.h
$(U)dgn_lex.c:
nmake -nologo -f ..\win\win32\dgnstuff.mak $(U)dgn_lex.c
$(O)dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h $(U)dgn_yacc.c $(O)dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h $(U)dgn_yacc.c
@$(cc) $(cflagsBuild) -Fo$@ $(U)dgn_yacc.c @$(cc) $(cflagsBuild) -Fo$@ $(U)dgn_yacc.c
@@ -974,7 +985,7 @@ $(O)obj.tag:
# options. # options.
#========================================== #==========================================
envchk: $(O)envchk.tag:
! IF "$(TARGET_CPU)"=="x64" ! IF "$(TARGET_CPU)"=="x64"
@echo Windows x64 64-bit target build @echo Windows x64 64-bit target build
! ELSE ! ELSE
@@ -984,6 +995,7 @@ envchk:
# @echo Warning, the CL Environment variable is defined: # @echo Warning, the CL Environment variable is defined:
# @echo CL=$(CL) # @echo CL=$(CL)
! ENDIF ! ENDIF
echo envchk >$@
#========================================== #==========================================
#=========== SECONDARY TARGETS ============ #=========== SECONDARY TARGETS ============
@@ -1262,6 +1274,7 @@ clean:
if exist $(O)nhraykey.lib del $(O)nhraykey.lib if exist $(O)nhraykey.lib del $(O)nhraykey.lib
if exist $(O)nhraykey.map del $(O)nhraykey.map if exist $(O)nhraykey.map del $(O)nhraykey.map
if exist $(O)nhraykey.PDB del $(O)nhraykey.PDB if exist $(O)nhraykey.PDB del $(O)nhraykey.PDB
if exist $(O)envchk.tag del $(O)envchk.tag
if exist $(O)obj.tag del $(O)obj.tag if exist $(O)obj.tag del $(O)obj.tag
if exist $(O)sp_lev.tag del $(O)sp_lev.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.MAP del $(O)uudecode.MAP
+24 -5
View File
@@ -41,11 +41,28 @@ tools:
# Dungeon Compiler Stuff # Dungeon Compiler Stuff
#========================================== #==========================================
..\util\dgn_yacc.c ..\include\dgn_comp.h : ..\util\dgn_comp.y ..\include\dgn_comp.h : ..\util\dgn_comp.y
!IF "$(YACC)"=="" !IF "$(YACC)"==""
@echo Using pre-built dgn_yacc.c and dgn_comp.h @echo Using pre-built dgn_comp.h
@copy ..\sys\share\dgn_yacc.c ..\util\dgn_yacc.c chdir ..\include
@copy ..\sys\share\dgn_comp.h ..\include\dgn_comp.h copy /b ..\sys\share\dgn_comp.h +,,
chdir ..\src
!ELSE
chdir ..\util
$(YACC) -d dgn_comp.y
copy $(YTABC) $@
copy $(YTABH) ..\include\dgn_comp.h
@del $(YTABC)
@del $(YTABH)
chdir ..\build
!ENDIF
..\util\dgn_yacc.c : ..\util\dgn_comp.y
!IF "$(YACC)"==""
@echo Using pre-built dgn_yacc.c
chdir ..\util
copy /b ..\sys\share\dgn_yacc.c +,,
chdir ..\src
!ELSE !ELSE
chdir ..\util chdir ..\util
$(YACC) -d dgn_comp.y $(YACC) -d dgn_comp.y
@@ -59,7 +76,9 @@ tools:
..\util\dgn_lex.c: ..\util\dgn_comp.l ..\util\dgn_lex.c: ..\util\dgn_comp.l
!IF "$(LEX)"=="" !IF "$(LEX)"==""
@echo Using pre-built dgn_lex.c @echo Using pre-built dgn_lex.c
@copy ..\sys\share\dgn_lex.c $@ chdir ..\util
copy /b ..\sys\share\dgn_lex.c +,,
chdir ..\src
!ELSE !ELSE
chdir ..\util chdir ..\util
$(LEX) dgn_comp.l $(LEX) dgn_comp.l
+27 -7
View File
@@ -40,11 +40,12 @@ tools:
# Level Compiler Stuff # Level Compiler Stuff
#========================================== #==========================================
..\util\lev_yacc.c ..\include\lev_comp.h: ..\util\lev_comp.y ..\include\lev_comp.h: ..\util\lev_comp.y
!IFNDEF YACC !IFNDEF YACC
@echo Using pre-built lev_yacc.c and lev_comp.h @echo Using pre-built lev_comp.h
@copy ..\sys\share\lev_yacc.c ..\util\lev_yacc.c chdir ..\include
@copy ..\sys\share\lev_comp.h ..\include\lev_comp.h copy /b ..\sys\share\lev_comp.h +,,
chdir ..\src
!ELSE !ELSE
@echo Generating lev_yacc.c and lev_comp.h @echo Generating lev_yacc.c and lev_comp.h
chdir ..\util chdir ..\util
@@ -53,19 +54,38 @@ tools:
copy $(YTABH) ..\include\lev_comp.h copy $(YTABH) ..\include\lev_comp.h
@del $(YTABC) @del $(YTABC)
@del $(YTABH) @del $(YTABH)
chdir ..\build chdir ..\src
!ENDIF
..\util\lev_yacc.c: ..\util\lev_comp.y
!IFNDEF YACC
@echo Using pre-built lev_yacc.c
chdir ..\util
copy /b ..\sys\share\lev_yacc.c +,,
chdir ..\src
!ELSE
@echo Generating lev_yacc.c and lev_comp.h
chdir ..\util
$(YACC) -d lev_comp.y
copy $(YTABC) $@
copy $(YTABH) ..\include\lev_comp.h
@del $(YTABC)
@del $(YTABH)
chdir ..\src
!ENDIF !ENDIF
..\util\lev_lex.c: ..\util\lev_comp.l ..\util\lev_lex.c: ..\util\lev_comp.l
!IFNDEF LEX !IFNDEF LEX
@echo Using pre-built lev_lex.c @echo Using pre-built lev_lex.c
@copy ..\sys\share\lev_lex.c $@ chdir ..\util
copy /b ..\sys\share\lev_lex.c +,,
chdir ..\src
!ELSE !ELSE
@echo Generating lev_lex.c @echo Generating lev_lex.c
chdir ..\util chdir ..\util
$(LEX) lev_comp.l $(LEX) lev_comp.l
copy $(LEXYYC) $@ copy $(LEXYYC) $@
@del $(LEXYYC) @del $(LEXYYC)
chdir ..\build chdir ..\src
!ENDIF !ENDIF