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

View File

@@ -41,11 +41,28 @@ tools:
# 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)"==""
@echo Using pre-built dgn_yacc.c and dgn_comp.h
@copy ..\sys\share\dgn_yacc.c ..\util\dgn_yacc.c
@copy ..\sys\share\dgn_comp.h ..\include\dgn_comp.h
@echo Using pre-built dgn_comp.h
chdir ..\include
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
chdir ..\util
$(YACC) -d dgn_comp.y
@@ -59,7 +76,9 @@ tools:
..\util\dgn_lex.c: ..\util\dgn_comp.l
!IF "$(LEX)"==""
@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
chdir ..\util
$(LEX) dgn_comp.l

View File

@@ -40,11 +40,12 @@ tools:
# 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
@echo Using pre-built lev_yacc.c and lev_comp.h
@copy ..\sys\share\lev_yacc.c ..\util\lev_yacc.c
@copy ..\sys\share\lev_comp.h ..\include\lev_comp.h
@echo Using pre-built lev_comp.h
chdir ..\include
copy /b ..\sys\share\lev_comp.h +,,
chdir ..\src
!ELSE
@echo Generating lev_yacc.c and lev_comp.h
chdir ..\util
@@ -53,19 +54,38 @@ tools:
copy $(YTABH) ..\include\lev_comp.h
@del $(YTABC)
@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
..\util\lev_lex.c: ..\util\lev_comp.l
!IFNDEF LEX
@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
@echo Generating lev_lex.c
chdir ..\util
$(LEX) lev_comp.l
copy $(LEXYYC) $@
@del $(LEXYYC)
chdir ..\build
chdir ..\src
!ENDIF