blob: bbb83aa1c6a4d2d1cd9385167bae562a7d72a613 [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#
5# The intermediate files can be nuked afterwards:
6#
7# nmake /f grammar.mak clean
8#
9# I don't understand the maze of preprocessor #define's on Windows, and
10# as a result this requires linking with python22.lib, so it's of no use
11# for bootstrapping (the cause appears to be a useless-- in this
12# particular case --pragma in PC\pyconfig.h, which demands that
13# python22.lib get linked in).
14
15LIBS= ..\PCbuild\python22.lib
16
17CFLAGS= /I ..\Include /I ..\PC /D MS_NO_COREDLL
18
19GRAMMAR_H= ..\Include\graminit.h
20GRAMMAR_C= ..\Python\graminit.c
21GRAMMAR_INPUT= ..\Grammar\Grammar
22
23PGEN= pgen.exe
24
25POBJS= acceler.obj grammar1.obj listnode.obj node.obj parser.obj \
26 parsetok.obj tokenizer.obj bitset.obj metagrammar.obj
27
28PARSER_OBJS= $(POBJS) myreadline.obj
29
30PGOBJS= firstsets.obj grammar.obj pgen.obj printgrammar.obj pgenmain.obj
31
32PGENOBJS= $(POBJS) $(PGOBJS)
33
34$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
35 $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
36
37$(PGEN): $(PGENOBJS)
38 $(CC) $(PGENOBJS) $(LIBS) /Fe$(PGEN)
39
40clean:
41 del *.obj
42 del $(PGEN)