Makefile.fpc.fpcmake 853 B

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