| Tim Peters | eba84cd | 2001-10-13 20:16:17 +0000 | [diff] [blame] | 1 | # 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 | 
| Tim Peters | 1c61926 | 2002-04-22 00:39:44 +0000 | [diff] [blame] | 10 | # as a result this requires linking with python23.lib, so it's of no use | 
| Tim Peters | eba84cd | 2001-10-13 20:16:17 +0000 | [diff] [blame] | 11 | # for bootstrapping (the cause appears to be a useless-- in this | 
 | 12 | # particular case --pragma in PC\pyconfig.h, which demands that | 
| Tim Peters | 1c61926 | 2002-04-22 00:39:44 +0000 | [diff] [blame] | 13 | # python23.lib get linked in). | 
| Tim Peters | eba84cd | 2001-10-13 20:16:17 +0000 | [diff] [blame] | 14 |  | 
| Tim Peters | 1c61926 | 2002-04-22 00:39:44 +0000 | [diff] [blame] | 15 | LIBS= ..\PCbuild\python23.lib | 
| Tim Peters | eba84cd | 2001-10-13 20:16:17 +0000 | [diff] [blame] | 16 |  | 
| Tim Peters | 1ccb3ee | 2002-05-23 19:25:59 +0000 | [diff] [blame] | 17 | CFLAGS= /I ..\Include /I ..\PC /D MS_NO_COREDLL /MD | 
| Tim Peters | eba84cd | 2001-10-13 20:16:17 +0000 | [diff] [blame] | 18 |  | 
 | 19 | GRAMMAR_H= ..\Include\graminit.h | 
 | 20 | GRAMMAR_C= ..\Python\graminit.c | 
 | 21 | GRAMMAR_INPUT= ..\Grammar\Grammar | 
 | 22 |  | 
 | 23 | PGEN= pgen.exe | 
 | 24 |  | 
 | 25 | POBJS= acceler.obj grammar1.obj listnode.obj node.obj parser.obj \ | 
 | 26 |        parsetok.obj tokenizer.obj bitset.obj metagrammar.obj | 
 | 27 |  | 
 | 28 | PARSER_OBJS= $(POBJS) myreadline.obj | 
 | 29 |  | 
 | 30 | PGOBJS= firstsets.obj grammar.obj pgen.obj printgrammar.obj pgenmain.obj | 
 | 31 |  | 
 | 32 | PGENOBJS= $(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 |  | 
 | 40 | clean: | 
 | 41 |         del *.obj | 
 | 42 |         del $(PGEN) |