blob: 55f028ffb83fc9a6d4b43089ceb6fd1960d648ae [file] [log] [blame]
Tim Peterseba84cd2001-10-13 20:16:17 +00001# This manages to rebuild graminit.{h, c} under MSVC 6 (Windows), via
2#
3# nmake /f grammar.mak
4#
Tim Peters8ab2ec42003-06-17 00:05:53 +00005# You may also need to copy python23.dll into this directory, or get
6# it on your search path.
7#
Tim Peterseba84cd2001-10-13 20:16:17 +00008# The intermediate files can be nuked afterwards:
9#
10# nmake /f grammar.mak clean
11#
12# I don't understand the maze of preprocessor #define's on Windows, and
Tim Peters1c619262002-04-22 00:39:44 +000013# as a result this requires linking with python23.lib, so it's of no use
Tim Peterseba84cd2001-10-13 20:16:17 +000014# for bootstrapping (the cause appears to be a useless-- in this
15# particular case --pragma in PC\pyconfig.h, which demands that
Tim Peters1c619262002-04-22 00:39:44 +000016# python23.lib get linked in).
Tim Peterseba84cd2001-10-13 20:16:17 +000017
Jeremy Hylton3e0055f2005-10-20 19:59:25 +000018LIBS= ..\PCbuild\python25.lib
Tim Peterseba84cd2001-10-13 20:16:17 +000019
Tim Peters8ab2ec42003-06-17 00:05:53 +000020CFLAGS= /I ..\Include /I ..\PC /D MS_NO_COREDLL /D PGEN /MD
Tim Peterseba84cd2001-10-13 20:16:17 +000021
22GRAMMAR_H= ..\Include\graminit.h
23GRAMMAR_C= ..\Python\graminit.c
24GRAMMAR_INPUT= ..\Grammar\Grammar
25
26PGEN= pgen.exe
27
28POBJS= acceler.obj grammar1.obj listnode.obj node.obj parser.obj \
29 parsetok.obj tokenizer.obj bitset.obj metagrammar.obj
30
31PARSER_OBJS= $(POBJS) myreadline.obj
32
33PGOBJS= firstsets.obj grammar.obj pgen.obj printgrammar.obj pgenmain.obj
34
35PGENOBJS= $(POBJS) $(PGOBJS)
36
37$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
38 $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
39
40$(PGEN): $(PGENOBJS)
41 $(CC) $(PGENOBJS) $(LIBS) /Fe$(PGEN)
42
43clean:
44 del *.obj
45 del $(PGEN)