Makefile.fpc 758 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #
  2. # Makefile.fpc for shedit
  3. #
  4. [targets]
  5. units=
  6. programs=h2pas
  7. [clean]
  8. units=options lexlib scan yacclib converu
  9. [dirs]
  10. fpcdir=../..
  11. [defaults]
  12. defaultoptions=-Sg
  13. [rules]
  14. # do we have pyacc?
  15. ifndef PYACC
  16. PYACC=$(strip $(wildcard $(addsuffix /pyacc$(EXEEXT),$(SEARCHPATH))))
  17. ifeq ($(PYACC),)
  18. PYACC=
  19. else
  20. export PYACC:=$(firstword $(PYACC))
  21. endif
  22. endif
  23. # do we have plex?
  24. ifndef PLEX
  25. PLEX=$(strip $(wildcard $(addsuffix /plex$(EXEEXT),$(SEARCHPATH))))
  26. ifeq ($(PLEX),)
  27. PLEX=
  28. else
  29. export PLEX:=$(firstword $(PLEX))
  30. endif
  31. endif
  32. h2pas$(EXEEXT): h2pas$(PASEXT)
  33. #
  34. # Lex and Yacc (only if pyacc is found)
  35. #
  36. ifdef PYACC
  37. h2pas$(PASEXT): h2pas.y
  38. $(PYACC) h2pas.y
  39. yacclex: yacc lex
  40. yacc:
  41. $(PYACC) h2pas.y
  42. lex :
  43. $(PLEX) scan.l
  44. endif