NHDT->ANH, nethack->anethack, nhdat->anhdat
[aNetHack.git] / win / win32 / levstuff.mak
blob2506d7ef37b3cd7bc035805ddf6edb285e2205cb
1 # $ANH-Date$ $ANH-Branch$:$ANH-Revision$
3 # Set all of these or none of them.
5 # bison and flex are the ones found in GnuWin32, which
6 # is probably the easiest set of these tools to find
7 # on Windows.
9 #YACC = bison.exe -y
10 #LEX = flex.exe
11 #YTABC = y.tab.c
12 #YTABH = y.tab.h
13 #LEXYYC = lex.yy.c
16 default: all
18 all: tools ..\util\lev_yacc.c ..\util\lev_lex.c
20 rebuild: clean all
22 clean:
23 -del ..\util\lev_lex.c
24 -del ..\util\lev_yacc.c
25 -del ..\include\lev_comp.h
27 tools:
28 !IFDEF YACC
29 @echo Yacc-alike set to $(YACC)
30 @echo YTABC set to $(YTABC)
31 @echo YTABH set to $(YTABH)
32 !ENDIF
34 !IFDEF LEX
35 @echo Lex-alike set to $(LEX)
36 @echo LEXYYC set to $(LEXYYC)
37 !ENDIF
39 #==========================================
40 # Level Compiler Stuff
41 #==========================================
43 ..\util\lev_yacc.c ..\include\lev_comp.h: ..\util\lev_comp.y
44 !IFNDEF YACC
45 @echo Using pre-built lev_yacc.c and lev_comp.h
46 @copy ..\sys\share\lev_yacc.c ..\util\lev_yacc.c
47 @copy ..\sys\share\lev_comp.h ..\include\lev_comp.h
48 !ELSE
49 @echo Generating lev_yacc.c and lev_comp.h
50 chdir ..\util
51 $(YACC) -d lev_comp.y
52 copy $(YTABC) $@
53 copy $(YTABH) ..\include\lev_comp.h
54 @del $(YTABC)
55 @del $(YTABH)
56 chdir ..\build
57 !ENDIF
59 ..\util\lev_lex.c: ..\util\lev_comp.l
60 !IFNDEF LEX
61 @echo Using pre-built lev_lex.c
62 @copy ..\sys\share\lev_lex.c $@
63 !ELSE
64 @echo Generating lev_lex.c
65 chdir ..\util
66 $(LEX) lev_comp.l
67 copy $(LEXYYC) $@
68 @del $(LEXYYC)
69 chdir ..\build
70 !ENDIF