/Parser/grammar.mak

http://unladen-swallow.googlecode.com/ · Makefile · 45 lines · 18 code · 11 blank · 16 comment · 0 complexity · 2fef97e985ad536f6ca97cc20a97fb8c MD5 · raw file

  1. # This manages to rebuild graminit.{h, c} under MSVC 6 (Windows), via
  2. #
  3. # nmake /f grammar.mak
  4. #
  5. # You may also need to copy python23.dll into this directory, or get
  6. # it on your search path.
  7. #
  8. # 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
  13. # as a result this requires linking with python23.lib, so it's of no use
  14. # for bootstrapping (the cause appears to be a useless-- in this
  15. # particular case --pragma in PC\pyconfig.h, which demands that
  16. # python23.lib get linked in).
  17. LIBS= ..\PCbuild\python25.lib
  18. CFLAGS= /I ..\Include /I ..\PC /D MS_NO_COREDLL /D PGEN /MD
  19. GRAMMAR_H= ..\Include\graminit.h
  20. GRAMMAR_C= ..\Python\graminit.c
  21. GRAMMAR_INPUT= ..\Grammar\Grammar
  22. PGEN= pgen.exe
  23. POBJS= acceler.obj grammar1.obj listnode.obj node.obj parser.obj \
  24. parsetok.obj tokenizer.obj bitset.obj metagrammar.obj
  25. PARSER_OBJS= $(POBJS) myreadline.obj
  26. PGOBJS= firstsets.obj grammar.obj pgen.obj printgrammar.obj pgenmain.obj
  27. PGENOBJS= $(POBJS) $(PGOBJS)
  28. $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
  29. $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
  30. $(PGEN): $(PGENOBJS)
  31. $(CC) $(PGENOBJS) $(LIBS) /Fe$(PGEN)
  32. clean:
  33. del *.obj
  34. del $(PGEN)