Makefile.fpc 741 B

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