Makefile.fpc 2.1 KB

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