Makefile.fpc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #
  2. # Makefile.fpc for running fpmake
  3. #
  4. [package]
  5. name=fcl-web
  6. version=2.7.1
  7. [require]
  8. packages=rtl fpmkunit
  9. [install]
  10. fpcpackage=y
  11. [default]
  12. fpcdir=../..
  13. [prerules]
  14. FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
  15. ifdef OS_TARGET
  16. FPC_TARGETOPT+=--os=$(OS_TARGET)
  17. endif
  18. ifdef CPU_TARGET
  19. FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
  20. endif
  21. LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
  22. [rules]
  23. fpmake: fpmake.pp
  24. $(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR))
  25. all: fpmake
  26. $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
  27. smart: fpmake
  28. $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -o -XX -o -CX
  29. release: fpmake
  30. $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -o -dRELEASE
  31. debug: fpmake
  32. $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -o -dDEBUG
  33. # If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
  34. # most often fail because the dependencies are cleared.
  35. # In case of a clean, simply do nothing
  36. ifeq ($(FPMAKE_BIN_CLEAN),)
  37. clean:
  38. else
  39. clean:
  40. $(FPMAKE_BIN_CLEAN) clean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
  41. endif
  42. # In case of a distclean, perform an 'old'-style distclean. This to avoid problems
  43. # when the package is compiled using fpcmake prior to running this clean using fpmake
  44. ifeq ($(FPMAKE_BIN_CLEAN),)
  45. distclean: $(addsuffix _distclean,$(TARGET_DIRS)) fpc_distclean
  46. else
  47. distclean:
  48. $(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
  49. -$(DEL) $(LOCALFPMAKE)
  50. endif
  51. install: fpmake
  52. ifdef UNIXHier
  53. $(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX)
  54. else
  55. $(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR)
  56. endif
  57. # Normally distinstall also installs the examples, but in this case there are
  58. # none.
  59. distinstall: install