Makefile.fpc 827 B

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